Skip to content

Commit

Permalink
Disable testing of EST authenticator cert_role parameter
Browse files Browse the repository at this point in the history
 - Workaround not releasing 1.16.3 for the fix within hashicorp/vault-enterprise#5785
   by not setting the cert_role parameter within the cert authenticator definition
  • Loading branch information
stevendpclark committed May 28, 2024
1 parent cb70fec commit 2dc02f3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions vault/resource_pki_secret_backend_config_est_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ func TestAccPKISecretBackendConfigEst_AllFields(t *testing.T) {
resource.TestCheckResourceAttr(resourceBackend, consts.FieldAuthenticators+".0.%", "2"),
resource.TestCheckResourceAttr(resourceBackend, consts.FieldAuthenticators+".0.cert.%", "2"),
resource.TestCheckResourceAttr(resourceBackend, consts.FieldAuthenticators+".0.cert.accessor", "test"),
resource.TestCheckResourceAttr(resourceBackend, consts.FieldAuthenticators+".0.cert.cert_role", "a-role"),
// @TODO add these back in when Vault 1.16.3 is released (https://github.com/hashicorp/vault-enterprise/pull/5785)
// resource.TestCheckResourceAttr(resourceBackend, consts.FieldAuthenticators+".0.cert.cert_role", "a-role"),
resource.TestCheckResourceAttr(resourceBackend, consts.FieldAuthenticators+".0.userpass.%", "1"),
resource.TestCheckResourceAttr(resourceBackend, consts.FieldAuthenticators+".0.userpass.accessor", "test2"),
resource.TestCheckResourceAttr(resourceBackend, consts.FieldEnableSentinelParsing, "true"),
Expand All @@ -115,7 +116,8 @@ func TestAccPKISecretBackendConfigEst_AllFields(t *testing.T) {
resource.TestCheckResourceAttr(dataName, consts.FieldAuthenticators+".0.%", "2"),
resource.TestCheckResourceAttr(dataName, consts.FieldAuthenticators+".0.cert.%", "2"),
resource.TestCheckResourceAttr(dataName, consts.FieldAuthenticators+".0.cert.accessor", "test"),
resource.TestCheckResourceAttr(dataName, consts.FieldAuthenticators+".0.cert.cert_role", "a-role"),
// @TODO add these back in when Vault 1.16.3 is released (https://github.com/hashicorp/vault-enterprise/pull/5785)
// resource.TestCheckResourceAttr(dataName, consts.FieldAuthenticators+".0.cert.cert_role", "a-role"),
resource.TestCheckResourceAttr(dataName, consts.FieldAuthenticators+".0.userpass.%", "1"),
resource.TestCheckResourceAttr(dataName, consts.FieldAuthenticators+".0.userpass.accessor", "test2"),
resource.TestCheckResourceAttr(dataName, consts.FieldEnableSentinelParsing, "true"),
Expand Down Expand Up @@ -162,7 +164,9 @@ resource "vault_pki_secret_backend_config_est" "test" {
"test-label-2": format("role:%%s", vault_pki_secret_backend_role.est_role_2.name)
}
authenticators {
cert = { "accessor" = "test", "cert_role" = "a-role" }
# @TODO add these back in when Vault 1.16.3 is released (https://github.com/hashicorp/vault-enterprise/pull/5785)
# cert = { "accessor" = "test", "cert_role" = "a-role" }
cert = { "accessor" = "test", "cert_role" = "" }
userpass = { "accessor" = "test2" }
}
enable_sentinel_parsing = true
Expand Down

0 comments on commit 2dc02f3

Please sign in to comment.