[DON'T- MERGE]Add the design for the API to help rotate secret.#259
Open
reasonerjt wants to merge 2 commits intogoharbor:mainfrom
Open
[DON'T- MERGE]Add the design for the API to help rotate secret.#259reasonerjt wants to merge 2 commits intogoharbor:mainfrom
reasonerjt wants to merge 2 commits intogoharbor:mainfrom
Conversation
It decrypt the data with the old key and encrypt using the new key Signed-off-by: Daniel Jiang <daniel.jiang@broadcom.com>
stonezdj
approved these changes
Feb 21, 2025
reasonerjt
commented
Mar 3, 2025
| mentioned. If the API is called with `skip_oidc_secret` set to `true`, the OIDC secrets will not be usable after the secret key is | ||
| updated, and the user will need to manually update the OIDC secret via Harbor's UI. | ||
|
|
||
| ### Implementation |
Contributor
Author
There was a problem hiding this comment.
Unfortunately, I found an issue when testing the code.
Harbor has been using AES256-CFB to encrypt/decrypt the data, and if the user provides an incorrect key as "current_secret_key" to decrypt the data, there seems no good way to detect it. Therefore, if the user passes a wrong key when calling the API, the wrong data will be persisted and it will be very hard to recover.
This seems a bit too dangerous even though we expect it to be used only by system admin.
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.
It decrypt the data with the old key and encrypt using the new key