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

Pass encodeBase64 param to transit-key-actions #19429

Merged
merged 3 commits into from
Mar 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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