Merge pull request #5642 from hashicorp/ui/add-ali-secrets-engine

enable alicloud in the ui
This commit is contained in:
Noelle Daley 2018-10-30 13:34:52 -07:00 committed by GitHub
commit 87f5935d49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 47 additions and 0 deletions

View File

@ -7,6 +7,12 @@ const MOUNTABLE_SECRET_ENGINES = [
type: 'ad',
category: 'cloud',
},
{
displayName: 'AliCloud',
value: 'alicloud',
type: 'alicloud',
category: 'cloud',
},
{
displayName: 'AWS',
value: 'aws',

View File

@ -0,0 +1,10 @@
<WizardSection
@headerText="AliCloud"
@headerIcon="enable/alicloud"
@docText="Docs: Google Cloud Secrets"
@docPath="/docs/secrets/alicloud/index.html"
>
<p>
The AliCloud secrets engine dynamically generates AliCloud access tokens based on RAM policies, or AliCloud STS credentials based on RAM roles. This generally makes working with AliCloud easier, since it does not involve clicking in the web UI. The AliCloud access tokens are time-based and are automatically revoked when the Vault lease expires. STS credentials are short-lived, non-renewable, and expire on their own.
</p>
</WizardSection>

View File

@ -0,0 +1,31 @@
import { currentRouteName } from '@ember/test-helpers';
import { module, test } from 'qunit';
import { setupApplicationTest } from 'ember-qunit';
import mountSecrets from 'vault/tests/pages/settings/mount-secret-backend';
import backendsPage from 'vault/tests/pages/secrets/backends';
import authPage from 'vault/tests/pages/auth';
import withFlash from 'vault/tests/helpers/with-flash';
module('Acceptance | alicloud/enable', function(hooks) {
setupApplicationTest(hooks);
hooks.beforeEach(function() {
return authPage.login();
});
test('enable alicloud', async function(assert) {
let enginePath = `alicloud-${new Date().getTime()}`;
await mountSecrets.visit();
await mountSecrets.selectType('alicloud');
await withFlash(
mountSecrets
.next()
.path(enginePath)
.submit()
);
assert.equal(currentRouteName(), 'vault.cluster.secrets.backends', 'redirects to the backends page');
assert.ok(backendsPage.rows.filterBy('path', `${enginePath}/`)[0], 'shows the alicloud engine');
});
});