Skip to content

Commit

Permalink
UI/vault 12818/oracle banner sll (#19019)
Browse files Browse the repository at this point in the history
* glimmerize alert-banner

* structure for the DocLink todo: css important remove

* styling done. kind of strange, but should help in future

* clean up

* test coverage

* changelog

* address pr comments

* clean up

* amended language on banner to match most recent change.

* add return

* clean up

* modify the banner title and shorten message

* update language
  • Loading branch information
Monkeychip authored and raymonstah committed Mar 17, 2023
1 parent c27026d commit 88988e1
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
3 changes: 3 additions & 0 deletions changelog/19019.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note: improvement
ui: Add alert-banner about configuring an Oracle DB secret engine if using SSL.
```
13 changes: 12 additions & 1 deletion ui/app/templates/components/database-connection.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,18 @@
{{/if}}
</div>
{{/unless}}

{{#if (eq @model.plugin_name "vault-plugin-database-oracle")}}
<AlertBanner
@type="info"
@title="Connecting using SSL or TNS Names"
@message="To create database connections using SSL or TNS names you may need to provide additional Oracle configuration files for your Vault cluster. If you have already provided these files, they may need to updated if you are creating connections to database hosts not covered by the existing configuration files."
>
<DocLink @path="/vault/docs/secrets/databases/oracle">
<Icon @name="learn-link" />
Oracle Database Secrets Engine
</DocLink>
</AlertBanner>
{{/if}}
<div class="field is-grouped is-grouped-split is-fullwidth box is-bottomless">
<div class="field is-grouped">
<div class="control">
Expand Down
13 changes: 12 additions & 1 deletion ui/tests/acceptance/secrets/backend/database/secret-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,12 @@ const connectionTests = [
assert
.dom('[data-test-input="root_rotation_statements"]')
.exists(`Root rotation statements exists for ${name}`);
assert
.dom('[data-test-alert-banner="alert"]')
.hasTextContaining(
`Warning Please ensure that your Oracle plugin has the default name of vault-plugin-database-oracle. Custom naming is not supported in the UI at this time. If the plugin is already named vault-plugin-database-oracle, disregard this warning.`,
'warning banner displays about connections with SSL.'
);
},
},
];
Expand Down Expand Up @@ -264,7 +270,7 @@ module('Acceptance | secrets/database/*', function (hooks) {
});

test('Connection create and edit form for each plugin', async function (assert) {
assert.expect(160);
assert.expect(169);
const backend = await mount();
for (const testCase of connectionTests) {
await connectionPage.visitCreate({ backend });
Expand All @@ -287,6 +293,11 @@ module('Acceptance | secrets/database/*', function (hooks) {
testCase.requiredFields(assert, testCase.name);
continue;
}
if (testCase.plugin !== 'vault-plugin-database-oracle') {
assert
.dom('[data-test-alert-banner="alert"]')
.doesNotExist('Does not show alert-banners specific only to the Oracle db.');
}
testCase.requiredFields(assert, testCase.name);
await connectionPage.toggleVerify();
await connectionPage.save();
Expand Down

0 comments on commit 88988e1

Please sign in to comment.