Skip to content

Commit

Permalink
UI Transit: Add missed algorithms (#9070) (#9721)
Browse files Browse the repository at this point in the history
Co-authored-by: Noelle Daley <noelledaley@users.noreply.github.com>

Co-authored-by: Mark <binlab@users.noreply.github.com>
Co-authored-by: Noelle Daley <noelledaley@users.noreply.github.com>
  • Loading branch information
3 people committed Aug 12, 2020
1 parent cd345d3 commit dc69c44
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ui/app/templates/partials/transit-form-create.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
onchange={{action (mut key.type) value="target.value"}}
data-test-transit-key-type=true
>
<option selected={{eq key.type "aes128-gcm96"}} value="aes128-gcm96">
aes128-gcm96
</option>
<option selected={{eq key.type "aes256-gcm96"}} value="aes256-gcm96">
aes256-gcm96
</option>
Expand All @@ -25,6 +28,12 @@
<option selected={{eq key.type "ecdsa-p256"}} value="ecdsa-p256">
ecdsa-p256
</option>
<option selected={{eq key.type "ecdsa-p384"}} value="ecdsa-p384">
ecdsa-p384
</option>
<option selected={{eq key.type "ecdsa-p521"}} value="ecdsa-p521">
ecdsa-p521
</option>
<option selected={{eq key.type "ed25519"}} value="ed25519">
ed25519
</option>
Expand Down Expand Up @@ -56,6 +65,7 @@
</div>
</div>
{{#if (or
(eq key.type "aes128-gcm96")
(eq key.type "aes256-gcm96")
(eq key.type "chacha20-poly1305")
(eq key.type "ed25519")
Expand All @@ -77,6 +87,7 @@
</div>
{{/if}}
{{#if (or
(eq key.type "aes128-gcm96")
(eq key.type "aes256-gcm96")
(eq key.type "chacha20-poly1305")
)
Expand Down
24 changes: 24 additions & 0 deletions ui/tests/acceptance/transit-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@ import enablePage from 'vault/tests/pages/settings/mount-secret-backend';
import secretListPage from 'vault/tests/pages/secrets/backend/list';

const keyTypes = [
{
name: ts => `aes-${ts}`,
type: 'aes128-gcm96',
exportable: true,
supportsEncryption: true,
},
{
name: ts => `aes-convergent-${ts}`,
type: 'aes128-gcm96',
convergent: true,
supportsEncryption: true,
},
{
name: ts => `aes-${ts}`,
type: 'aes256-gcm96',
Expand Down Expand Up @@ -37,6 +49,18 @@ const keyTypes = [
exportable: true,
supportsSigning: true,
},
{
name: ts => `ecdsa-${ts}`,
type: 'ecdsa-p384',
exportable: true,
supportsSigning: true,
},
{
name: ts => `ecdsa-${ts}`,
type: 'ecdsa-p521',
exportable: true,
supportsSigning: true,
},
{
name: ts => `ed25519-${ts}`,
type: 'ed25519',
Expand Down

0 comments on commit dc69c44

Please sign in to comment.