-
Notifications
You must be signed in to change notification settings - Fork 39
feat(cli): Unsafe update key cli #3733
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
Merged
Merged
Changes from 10 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
cac768e
feat(policy): Add UnsafeUpdateKey rpc.
c-r33d 0307fa6
feat(policy): allow unsafe key provider config updates
c-r33d 3f22b8a
feat(policy): validate unsafe key provider config id
c-r33d 5d7bedc
feat(policy): Add UnsafeUpdateKey rpc.
c-r33d c4e4b75
add integration tests.
c-r33d a253c3a
fix(policy): enforce unsafe key provider rules in service
c-r33d 3903990
fix(proto): relax unsafe key provider validation
c-r33d e432d74
Merge branch 'unsafe-update-key' into unsafe-update-key-impl
c-r33d f0db524
feat(cli): Add unsafe update key command.
c-r33d a0f3669
feat(cli): proper req validation should be done by server.
c-r33d 6c584a2
change to just confirmation.
c-r33d b226894
Merge branch 'main' into unsafe-update-key-impl
c-r33d ded9cd8
comments.
c-r33d c67f8f8
fix linting.
c-r33d 79469b6
coderabbit commnet.
c-r33d 0955d4f
fix unsafe test.
c-r33d 654c6f1
update proto/sdk.
c-r33d e411e42
Merge branch 'unsafe-update-key-impl' into unsafe-update-key-cli
c-r33d 7a7f7d4
Merge branch 'main' into unsafe-update-key-cli
c-r33d b4f9ac2
update proto/sdk.
c-r33d 55ac863
Merge branch 'main' into unsafe-update-key-cli
c-r33d c6b4792
update.
c-r33d d97cf47
remove change.
c-r33d bed77cb
fix.
c-r33d File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| --- | ||
| title: Unsafely update a key | ||
| command: | ||
| name: update | ||
| flags: | ||
| - name: id | ||
| shorthand: i | ||
| description: System-given ID of the key to update. | ||
| required: true | ||
| - name: mode | ||
| shorthand: m | ||
| description: Target key mode. Only "remote" and "public_key" are supported. | ||
| - name: provider-config-id | ||
| shorthand: p | ||
| description: Configuration ID for the key provider. Required when changing to "remote" mode, or when updating only the provider configuration for an existing remote key. | ||
| --- | ||
|
|
||
| # Unsafe Update Warning | ||
|
|
||
| Updating a key in place is a dangerous support operation. It can retroactively change decryptability for existing TDFs. | ||
|
|
||
| This command is limited to switching a key between `remote` and `public_key` modes, or updating the provider configuration | ||
| for an existing `remote` key. The key ID, KAS URI, and public key are preserved. | ||
|
|
||
| Make sure you know what you are doing. | ||
|
|
||
| ## Examples | ||
|
|
||
| Change a public key-only key to remote mode: | ||
|
c-r33d marked this conversation as resolved.
Outdated
|
||
|
|
||
| ```shell | ||
| otdfctl policy kas-registry key unsafe update --id 3c51a593-cbf8-419d-b7dc-b656d0bedfbb --mode remote --provider-config-id 298c9446-ef71-49eb-a6ef-960149095a76 | ||
| ``` | ||
|
|
||
| Change a remote key to public key-only mode: | ||
|
c-r33d marked this conversation as resolved.
Outdated
|
||
|
|
||
| ```shell | ||
| otdfctl policy kas-registry key unsafe update --id 3c51a593-cbf8-419d-b7dc-b656d0bedfbb --mode public_key | ||
| ``` | ||
|
|
||
| Update only the provider configuration for an existing remote key: | ||
|
|
||
| ```shell | ||
| otdfctl policy kas-registry key unsafe update --id 3c51a593-cbf8-419d-b7dc-b656d0bedfbb --provider-config-id 298c9446-ef71-49eb-a6ef-960149095a76 | ||
| ``` | ||
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.