Allow secrets to be provided from a file or environment variable#5177
Merged
sisuresh merged 2 commits intostellar:masterfrom Apr 1, 2026
Merged
Allow secrets to be provided from a file or environment variable#5177sisuresh merged 2 commits intostellar:masterfrom
sisuresh merged 2 commits intostellar:masterfrom
Conversation
sisuresh
commented
Mar 12, 2026
693a0d1 to
87cb7bc
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for resolving sensitive config values (currently NODE_SEED) from external secret sources, primarily via $FILE: references, and documents / tests the behavior.
Changes:
- Introduce
util/SecretManagerfor resolving$FILE:-prefixed config values with permission checks and whitespace trimming. - Update config parsing to allow
NODE_SEEDto be read from a$FILE:reference and reject such references on public network config. - Add unit tests and update the example config documentation for
$FILE:usage.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| src/util/SecretManager.h | New API for resolving config secrets (e.g., $FILE:). |
| src/util/SecretManager.cpp | Implements file-based secret resolution and permission validation. |
| src/main/Config.cpp | Uses SecretManager when parsing NODE_SEED; rejects external secrets on pubnet. |
| src/main/test/ConfigTests.cpp | Adds tests for secret resolution and config integration. |
| docs/stellar-core_example.cfg | Documents $FILE: usage for NODE_SEED. |
You can also share your feedback on Copilot code review. Take the survey.
dmkozh
approved these changes
Mar 31, 2026
dmkozh
approved these changes
Apr 1, 2026
dmkozh
approved these changes
Apr 1, 2026
marta-lokhova
approved these changes
Apr 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Resolves #1316
Checklist
clang-formatv8.0.0 (viamake formator the Visual Studio extension)