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

Add Authority Key Identifier to locally signed certificate #66

Closed
wants to merge 1 commit into from

Conversation

Q69K
Copy link

@Q69K Q69K commented Dec 10, 2019

No description provided.

@ghost ghost added the size/M label Dec 10, 2019
@hashicorp-cla
Copy link

hashicorp-cla commented Nov 22, 2020

CLA assistant check

Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement

Learn more about why HashiCorp requires a CLA and what the CLA includes


Alex Hasselbach seems not to be a GitHub user.
You need a GitHub account to be able to sign the CLA. If you already have a GitHub account, please add the email address used for this commit to your account.

Have you signed the CLA already but the status is still pending? Recheck it.

Base automatically changed from master to main February 1, 2021 17:28
@iosifnicolae2
Copy link

Any news on this functionality?

@karelorigin
Copy link

Encountered this issue when trying to import a Terraform generated CA intermediate into Vault. It's been open for years, would be nice if we could get this merged :)

Looks like the PR author still needs to sign the CLA agreement. CC: @Q69K

@irigon
Copy link

irigon commented Apr 15, 2022

Found this issue, as some certificates stop working as we updated the OpenSSL version.
When both CA and server CSR have the same subject, the field Key Identifier is omitted in the certificate.
After OpenSSL 1.1.1k (I am testing with 1.1.1n), additional checks seem to be merged resulting in an SSL error: "error 18 at 0 depth lookup: self signed certificate".
As a workaround for the ones having the same issue while it is not fixed, changing the CN on the server certificate CSR or adding additional fields to the subject was enough to cause the X509v3 Authority Key Identifier field to the added to the certificate.

@detro detro modified the milestones: next.major, next.minor Apr 28, 2022
@detro
Copy link
Contributor

detro commented May 13, 2022

Hello and thanks for the contribution.

Because no example was provided to reproduce this, I have tested it and found that, for tls_locally_signed_cert, if the provided CA carries a value for SubjectKeyId, than the underlying x509.CreateCertificate function will indeed populate the AuthorityKeyIdentifier (please see here).

Additionally, local testing where I tried to reproduce, showed that the behaviour is what the x509 library correctly does.

This is NOT the case for tls_self_signed_cert, where in the current implementation the AuthorityKeyIdentifier is indeed not set (as reported in #56).

As I started working on this together with #56, I'll have a PR incoming that will close both.
But I just wanted to emphasize that the issue reported here lies in the provided CA to the tls_locally_signed_cert resource, not the resource itself.

Thank you.

Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants