-
Notifications
You must be signed in to change notification settings - Fork 3
Proposals of semantics for Secrets & Tags in Azure KeyVault #6
base: main
Are you sure you want to change the base?
Conversation
Hey, first of all thank you for taking the time for writing a detailed write-up! I took a closer look at the docs and found that Azure KV allows a user to store three different kinds of
I think it is important to make it explicit which I'd propose a similar semantic here, too: apiVerson: external-secrets.io/v1alpha1
kind: SecretStore # or ClusterSecretStore
metadata:
name: azure
spec:
provider:
# renamed this from `azurekv` to make it more generic
azure:
# same as in the curren spec including tenantId etc.
auth: {}
# we might want to add other services later on that use the same auth struct from above
# e.g. for azure AppConfiguration
keyVault:
vaultUri: https://my-vault09.vault.azure.net/
objectType: Secret # or Key or Certificate
Once it's clear what object-type to fetch we can do the bit of ✨ to extract cert bundles, properties etc. |
Co-authored-by: Markus Maga <[email protected]>
Thanks @moolen for the suggestion & thanks for the link to the JWK doc. The Azure Secret type (TLS/ other) is not per Key Vault, but really per Secret, so putting this attribute in the
Consequently, property Here is an updated proposal: - secretKey: tls.cert
# The reference to the certificate bundle in Azure Secret
remoteRef:
# The Azure Secret object name
key: a-tls-secret-azure-name
# How much of the secret bundle we want to get: one of "tls.key" | "tls.cert" | "none" (default, keep everything)
extract: tls.key Hopefully, this is getting closer to the AWS implementation, although this other one gives extraction instructions at SecretStore level. |
Hey, i think we have a misunderstanding here (naming is really hard!): Azure KV lets you store three different kinds of objects: Key, Secret and Certificate:
The names of these objects can collide: you can have a When designing the CRD (ExternalSecret and/or SecretStore) we need to be explicit what kind of object we want to fetch: secret, key or certificate - because these are three different API calls. |
Hi @moolen
|
@ahmedmus21 i agree on the second point / the certificate! About the |
yes you are correct , when I checked the first time , I checked the duplication between secrets and certificates and i didn't look into the keys. may be because the implementation suggested here was assuming the keys are shipped within the certificate object and not a separate object |
How should we proceed with the Store Spec? What do you think, should we (1) put the (1) put object-type at store level
apiVerson: external-secrets.io/v1alpha1
kind: SecretStore # or ClusterSecretStore
metadata:
name: azure
spec:
provider:
# renamed this from `azurekv` to make it more generic
azure:
# same as in the curren spec including tenantId etc.
auth: {}
# we might want to add other services later on that use the same auth struct from above
# e.g. for azure AppConfiguration
keyVault:
vaultUri: https://my-vault09.vault.azure.net/
objectType: Secret # or Key or Certificate (2) use prefix to signify the object-type
# the store is generic and doesn't care about the object type
# this way a user wouldn't need different `SecretStores` to access diferent object-types
- secretKey: foo
remoteRef:
key: secret/some-secret # use .GetSecret() call
- secretKey: bar
remoteRef:
key: key/my-key # .GetKey() to fetch jwks
# same for certificate The pkcs12 key/cert extraction part is generic enough to put that functionality into the template. I would consider this as out of scope for the azure kv provider. For that particular use-case i prototyped a proposal here: external-secrets/external-secrets#69: data:
key: "{{ .secret | pkcs12key | pemPrivateKey }}"
cert: "{{ .secret | pkcs12cert | pemCertificate }}" There's still a bit of stuff missing to handle jwks, rsa, x509, ecdsa etc. |
Sorry for not being active the last couple of weeks . IMO , I'd prefer going with solution 2 . The object type is more a feature related to the secret itself and not to the back end. I like the proposal of implementing the certificate/keys extraction and decoding in the template implementation . based on that , I will remove the certificate management code from here external-secrets/22 and let the operator return only the raw data. |
Proposed CRD spec detailled explanation for Azure to feed the discussion in #4