Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fulcio: AWS KMS support #831

Merged
merged 2 commits into from
Sep 10, 2024
Merged

Conversation

sfox-equinix
Copy link
Contributor

@sfox-equinix sfox-equinix commented Sep 5, 2024

Description of the change

This commit adds support for AWS KMS keys to the fulcio chart. The following variables were added:

  • kmsType - The KMS type (e.g., aws)
  • awsKmsCredentialsSecretName - The name of an existing Kubernetes secret containing the IAM credentials to authenticate with AWS KMS
    • The secret should contain two key value pairs: accessKeyId and secretAccessKey
  • awsKmsRegion - The AWS region string where the KMS key is hosted

Users must set kmsType to the value aws in order to use this feature.

Existing or Associated Issue(s)

N/A

Additional Information

I tested these changes using a privately-hosted Sigstore instance. To use AWS KMS keys, users will need to supply the following changes via the values files:

  • Set kmsType to aws in values.yaml
  • Set certificateAuthority to a kmsca in values.yaml
  • Set kms_resource to a awskms:// string in values.yaml
  • Set kms_cert_chain to a PEM blob containing the signers certificate (should be the first certificate in the file), optionally followed by any parent certificates
  • Set awsKmsRegion to the desired region string in values.yaml
  • Create a Kubernetes secret containing the AWS IAM credentials. It should be named using the same string passed to the awsKmsCredentialsSecretName

Checklist

  • Chart version bumped in Chart.yaml according to semver. Where applicable, update and bump the versions in any associated umbrella chart
  • Variables are documented in the values.yaml and added to the README.md. The helm-docs utility can be used to generate the necessary content. Use helm-docs --dry-run to preview the content.
  • JSON Schema generated.
  • List tests pass for Chart using the Chart Testing tool and the ct lint command. (**Note: This fails for me with the error: Error loading configuration: 'chart_schema.yaml' neither specified nor found in default locations)

charts/fulcio/values.yaml Outdated Show resolved Hide resolved
charts/rekor/values.yaml Outdated Show resolved Hide resolved
Copy link
Contributor

@vipulagarwal vipulagarwal left a comment

Choose a reason for hiding this comment

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

LGTM

@bobcallaway
Copy link
Member

can we please split the changes out into two PRs (one for fulcio, one for rekor)? otherwise the release logic won't be happy.

Prior to this commit, the chart did not provide a way to supply
AWS credentials for AWS KMS. This commit adds support for AWS KMS
by allowing users to supply an AWS region ID and IAM credentials.

AWS KMS users must specify the "cloudPlatform" parameter with
a value of "aws" and specify "certificateAuthority" as "kmsca".
The chart will then look for a kubernetes secret named by the
"awsCredentialsSecret" parameter.

The AWS region ID can be supplied using the newly-added
"awsRegion" parameter.

Signed-off-by: Stephen Fox <[email protected]>
@sfox-equinix sfox-equinix changed the title fulcio and rekor: AWS KMS support fulcio: AWS KMS support Sep 6, 2024
@sfox-equinix
Copy link
Contributor Author

Hi @bobcallaway - I split the rekor changes out into this pull request: #832

I rebased the current pull request to be for fulcio only.

bobcallaway
bobcallaway previously approved these changes Sep 10, 2024
Copy link
Member

@bobcallaway bobcallaway left a comment

Choose a reason for hiding this comment

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

one spelling nit but LGTM

charts/fulcio/README.md Outdated Show resolved Hide resolved
ubernetes is the new kubernetes.

Co-authored-by: Bob Callaway <[email protected]>
Signed-off-by: sfox-equinix <[email protected]>
@bobcallaway bobcallaway merged commit 5178832 into sigstore:main Sep 10, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants