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 support for disabled_validations to the PKI CMPv2 config resource #2412

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

victorr
Copy link
Contributor

@victorr victorr commented Feb 24, 2025

Description

Add support for disabled_validations to the PKI CMPv2 config resource.

Checklist

  • Added CHANGELOG entry (only for user-facing changes)
  • Acceptance tests where run against all supported Vault Versions

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccXXX'

...

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" comments, they generate extra noise for pull request followers and do not help prioritize the request

@victorr victorr requested review from kitography and a team February 24, 2025 20:17
@victorr victorr self-assigned this Feb 24, 2025
@victorr victorr requested a review from a team as a code owner February 24, 2025 20:17
@victorr victorr force-pushed the victorr/vault-34203-pki-cmpv2-optional-verifications branch from 2bc5562 to efa5c94 Compare February 24, 2025 20:20
@victorr victorr force-pushed the victorr/vault-34203-pki-cmpv2-optional-verifications branch from efa5c94 to 268438e Compare February 24, 2025 21:45
Copy link

@kitography kitography left a comment

Choose a reason for hiding this comment

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

Looks good - I'd love another set of eyes since I haven't added one of these fields before (and I don't know, eg. how CHANGELOG works). Added a couple confused comments.

@@ -63,6 +63,15 @@ func pkiSecretBackendConfigCMPV2DataSource() *schema.Resource {
Type: schema.TypeString,
},
},
consts.FieldDisabledValidations: {

Choose a reason for hiding this comment

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

Every other field seems to have a "computed" line - why not this one? How is this different than AuditFields in that sense? I'm also not really sure how optional works here? Most of these don't have that listed.

Copy link
Contributor

Choose a reason for hiding this comment

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

The computed argument is mainly used when a value is returned from the server when no initial value from Terraform itself was provided. In this case since I believe the value returned will be an empty list it isn't required.

Optional only means the field does not need to be specified within the resource block

* `audit_fields` - (Optional) Fields parsed from the CSR that appear in the audit and can be used by sentinel policies.

* `disabled_validations` - (Optional) A comma-separated list of validations not to perform on CMPv2 messages.

Choose a reason for hiding this comment

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

Might be nice to mention what the (current) supported options are.

Copy link
Contributor

Choose a reason for hiding this comment

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

I believe the norm isn't to specify a list here as it can fall out of sync with the server side of things, especially across revisions.

Its the same reasoning the TFVP team have shied away from enforcing the valid values on the input schema as it causes end-user friction that we need to update and publish a new TFVP version every time something on the server changes

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