-
Notifications
You must be signed in to change notification settings - Fork 19
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
(OraklNode) Vault integration #1499
Conversation
Warning Rate Limit Exceeded@nick-bisonai has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 50 minutes and 31 seconds before requesting another review. How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. WalkthroughThe recent updates bolster the node application's security by seamlessly integrating HashiCorp Vault for securely managing secrets. The codebase now utilizes Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (6)
- node/.env.example (2 hunks)
- node/pkg/chain/helper/helper.go (4 hunks)
- node/pkg/db/pgsql.go (2 hunks)
- node/pkg/libp2p/setup/setup.go (2 hunks)
- node/pkg/secrets/secrets.go (1 hunks)
- node/pkg/utils/encryptor/encryptor.go (2 hunks)
Additional comments not posted (3)
node/.env.example (1)
16-20
: The addition of Vault configuration settings is well-documented and clear.node/pkg/secrets/secrets.go (1)
65-78
: The fallback to environment variables inGetSecret
is a good safeguard.node/pkg/db/pgsql.go (1)
49-49
: Centralizing the PostgreSQL connection string retrieval in Vault enhances security.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Out of diff range and nitpick comments (2)
node/pkg/por/app.go (2)
65-65
: The use ofsecrets.GetSecret("POR_REPORTER_PK")
for fetching secrets is a secure improvement. Consider adding a comment explaining the necessity of this secret for new developers or maintainers.
65-65
: TheRun
method is well-structured. Consider adding more detailed logging at key operation stages to improve traceability and debugging.
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- node/pkg/por/app.go (2 hunks)
Additional comments not posted (1)
node/pkg/por/app.go (1)
15-15
: The addition of thesecrets
package aligns with the new feature for secure secret management. Ensure that all necessary configurations for Vault are properly set up in the environment or configuration files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- node/pkg/secrets/secrets.go (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- node/pkg/secrets/secrets.go
feat: use vault secret from POR fix: use defined ctx instead of background fix: minor update feat: remove sync.Once as init is executed once
bd902a0
to
a26054f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
lgtm! very neat implementation! |
Description
First tries to load settings from vault, fallbacks to environment variable if not exists in vault. use
sync.Once
to load vault secrets only once on package loadVault secrets (OraklNode)
KLAYTN_REPORTER_PK
SIGNER_PK
ETH_REPORTER_PK
(but not utilized at the moment)PRIVATE_NETWORK_SECRET
ENCRYPT_PASSWORD
DATABASE_URL
Vault secrets (POR)
POR_REPORTER_PK
Type of change
Please delete options that are not relevant.
Checklist before requesting a review
Deployment