Skip to content
This repository was archived by the owner on Jul 11, 2023. It is now read-only.

Conversation

jaellio
Copy link
Contributor

@jaellio jaellio commented May 11, 2022

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:

  • CI

Affected area:

Functional Area
Certificate Management [x]

Please answer the following questions with yes/no.

  1. Does this change contain code from or inspired by another project?

    • Did you notify the maintainers and provide attribution?
  2. Is this a breaking change?

  3. Has documentation corresponding to this change been updated in the osm-docs repo (if applicable)?

@jaellio jaellio marked this pull request as ready for review May 12, 2022 17:56
@jaellio jaellio marked this pull request as draft May 13, 2022 17:54
@jaellio jaellio force-pushed the addSecretRef branch 3 times, most recently from f81df75 to cf27689 Compare May 13, 2022 22:31
@jaellio jaellio marked this pull request as ready for review May 13, 2022 22:31
@@ -128,7 +133,7 @@ func (c *MRCProviderGenerator) getHashiVaultOSMCertificateManager(mrc *v1alpha2.
vaultAddr := fmt.Sprintf("%s://%s:%d", provider.Protocol, provider.Host, provider.Port)
Copy link
Contributor

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

Copy link
Contributor Author

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.

Copy link
Contributor Author

@jaellio jaellio May 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a TODO

@jaellio jaellio force-pushed the addSecretRef branch 2 times, most recently from 630a6b6 to c5dcb74 Compare May 18, 2022 17:59
jaellio added 5 commits May 18, 2022 11:01
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>
@jaellio jaellio merged commit 855776a into openservicemesh:main May 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants