This repository was archived by the owner on Jul 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 274
ref(certs): use secretRef for Vault token in MRC #4736
Merged
Merged
Conversation
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
f81df75
to
cf27689
Compare
30 tasks
steeling
suggested changes
May 16, 2022
@@ -128,7 +133,7 @@ func (c *MRCProviderGenerator) getHashiVaultOSMCertificateManager(mrc *v1alpha2. | |||
vaultAddr := fmt.Sprintf("%s://%s:%d", provider.Protocol, provider.Host, provider.Port) |
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.
if c.VaultToken is empty, we should query the secret ref
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.
Agreed, I wasn't going to include querying the secret ref as a part of this change. I was focussing on updating the MRC CRD while also supporting the existing requirement to set the Vault token on install. I am happy to include this as a part of the change if you think that would make more sense.
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.
Added a TODO
630a6b6
to
c5dcb74
Compare
Updates the MeshRootCertifcate CRD to use secretRefs for the cert-manager and tresor CAs and the vault token. Signed-off-by: jaellio <jaellio@microsoft.com>
Signed-off-by: jaellio <jaellio@microsoft.com>
Signed-off-by: jaellio <jaellio@microsoft.com>
Signed-off-by: jaellio <jaellio@microsoft.com>
Signed-off-by: jaellio <jaellio@microsoft.com>
nojnhuh
approved these changes
May 18, 2022
shashankram
approved these changes
May 18, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description:
Updates the MeshRootCertifcate CRD to use secretRefs for the
Tresor CA and a secretKeyRef for the vault token. Currently, the
Vault token would be set as a string in the MeshRootCertificate.
The token needs to be stored securely and not inline in the MRC.
This change also implies that users will be able to reference secrets
containing the CA for Tresor in any namespace. Currently, the
kuberenetes secret (by default called osm-ca-bundle) is assumed
to be in the OSM control plane namespace. If we want to enforce
this, we could validate the MRC or only allow the secretRef's
name to be set and the namespace could be populated by OSM.
Testing done:
Affected area:
Please answer the following questions with yes/no.
Does this change contain code from or inspired by another project?
Is this a breaking change?
Has documentation corresponding to this change been updated in the osm-docs repo (if applicable)?