-
Notifications
You must be signed in to change notification settings - Fork 82
Remove root key env var dead code #8942
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
Draft
Neon-White
wants to merge
6
commits into
noobaa:master
Choose a base branch
from
Neon-White:remove-root-secret-env-dead-code
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Remove root key env var dead code #8942
Neon-White
wants to merge
6
commits into
noobaa:master
from
Neon-White:remove-root-secret-env-dead-code
Conversation
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
Signed-off-by: Ben <[email protected]>
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.
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
src/test/unit_tests/test_encryption.js:906
- Verify that the removal of the subsequent load calls (previously used to reload the system state) does not leave the active root key state unvalidated. Consider adding explicit assertions to ensure that the state update is properly reflected after modifying the active root key file.
await fs.promises.writeFile(config.ROOT_KEY_MOUNT + '/active_root_key', 'key1');
src/server/system_services/master_key_manager.js:52
- Confirm that the revised get_root_key_id behavior (which now solely relies on this.active_root_key) correctly handles cases when active_root_key is undefined, since the environment variable fallback was removed.
return this.active_root_key && this.active_root_key.toString();
Signed-off-by: Ben <[email protected]>
Signed-off-by: Ben <[email protected]>
9e76432
to
751a904
Compare
Signed-off-by: Ben <[email protected]>
Signed-off-by: Ben <[email protected]>
Signed-off-by: Ben <[email protected]>
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.
Describe the Problem
In continuation to noobaa/noobaa-operator#1533 (which also contains a more elaborate explanation), this PR removes the dead code paths that are no longer relevant due to the removal of the
NOOBAA_ROOT_SECRET
environment variableExplain the Changes
load_root_key()
was removed since it only performed an env var loadingsystem_store
now callsload_root_keys_from_mount()
instead ofload_root_key()
to load the root key from the mount point instead of the env vartest_encryption
no longer testsload_root_key()
since it was removedget_root_key_id()
no longer handles cases where the key might be in the envIssues:
Fixed:
Testing Instructions: