Skip to content

Commit

Permalink
Pass encodeBase64 param to transit-key-actions (hashicorp#19429)
Browse files Browse the repository at this point in the history
* fix and test coverage

* changelog
  • Loading branch information
Monkeychip committed Mar 6, 2023
1 parent 9f7f8d5 commit 5299707
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
3 changes: 3 additions & 0 deletions changelog/19429.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
ui: pass encodeBase64 param to HMAC transit-key-actions.
```
7 changes: 6 additions & 1 deletion ui/app/templates/components/transit-key-action/hmac.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<form onsubmit={{action @doSubmit (hash input=@input algorithm=@algorithm key_version=@key_version)}}>
<form
onsubmit={{action
@doSubmit
(hash input=@input algorithm=@algorithm key_version=@key_version encodedBase64=@encodedBase64)
}}
>
<div class="box is-sideless is-fullwidth is-marginless">
<NamespaceReminder @mode="perform" @noun="HMAC creation" />
<div class="content">
Expand Down
3 changes: 3 additions & 0 deletions ui/tests/integration/components/transit-key-actions-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,8 @@ module('Integration | Component | transit key actions', function (hooks) {
`);
await fillIn('#algorithm', 'sha2-384');
await blur('#algorithm');
await fillIn('[data-test-component="code-mirror-modifier"] textarea', 'plaintext');
await click('input[data-test-transit-input="encodedBase64"]');
await click('button[type="submit"]');
assert.deepEqual(
this.storeService.callArgs,
Expand All @@ -331,6 +333,7 @@ module('Integration | Component | transit key actions', function (hooks) {
id: 'akey',
payload: {
algorithm: 'sha2-384',
input: 'plaintext',
},
},
'passes expected args to the adapter'
Expand Down

0 comments on commit 5299707

Please sign in to comment.