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

UI/vault 12818/oracle banner sll #19019

Merged
merged 16 commits into from
Mar 8, 2023
Merged
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);
Copy link
Contributor

Choose a reason for hiding this comment

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

🤯

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') {
Copy link
Contributor

Choose a reason for hiding this comment

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

thanks for adding test coverage!!

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