tektoncd / chains

Supply Chain Security in Tekton Pipelines
Apache License 2.0
245 stars 126 forks source link

Read KMS Auth token from filepath #1158

Closed anithapriyanatarajan closed 1 month ago

anithapriyanatarajan commented 1 month ago

Changes

Support for retrieving KMS provider Auth token from mount path configured with the new key signers.kms.auth.token-dir in configMap chains-config.

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

Release Notes

Chains now supports extracting the KMS provider auth token (e.g., `VAULT_TOKEN`) from a specified filepath. 
Instead of using the configMap key `signers.kms.auth.token`, you can now use `signers.kms.auth.token-dir` pointing to a valid filepath within the container (e.g., `/etc/kms-secrets`).

### Steps to Utilize This Feature:
- Create a secret with the key name `KMS_AUTH_TOKEN`.
- Update the Chains deployment specification to volume mount this secret. 

**Note:** To project the latest token values without needing to recreate the pod, avoid using `subPath`.
tekton-robot commented 1 month ago

Hi @anithapriyanatarajan. Thanks for your PR.

I'm waiting for a tektoncd 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](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
PuneetPunamiya commented 1 month ago

/ok-to-test

tekton-robot commented 1 month ago

The following is the coverage report on the affected files. Say /test pull-tekton-chains-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/chains/signing/kms/kms.go 51.2% 57.6% 6.4
tekton-robot commented 1 month ago

The following is the coverage report on the affected files. Say /test pull-tekton-chains-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/chains/signing/kms/kms.go 51.2% 57.6% 6.4
PuneetPunamiya commented 1 month ago

/test pull-tekton-chains-unit-tests

tekton-robot commented 1 month ago

The following is the coverage report on the affected files. Say /test pull-tekton-chains-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/chains/signing/kms/kms.go 51.2% 55.6% 4.3
tekton-robot commented 1 month ago

The following is the coverage report on the affected files. Say /test pull-tekton-chains-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/chains/signing/kms/kms.go 51.2% 55.6% 4.3
anithapriyanatarajan commented 1 month ago

/test pull-tekton-chains-integration-tests

tekton-robot commented 1 month ago

The following is the coverage report on the affected files. Say /test pull-tekton-chains-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/chains/signing/kms/kms.go 51.2% 55.6% 4.3
tekton-robot commented 1 month ago

The following is the coverage report on the affected files. Say /test pull-tekton-chains-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/chains/signing/kms/kms.go 51.2% 55.6% 4.3
pkg/chains/storage/docdb/docdb.go 76.0% 73.6% -2.5
tekton-robot commented 1 month ago

The following is the coverage report on the affected files. Say /test pull-tekton-chains-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/chains/signing/kms/kms.go 51.2% 55.6% 4.3
pkg/chains/storage/docdb/docdb.go 76.0% 73.6% -2.5
anithapriyanatarajan commented 1 month ago

/test pull-tekton-chains-unit-tests

anithapriyanatarajan commented 1 month ago

/test pull-tekton-chains-unit-tests

anithapriyanatarajan commented 1 month ago

/test pull-tekton-chains-unit-tests

tekton-robot commented 1 month ago

The following is the coverage report on the affected files. Say /test pull-tekton-chains-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/chains/signing/kms/kms.go 51.2% 55.6% 4.3
tekton-robot commented 1 month ago

The following is the coverage report on the affected files. Say /test pull-tekton-chains-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/chains/signing/kms/kms.go 51.2% 55.6% 4.3
tekton-robot commented 1 month ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lcarva

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: - ~~[OWNERS](https://github.com/tektoncd/chains/blob/main/OWNERS)~~ [lcarva] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
tekton-robot commented 1 month ago

The following is the coverage report on the affected files. Say /test pull-tekton-chains-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/chains/signing/kms/kms.go 51.2% 55.6% 4.3
pkg/chains/storage/docdb/docdb.go 76.0% 73.6% -2.5
anithapriyanatarajan commented 1 month ago

/test pull-tekton-chains-unit-tests

anithapriyanatarajan commented 1 month ago

/retest

anithapriyanatarajan commented 1 month ago

/test pull-tekton-chains-integration-tests

lcarva commented 1 month ago

/lgtm