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 multi-issuer support to PKI Intermediate resources #1865

Conversation

vinay-gopalan
Copy link
Contributor

This PR adds multi-issuer support to the PKI intermediate and sign resources.

Main changes:

  • Updates Generate Intermediate to write/read key material
  • Updates Root Sign Intermediate resource to support issuer_ref
  • Updates PKI Sign and Cert resource to support issuer_ref

Additional changes:

  • Updates PKI resources w/ constants and modern format

Tests and documentation included

@vinay-gopalan vinay-gopalan changed the title Vault 15846/update intermediate resources Add multi-issuer support to PKI Intermediate resources May 17, 2023
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttr(resourceName, "backend", intermediatePath),
resource.TestCheckResourceAttr(resourceName, "common_name", "cert.test.my.domain"),
testValidateCSR(resourceName),
),
},
{
SkipFunc: func() (bool, error) {
Copy link
Contributor Author

@vinay-gopalan vinay-gopalan May 17, 2023

Choose a reason for hiding this comment

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

This test will be pulled into its own test in a follow-up PR since Root Issuers need to be imported into the Intermediate mount for the full workflow. It will be better to isolate the test steps into their own test when the import bit is added in. Going to leave this in for this PR to demonstrate that the field is working as expected

An additional test will also be added in for vault/resource_pki_secret_backend_cert_test.go for the same use-case.

@vinay-gopalan vinay-gopalan requested a review from a team May 17, 2023 21:02
Copy link
Contributor

@fairclothjm fairclothjm left a comment

Choose a reason for hiding this comment

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

LGTM!

@vinay-gopalan vinay-gopalan merged commit 4af7644 into VAULT-5960/pki-multi-issuer May 31, 2023
@vinay-gopalan vinay-gopalan deleted the VAULT-15846/update-intermediate-resources branch May 31, 2023 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants