-
Notifications
You must be signed in to change notification settings - Fork 193
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
KeyVault Documentation #3400
Merged
Merged
KeyVault Documentation #3400
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
0cb9ffc
Initial draft docs for KeyVaults
theunrepentantgeek b8ce422
Add to index page
theunrepentantgeek d4c8ccd
Merge branch 'main' into doc/keyvaults
theunrepentantgeek 7ce8103
Merge branch 'main' into doc/keyvaults
theunrepentantgeek 266e644
Merge branch 'main' into doc/keyvaults
theunrepentantgeek 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
This file contains 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 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,42 @@ | ||
--- | ||
title: "KeyVaults" | ||
linktitle: "KeyVaults" | ||
--- | ||
|
||
The standard options for `createMode` when creating a new KeyVault assume you know whether there is an existing soft-deleted KeyVault already present. | ||
|
||
* `default` - create a new KeyVault. Deployment will fail if an existing soft-deleted KeyVault has the same name. | ||
* `recover` - recover an existing soft-deleted KeyVault. Deployment will fail if no soft-deleted KeyVault is found. | ||
|
||
These options works perfectly well when deploying via ARM or Bicep as those deployments are single use. | ||
|
||
However, with a goal seeking system that expects to maintain resources over time, these options don't work so well (see _Motivation_, below), so in Azure Service Operator (ASO) v2.4.0 we are introducing two additional options: | ||
|
||
* `createOrRecover` - create a new key KeyVault. If an existing soft-deleted KeyVault has the same name, recover and reuse it. | ||
|
||
* `purgeThenCreate` - If an existing soft-deleted KeyVault has the same name, purge it first; then create a brand new one. **Dangerous** | ||
|
||
{{% alert title="Warning" color="warning" %}} | ||
Purging a KeyVault is a permanent action from which there is no recovery. | ||
{{% /alert %}} | ||
|
||
## Motivation | ||
|
||
One of the core value propositions of ASO is its active management of the deployed resources. If they drift from the desired configuration, ASO will act to bring them back into the required state. | ||
|
||
KeyVaults are a key piece of infrastructure, containing secrets and credentials required for an application to operate. If a KeyVault is deleted (whether accidentally, or maliciously), it's desirable for ASO to be able to automatically recover so that normal operation of the application can be restored. These new options for `createMode` allow that to happen. | ||
|
||
## Recommendations | ||
|
||
For a **production** KeyVault (one where you care very much about the contents of the KeyVault being retained), use `createOrRecover`. Consider also setting `enablePurgeProtection` to **true** (preventing a malicious actor from nuking your secrets), and setting `enableSoftDelete` to **true** (while this is the default, signalling your intent may be desirable). | ||
|
||
For a **test** or **staging** KeyVault (one where you're testing deployment and do not care about preserving the secrets within the KeyVault), use `purgeThenCreate`. For the purge to work, you'll need to grant ASO additional permissions. | ||
|
||
{{% alert title="Warning" color="warning" %}} | ||
Configuring an ASO KeyVault with `purgeThenCreate` will result in any _soft-delete_ action being swiftly promoted to a non-recoverable _hard-delete_. Do not do this with any KeyVault containing valuable secrets. | ||
{{% /alert %}} | ||
|
||
|
||
## Further Reading | ||
|
||
* [Azure Key Vault soft-delete overview](https://learn.microsoft.com/en-us/azure/key-vault/general/soft-delete-overview) |
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.
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.
I'd suggest to elaborate more about the
danger
here and remove DangerousThere 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.
There's elaboration about the dangers in the next paragraph. I've made that more explicit.