-
Notifications
You must be signed in to change notification settings - Fork 209
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
Determine plan for managing secrets #1471
Comments
ASO lets some services specify the Key Vault its credentials should be placed in. Also there is a global setting that lets all credentials be placed in a specified Key Vault. |
We probably need a holistic secrets/identity design - see the following for other secrets related issues or inconsistencies:
Some customers also want the ability to do a sort of a-b deployment where they swap resources between namespaces periodically (turning off reconciling in one). This isn't a problem for pure resources associated with no secrets, but for resources associated with secrets questions end up cropping up about how to get the secret from one namespace to another (since ASO created it) I think we want to get out of the world where we generate credentials or secrets in the users behalf. It makes some rollover scenarios harder and means we need to be really sure we're generating cryptographically secure credentials. Inevitably some organization will have a more stringent key-length or password strength requirement than we're complying to. Instead we might want to investigate: For places where we generate usernames and/or passwords today (example: MySQL, AzureSQL, etc): Put the username in the spec, and the password as a linked Kubernetes (optionally KV?) secret. For places where Azure generates the secret and returns it only on create (example: Storage): Continue doing what we're doing? To make this work with "swap" scenarios we may need to have some logic to go get the keys again if we can't find them. For places where Azure generates the secret one time and it cannot be retrieved later: Unsure - we can do the same as we're doing now but it doesn't easily support migration between namespace scenarios because the new namespace won't have the secret. We may need to do some thinking on this. |
A number of resources we're already code generating have various kinds of secrets. These secrets need to be exposed in a secure fashion that also allows the resources to be used. Here are a few examples:
|
Worth looking into https://akv2k8s.io/ and secret store CSI driver |
I have been experimenting with ASO v2 and quickly ran into this issue. While shared keys proabably has its audience, I believe it´s mostly from the lack And I don´t agree with the premise that shared keys for accessing Azure Keys can leak, they must be rotated regularly and they incur maintenance costs A more preferable method would in my opinion be the use of managed In summary being able to do the following via ASO ():
Basically using Pod Identity in a fully managed way to enable developers to I suppose this can be consider this a feature request :) |
@vidaks - Yes we agree. Using managed identity is overall much cleaner for a lot of scenarios. We still will need to figure out secrets support for cases where for whatever reason customers cannot use managed identity, but managed identity should probably be the default, or at least the heavily preferred option. |
#1828 is tracking the required managed identity support |
Once an ARM service has been created there are some which have keys or secrets associated with them.
For example, a storage account has storage keys, a Redis account has keys, etc. These keys need to be stored and access has to be given to the right users.
ASO historically had two approaches for this, originally storing secrets using Kubernetes secrets, and now optionally supports storing secrets in a KV instead (value for this is controlled via env variable):
AZURE_OPERATOR_KEYVAULT
Take a look at ASO rediscache_types.go for example:
The text was updated successfully, but these errors were encountered: