Skip to content

Conversation

hellobontempo
Copy link
Contributor

@hellobontempo hellobontempo commented May 2, 2025

Implements HDS components and renders an accessible login form where all elements render within a single <form> element.

Changes

  • URL Query Param Changes (see this PR for more details)

    • ?with= value exclusively refers to an auth mount path (not type)
    • Selecting a different method in the login form no longer updates the URL
  • Listing visibility changes (docs):

    • "Other" tab no longer displays when mounts are tuned with listing_visibility="unauth"
    • Mounts tuned with listing_visibility="unauth" are grouped by type and render in the respective tab. All other methods can be accessed via the "Sign in with other methods →" link

before after
no settings configured no settings configured
Screenshot 2025-05-05 at 3 20 13 PM Screenshot 2025-05-05 at 3 19 57 PM
listing_visibility="unauth" used to set visible mounts paths as tabs mounts are grouped by type
Screenshot 2025-05-05 at 3 17 07 PM Screenshot 2025-05-05 at 3 17 30 PM
mount path input used to be hidden behind "More options" toggle Now it is behind "Advanced settings" toggle
Screenshot 2025-05-05 at 3 26 08 PM Screenshot 2025-05-05 at 3 25 59 PM

TODO only if you're a HashiCorp employee

  • Backport Labels: If this fix needs to be backported, use the appropriate backport/ label that matches the desired release branch. Note that in the CE repo, the latest release branch will look like backport/x.x.x, but older release branches will be backport/ent/x.x.x+ent.
    • LTS: If this fixes a critical security vulnerability or severity 1 bug, it will also need to be backported to the current LTS versions of Vault. To ensure this, use all available enterprise labels.
  • ENT Breakage: If this PR either 1) removes a public function OR 2) changes the signature
    of a public function, even if that change is in a CE file, double check that
    applying the patch for this PR to the ENT repo and running tests doesn't
    break any tests. Sometimes ENT only tests rely on public functions in CE
    files.
  • Jira: If this change has an associated Jira, it's referenced either
    in the PR description, commit message, or branch name.
  • RFC: If this change has an associated RFC, please link it in the description.
  • ENT PR: If this change has an associated ENT PR, please link it in the
    description. Also, make sure the changelog is in this PR, not in your ENT PR.

hellobontempo and others added 4 commits May 1, 2025 10:05
* move token unwrap functionality to page component

* update mfa test

* remove wrapped_token logic from page component

* more cleanup to relocate unwrap logic

* move wrapped_token to route

* move unwrap tests to acceptance

* move mfa form back

* add some padding

* update mfa-form tests

* get param from params

* wait for auth form on back

* run rests
* initial implementation of mfa validation for sso methods

* update typescript interfaces

* add stopgap changes to auth service

* switch order backend is defined

* update login form for tests even though it will be deleted

* attempt to stabilize wrapped_query test

* =update login form test why not

* Update ui/app/components/auth/form/saml.ts

Co-authored-by: lane-wetmore <lane.wetmore@hashicorp.com>

---------

Co-authored-by: lane-wetmore <lane.wetmore@hashicorp.com>
* initial implementation of mfa validation for sso methods

* update typescript interfaces

* add stopgap changes to auth service

* switch order backend is defined

* update login form for tests even though it will be deleted

* attempt to stabilize wrapped_query test

* =update login form test why not

* move csp error to page component

* move csp error to page component
@hellobontempo hellobontempo requested a review from a team as a code owner May 2, 2025 17:21
@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label May 2, 2025
@hellobontempo hellobontempo added ui pr/no-changelog pr/no-milestone and removed hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed labels May 2, 2025
@hellobontempo hellobontempo changed the title UI: Implement accessible auth form components [WIP] UI: Implement accessible auth form components May 2, 2025
@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label May 2, 2025
Copy link

github-actions bot commented May 2, 2025

CI Results:
All Go tests succeeded! ✅

Copy link

github-actions bot commented May 2, 2025

Build Results:
All builds succeeded! ✅

hellobontempo and others added 2 commits May 5, 2025 10:05
* rename namespace arg to namespaceQueryParam

* move fetch mounts to route

* add margin to sign in button spacing

* update selectors for oidc provider test

* add todo delete comments

* fix arg typo in test

* change method name

* fix args handling tab click

* remove tests that no longer relate to components functionality

* add tests for preselectedAuthType functionality

* move typescript interfaces, fix selector

* add await

* oops

* move format method down, make private

* move tab formatting to the route

* move to page object

* fix token unwrap aborting transition

* not sure what that is doing there..

* add comments

* rename to presetAuthType

* use did-insert instead
* replace Auth::LoginForm with Auth::FormTemplate

* first round of test updates

* return null if mounts object is empty

* add comment and test for empty sys/internal/mounts data

* more test updates

* delete listing_visibility test, delete login-form component test

* update divs to Hds::Card::Container

* add overflow class

* remove unused getters

* move requesting stored auth type to page component

* fix typo

* Update ui/app/components/auth/form/oidc-jwt.ts

make comment make more sense

* small cleanup items, update imports
* delete old components

* update codeowners
@hellobontempo hellobontempo requested review from a team as code owners May 6, 2025 18:37
@hellobontempo hellobontempo requested a review from AnPucel May 6, 2025 18:37
@hellobontempo hellobontempo removed the request for review from AnPucel May 6, 2025 18:44
hellobontempo and others added 3 commits May 7, 2025 14:48
* update path input to type=hidden

* add test coverage

* update page test

* update auth route

* delete login form

* update ent test

* consolidate logic in getter

* add more comments

* more comments..

* rename selector

* refresh model as well

* redirect for invalid query params

* move unwrap to redirect

* only redirect on invalid query params

* add tests for query param
@hellobontempo hellobontempo changed the title [WIP] UI: Implement accessible auth form components UI: Implement accessible auth form components May 7, 2025
@hellobontempo
Copy link
Contributor Author

Enterprise tests ✅
Screenshot 2025-05-07 at 4 53 58 PM

Copy link
Contributor

@lane-wetmore lane-wetmore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing job on this! 🎉 🎉

@hellobontempo hellobontempo merged commit 9832c90 into main May 8, 2025
72 checks passed
@hellobontempo hellobontempo deleted the VAULT-35470/wire-up-accessible-auth-components branch May 8, 2025 16:58
@hellobontempo hellobontempo changed the title UI: Implement accessible auth form components UI: Implement login form changes and auth refactor May 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants