Fix naming of permitted_dns_domains in webui (#16739)

* Fix naming of permitted_dns_domains in webui

PKI has consistently used permitted_dns_domains since it was originally
introduced as a parameter. However, it appears the Web UI was updated to
add this field, but used an incorrect internal identifier
(permittedDnsNames rather than permittedDnsDomains).

This triggers a warning from the backend about an unknown parameter, and
the domain restriction isn't added:

> Endpoint ignored these unrecognized parameters: [permitted_dns_names]

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Add changelog

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
This commit is contained in:
Alexander Scheel 2022-08-16 15:57:05 -04:00 committed by GitHub
parent 2cdfce9967
commit dc4965f27d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 4 deletions

3
changelog/16739.txt Normal file
View File

@ -0,0 +1,3 @@
```release-note:bug
ui: Fix naming of permitted_dns_domains form parameter on CA creation (root generation and sign intermediate).
```

View File

@ -14,7 +14,7 @@ export default Certificate.extend({
maxPathLength: attr('number', { maxPathLength: attr('number', {
defaultValue: -1, defaultValue: -1,
}), }),
permittedDnsNames: attr('string', { permittedDnsDomains: attr('string', {
label: 'Permitted DNS domains', label: 'Permitted DNS domains',
}), }),
ou: attr({ ou: attr({
@ -51,7 +51,7 @@ export default Certificate.extend({
'ttl', 'ttl',
'excludeCnFromSans', 'excludeCnFromSans',
'maxPathLength', 'maxPathLength',
'permittedDnsNames', 'permittedDnsDomains',
'ou', 'ou',
'organization', 'organization',
'otherSans', 'otherSans',

View File

@ -63,7 +63,7 @@ export default Certificate.extend({
label: 'PEM bundle', label: 'PEM bundle',
editType: 'file', editType: 'file',
}), }),
permittedDnsNames: attr('string', { permittedDnsDomains: attr('string', {
label: 'Permitted DNS domains', label: 'Permitted DNS domains',
}), }),
privateKeyFormat: attr('string', { privateKeyFormat: attr('string', {
@ -117,7 +117,7 @@ export default Certificate.extend({
'keyType', 'keyType',
'keyBits', 'keyBits',
'maxPathLength', 'maxPathLength',
'permittedDnsNames', 'permittedDnsDomains',
'excludeCnFromSans', 'excludeCnFromSans',
'ou', 'ou',
'organization', 'organization',