Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding auth to grpc ng #53

Merged
merged 10 commits into from
Oct 17, 2023
Merged

Adding auth to grpc ng #53

merged 10 commits into from
Oct 17, 2023

Conversation

daliclovr
Copy link
Contributor

@daliclovr daliclovr commented Oct 13, 2023

Added a GRPC interceptor to NodeGuard client to send the proper auth header.

https://www.notion.so/clovrlabs/Phase-3-Live-4a570b5e538b4a0aa4b6980007d68977?p=80f65dac3561479aad3e7c10158d4eaf&pm=c

Regarding the value of new environment variable NODEGUARD_API_KEY i will automatically create this data for development purposes in NodeGuard database :). Please, wait for this changes to come!

I introduced a couple of changes as well:

  • Used Option pattern to encapsulate the getConn method. We have several grpc options which are common to all of our clients but only NG needed auth so far. I used this pattern to make it optional and customizable per client, keeping the base options for everyone.
  • Created .env file :) should be the agnostic way to go! Please, vscode users update your configs to add new variable.
  • Improved some error messages... and move one error regarding connection to NG. I noticed that placing after checking if liquidation rules are empty masked connection errors.

markettes
markettes previously approved these changes Oct 16, 2023
Copy link
Contributor

@markettes markettes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

rpc/rpc.go Show resolved Hide resolved
Jossec101
Jossec101 previously approved these changes Oct 16, 2023
.github/pull_requeste_template.md Outdated Show resolved Hide resolved
@gcaracuel gcaracuel merged commit 3b82492 into main Oct 17, 2023
1 check passed
@gcaracuel gcaracuel deleted the adding-auth-to-grpc-ng branch October 17, 2023 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants