cert-manager icon indicating copy to clipboard operation
cert-manager copied to clipboard

Feature/5514 - Add SecretRef support for venafi TPP issuer CA Bundle

Open sankalp-at-gh opened this issue 1 year ago • 3 comments

Pull Request Motivation

To address issue #5514 so that we would no longer need to pass long CA Bundles but could just have a reference to a secret or configmap having the bundle. Having support for secret ref will also allow reading CAs distributed by trust-manager

As per below example, any of one of the fields caBundle or caBundleSecretRef would be supported to read the CA bundle

spec:
  venafi:
    tpp:
      caBundle: <B64_ENCODED_STRING>
      caBundleSecretRef:
        name: <>
        key: <>
      credentialsRef:
        name: tpp-token
      url: https://my-server.com/vedsdk/
    zone: Certificates\public

All of the controllers, testcases and rbac have been updated to support this functionality

Kind

feature

Release Note

Add SecretRef support for venafi TPP issuer CA Bundle

sankalp-at-gh avatar May 16 '24 13:05 sankalp-at-gh

Hi @sankalp-at-gh. Thanks for your PR.

I'm waiting for a cert-manager member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

cert-manager-prow[bot] avatar May 16 '24 13:05 cert-manager-prow[bot]

Thanks for the quick review 🙂 Sure, I'll wait for a thorough review and comments if any

sankalp-at-gh avatar May 17 '24 14:05 sankalp-at-gh

Hi @erikgb !

When you get some time, could you please review this PR as discussed in slack. It has been quiet some time since the PR and I hope the changes have not diverged much. Thanks ! 🙂

sankalp-at-gh avatar Jun 10 '24 09:06 sankalp-at-gh

Can someone else help with review the Go implementation?

maelvls avatar Jun 13 '24 16:06 maelvls

/ok-to-test

inteon avatar Jun 13 '24 16:06 inteon

@sankalp-at-gh could you resolve the following error?:

pkg/issuer/venafi/client/venaficlient.go:143:13: ineffectual assignment to err (ineffassign)
		caBundle, err := caBundleForVcertTPP(tpp, secretsLister, namespace)

source: https://storage.googleapis.com/cert-manager-prow-artifacts/pr-logs/pull/cert-manager_cert-manager/7036/pull-cert-manager-master-make-verify/1801294520554360832/build-log.txt

inteon avatar Jun 17 '24 07:06 inteon

@sankalp-at-gh could you resolve the following error?:

pkg/issuer/venafi/client/venaficlient.go:143:13: ineffectual assignment to err (ineffassign)
		caBundle, err := caBundleForVcertTPP(tpp, secretsLister, namespace)

source: https://storage.googleapis.com/cert-manager-prow-artifacts/pr-logs/pull/cert-manager_cert-manager/7036/pull-cert-manager-master-make-verify/1801294520554360832/build-log.txt

Hi @inteon, just updated the pull to process the error, glad that the linter found it. All of the checks are now passing. Could you please check and merge the PR if it looks good to go, thanks !

sankalp-at-gh avatar Jun 17 '24 18:06 sankalp-at-gh

I'm planning to open a PR for related documentation updates in couple of days.

sankalp-at-gh avatar Jun 17 '24 18:06 sankalp-at-gh

Hi @inteon, the lint error has been fixed, would it be possible for you to approve/merge this feature https://github.com/cert-manager/website/pull/1507/ is the PR I've created for documentation update corresponding to these changes.

sankalp-at-gh avatar Jun 24 '24 11:06 sankalp-at-gh

Thank you for this feature @sankalp-at-gh. /approve /lgtm

inteon avatar Jun 24 '24 11:06 inteon

/kind feature

inteon avatar Jun 24 '24 12:06 inteon

/approve

inteon avatar Jun 24 '24 12:06 inteon

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: inteon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

cert-manager-prow[bot] avatar Jun 24 '24 12:06 cert-manager-prow[bot]

/area venafi

maelvls avatar Jun 28 '24 08:06 maelvls