Skip to content

Commit

Permalink
backport of UI: update PKI attrs (#27389)
Browse files Browse the repository at this point in the history
Co-authored-by: Chelsea Shaw <[email protected]>
  • Loading branch information
1 parent f05ee83 commit 322b7f2
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 19 deletions.
19 changes: 17 additions & 2 deletions ui/tests/acceptance/open-api-path-help-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,15 @@ function secretEngineHelper(test, secretEngine) {
const helpUrl = model.getHelpUrl(this.backend);
const result = await this.pathHelp.getProps(helpUrl, this.backend);
const expected = engineData[modelName];
assert.deepEqual(result, expected, `getProps returns expected attributes for ${modelName}`);
// Expected values should be updated to match "actual" (result)
assert.deepEqual(
Object.keys(result),
Object.keys(expected),
`getProps returns expected attributes for ${modelName}`
);
Object.keys(expected).forEach((attrName) => {
assert.deepEqual(result[attrName], expected[attrName], `${attrName} attribute details match`);
});
});
});
}
Expand All @@ -94,7 +102,14 @@ function authEngineHelper(test, authBackend) {
const helpUrl = model.getHelpUrl(this.mount);
const result = await this.pathHelp.getProps(helpUrl, this.mount);
const expected = authData[itemName];
assert.deepEqual(result, expected, `getProps returns expected attributes for ${itemName}`);
assert.deepEqual(
Object.keys(result),
Object.keys(expected),
`getProps returns expected attributes for ${itemName}`
);
Object.keys(expected).forEach((attrName) => {
assert.propEqual(result[attrName], expected[attrName], `${attrName} attribute details match`);
});
});
} else {
test.skip(`generated-${itemName}-${authBackend} model`, async function (assert) {
Expand Down
34 changes: 17 additions & 17 deletions ui/tests/helpers/openapi/expected-secret-attrs.js
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,14 @@ const pki = {
label: 'DNS/Email Subject Alternative Names (SANs)',
type: 'string',
},
certMetadata: {
editType: 'string',
fieldGroup: 'default',
helpText:
"User supplied metadata to store associated with this certificate's serial number, base64 encoded",
label: 'Certificate Metadata',
type: 'string',
},
commonName: {
editType: 'string',
helpText:
Expand Down Expand Up @@ -631,14 +639,6 @@ const pki = {
fieldGroup: 'default',
type: 'string',
},
metadata: {
editType: 'string',
fieldGroup: 'default',
helpText:
"User supplied metadata to store associated with this certificate's serial number, base64 encoded",
label: 'Metadata',
type: 'string',
},
notAfter: {
editType: 'string',
helpText:
Expand Down Expand Up @@ -714,6 +714,14 @@ const pki = {
label: 'DNS/Email Subject Alternative Names (SANs)',
type: 'string',
},
certMetadata: {
editType: 'string',
fieldGroup: 'default',
helpText:
"User supplied metadata to store associated with this certificate's serial number, base64 encoded",
label: 'Certificate Metadata',
type: 'string',
},
commonName: {
editType: 'string',
helpText:
Expand Down Expand Up @@ -757,14 +765,6 @@ const pki = {
fieldGroup: 'default',
type: 'string',
},
metadata: {
editType: 'string',
fieldGroup: 'default',
helpText:
"User supplied metadata to store associated with this certificate's serial number, base64 encoded",
label: 'Metadata',
type: 'string',
},
notAfter: {
editType: 'string',
helpText:
Expand Down Expand Up @@ -1071,7 +1071,7 @@ const pki = {
noStoreMetadata: {
editType: 'boolean',
helpText:
'If set, if a client attempts to issue or sign a certificate with attached metadata to store, the issuance / signing instead fails.',
'If set, if a client attempts to issue or sign a certificate with attached cert_metadata to store, the issuance / signing instead fails.',
fieldGroup: 'default',
type: 'boolean',
},
Expand Down

0 comments on commit 322b7f2

Please sign in to comment.