Skip to content

fix: Set the issuer in generated TLS certificates to the subject of the issuing certificate #566

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

Merged
merged 3 commits into from
Mar 6, 2025

Conversation

siegfriedweber
Copy link
Member

@siegfriedweber siegfriedweber commented Feb 28, 2025

Description

If a root CA is used to sign an intermediate CA, which in turn is then used by the secret operator to sign generated TLS certificates, then the verification of the generated certificates fails:

$ openssl verify -trusted root_ca.crt -untrusted intermediate_ca.crt tls.crt
CN=generated certificate for pod
error 20 at 0 depth lookup: unable to get local issuer certificate
error tls.crt: verification failed

It fails because the issuer of the certificate is set to the issuer of the intermediate CA instead of its subject. Subjects and issuers must build a chain from the root CA to the end-entity certificate.

After applying this fix, the verification works:

$ openssl verify -trusted root_ca.crt -untrusted intermediate_ca.crt tls.crt
tls.crt: OK

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

Preview Give feedback

Reviewer

Preview Give feedback

Acceptance

Preview Give feedback

Copy link
Member

@nightkr nightkr left a comment

Choose a reason for hiding this comment

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

Oops - good catch.

@siegfriedweber siegfriedweber added this pull request to the merge queue Mar 6, 2025
@siegfriedweber siegfriedweber moved this from Development: Waiting for Review to Development: Done in Stackable Engineering Mar 6, 2025
Merged via the queue into main with commit 0f2b84a Mar 6, 2025
17 checks passed
@siegfriedweber siegfriedweber deleted the fix/tls-cert-issuer branch March 6, 2025 15:39
@lfrancke
Copy link
Member

lfrancke commented Mar 20, 2025

Could you add a release note snippet for this?

We suggest the form "Previously, 'this went wrong'. With this release, 'this was fixed in the following way'."

@lfrancke lfrancke moved this from Development: Done to Acceptance: In Progress in Stackable Engineering Mar 20, 2025
@siegfriedweber
Copy link
Member Author

Release Notes

Platform improvements

Bug fixes

  • Previously, TLS certificates generated by the secret operator referenced a wrong issuer if the secret operator used an intermediate CA. With this release, the issuer of the generated TLS certificate is correct and using an intermediate CA in the secret operator works.

@siegfriedweber siegfriedweber added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Apr 1, 2025
@lfrancke lfrancke moved this from Acceptance: In Progress to Done in Stackable Engineering Apr 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-request release/25.3.0 release-note Denotes a PR that will be considered when it comes time to generate release notes. type/bug
Projects
Development

Successfully merging this pull request may close these issues.

3 participants