Skip to content

feat: Add the Pod's ServiceAccount as SPIFFE ID SAN to autoTls certificates - #784

Draft
sbernauer wants to merge 1 commit into
mainfrom
feat/serviceaccount-in-san
Draft

sbernauer wants to merge 1 commit into
mainfrom
feat/serviceaccount-in-san

Conversation

@sbernauer

Copy link
Copy Markdown
Member

Description

POC for https://github.com/stackabletech/decisions/issues/107, do not merge for now!

Every certificate issued by the autoTls backend now contains the Pod's ServiceAccount as a SPIFFE ID in a URI SAN:

spiffe://<cluster-domain>/ns/<namespace>/sa/<service-account>

This uses the same format as Istio. The Kubernetes cluster domain is used as the trust domain, lowercased and without a trailing dot. If the Pod has no ServiceAccount name, no URI SAN is added.

The SAN is added regardless of the requested scopes, so certificates without any scope now have a SAN extension as well. The cert-manager backend is unchanged, as ACME issuers don't support URI SANs.

Definition of Done Checklist

  • Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant
  • Please make sure all these things are done and tick the boxes

Author

  • Changes are OpenShift compatible
  • CRD changes approved
  • CRD documentation for all fields, following the style guide.
  • Helm chart can be installed and deployed operator works
  • Integration tests passed (for non trivial changes)
  • Changes need to be "offline" compatible
  • Links to generated (nightly) docs added
  • Release note snippet added

Reviewer

  • Code contains useful comments
  • Code contains useful logging statements
  • (Integration-)Test cases added
  • Documentation added or updated. Follows the style guide.
  • Changelog updated
  • Cargo.toml only contains references to git tags (not specific commits or branches)

Acceptance

  • Feature Tracker has been updated
  • Proper release label has been added
  • Links to generated (nightly) docs added
  • Release note snippet added
  • Add type/deprecation label & add to the deprecation schedule
  • Add type/experimental label & add to the experimental features tracker

…icates

Every certificate issued by the autoTls backend now contains the Pod's
ServiceAccount as a SPIFFE ID in a URI SAN:

  spiffe://<cluster-domain>/ns/<namespace>/sa/<service-account>

This uses the same format as Istio. The Kubernetes cluster domain is used
as the trust domain, lowercased and without a trailing dot. If the Pod has
no ServiceAccount name, no URI SAN is added.

The SAN is added regardless of the requested scopes, so certificates
without any scope now have a SAN extension as well. The cert-manager
backend is unchanged, as ACME issuers don't support URI SANs.
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.

1 participant