mirror of
https://github.com/hashicorp/vault.git
synced 2026-02-03 20:40:45 -05:00
* prefill role for saml auth method * add changelog Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>
This commit is contained in:
parent
dfc8b589be
commit
cc9e227d0b
3 changed files with 11 additions and 1 deletions
3
changelog/_9394.txt
Normal file
3
changelog/_9394.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
```release-note:improvement
|
||||
ui/auth: the role field on the SAML login form now auto-fills from the `role` URL query string parameter
|
||||
```
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
{{! Authenticating with SAML requires a secure context }}
|
||||
{{#if this.canLoginSaml}}
|
||||
<Auth::Fields @loginFields={{this.loginFields}} />
|
||||
<Auth::Fields @loginFields={{this.loginFields}} @formQueryParams={{@formQueryParams}} />
|
||||
|
||||
{{yield to="advancedSettings"}}
|
||||
|
||||
|
|
|
|||
|
|
@ -61,6 +61,13 @@ module('Acceptance | auth login', function (hooks) {
|
|||
assert.dom(GENERAL.inputByAttr('role')).hasValue(role);
|
||||
});
|
||||
|
||||
test('enterprise: it pre-fills SAML role if specified in query param', async function (assert) {
|
||||
const role = AUTH_METHOD_LOGIN_DATA.oidc.role;
|
||||
await visit(`/vault/auth?with=saml&role=${role}`);
|
||||
assert.dom(AUTH_FORM.selectMethod).hasValue('saml');
|
||||
assert.dom(GENERAL.inputByAttr('role')).hasValue(role);
|
||||
});
|
||||
|
||||
test('it selects auth method if "with" query param ends in an encoded slash and matches an auth type', async function (assert) {
|
||||
await visit('/vault/auth?with=userpass%2F');
|
||||
assert.dom(AUTH_FORM.selectMethod).hasValue('userpass');
|
||||
|
|
|
|||
Loading…
Reference in a new issue