-
Notifications
You must be signed in to change notification settings - Fork 18
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
External Secret Storage Implementation #85
Conversation
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.
Left some small comments. Really like the refactoring around the Repository and the test suites. LGTM!
Based on the video user can sees existing value in secret. I'm not sure that's a good idea, since in our case the mlp administrator also can see the secret that user defined |
Updated the secret data text box to use |
**What this PR does / why we need it**: MLP's Secret API removes the application-level encryption when [returning the secret data](caraml-dev/mlp#85). Moving forward, we'll rely on TLS to secure the secrets while in transit. This PR updates the MLP client used by Merlin and removes the decryption process when retrieving a secret from MLP. **Which issue(s) this PR fixes**: <!-- *Automatically closes linked issue when PR is merged. Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`. --> **Does this PR introduce a user-facing change?**: <!-- If no, just write "NONE" in the release-note block below. If yes, a release note is required. Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required". For more information about release notes, see kubernetes' guide here: http://git.k8s.io/community/contributors/guide/release-notes.md --> ```release-note ``` **Checklist** - [x] Tested in dev environment with MLP version caraml-dev/mlp#85 - [N.A.] Added unit test, integration, and/or e2e tests - [N.A.] Updated documentation - [N.A.] Update Swagger spec if the PR introduce API changes - [N.A.] Regenerated Golang and Python client if the PR introduce API changes --------- Co-authored-by: Pradithya Aria <pradithya.pura@go-jek.com>
The PR implements the ability for storing secrets in external storage.
The main changes are as follows:
Add Secret Storage Resource
Secret Storage is a resource representing the abstraction for storing secrets. There are 2 types of secret storage implemented:
internal
andvault
. Aninternal
secret storage will store its secret values in thedata
column of thesecrets
table. On the other hand,vault
secret storage will not populate the column, but instead, store the secret in the corresponding vault instance specified in theVaultConfig
.Allow Users to Choose Secret Storage when Creating Secrets
When creating a secret, users can choose the secret storage to be used. If the secret storage is not specified, it will be stored in the default secret storage that's being configured in the MLP deployment.
Note that secret migration is handled and will be triggered if the secret storage is modified.
Screen.Recording.2023-05-24.at.10.27.35.PM.mov
Secret Migration from Previous MLP API Version
Existing secrets will be migrated to the
internal
secret storage during the DB migration. To migrate to different secret storage we can send updated secret and specify the new secret storage.Breaking Changes 🔥
Previous secret APIs implementation encrypts secret data during transfer and when storing it in DB. This behavior is removed and we'll rely on TLS to secure the secret transmission. In order to handle this we'll have to decrypt all the secrets and update the secret value when performing the migration to new secret storage.
Minor Improvements
make it-test-api
for both testing in CI and locally.make local-env
to setup all necessary local dependenciesstorage
package torepository
so that it won't get confused with Secret Storagevault
code for retrieving cluster secrets