Skip to content

Docs: GUI custom login feature#30799

Merged
hellobontempo merged 29 commits intomainfrom
docs/gui-custom-login
Jun 10, 2025
Merged

Docs: GUI custom login feature#30799
hellobontempo merged 29 commits intomainfrom
docs/gui-custom-login

Conversation

@hellobontempo
Copy link
Copy Markdown
Contributor

@hellobontempo hellobontempo commented May 30, 2025

Description

Docs for feature merged by PR #30700

To view latest preview scroll all the way down and click the latest View deployment beside the Vercel bot below.
image

Most of the feature documentation is located at: /vault/docs/ui/custom-login but a tip has been added to supported auth methods as well, navigate to /vault/docs/auth/ldap to see in LDAP, for example:
Screenshot 2025-06-02 at 10 24 17 AM

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 hellobontempo requested review from a team as code owners May 30, 2025 21:29
@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label May 30, 2025
@github-actions
Copy link
Copy Markdown

CI Results:
All Go tests succeeded! ✅

@github-actions
Copy link
Copy Markdown

Build Results:
All builds succeeded! ✅

@hellobontempo hellobontempo requested review from schavis and removed request for elliesterner and scellef May 30, 2025 21:31
<Tip>

- To apply a login customization to the `root` namespace, pass an empty string: `namespace=""`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should this say root or admin (for HVD)?

Copy link
Copy Markdown
Contributor Author

@hellobontempo hellobontempo Jun 2, 2025

Choose a reason for hiding this comment

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

No, root and admin are different. Maybe it's easier to think of root as a "lack" of a namespace because it's the top-most level. Passing admin would be necessary to set for the HVD admin namespace.

Default only | Clients must use the selected authentication method during login
Preferred only | Clients must choose among the selected authentication methods during login
Default and preferred | Clients see the default method first but can toggle to view the preferred backup methods

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

"Clients see the default method first but can toggle to view the preferred backup methods"

to

"Clients see the default method first but can access the preferred methods as backup methods"

because the preferred methods live under the backup link if there's a default set, right?

Copy link
Copy Markdown
Contributor Author

@hellobontempo hellobontempo Jun 2, 2025

Choose a reason for hiding this comment

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

Not sure exactly what you mean by "under" I used the word "toggle" because they are accessible by clicking "Sign in with other methods"
Screenshot 2025-06-02 at 12 41 50 PM


If [listing visibility](/vault/api-docs/system/auth#listing_visibility-1) is unset or set to `hidden`,
the Vault GUI assumes the default mount path for login, which matches the method type.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could you explain more about what exactly this means? Is there another doc to link to that goes into more detail? This is a complicated nuance

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

There are docs linked already (that's what the markdown syntax of [link text](href) means).


@include 'ui/supported-login-methods-api-docs.mdx'

<Tip>
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Does this tip make sense here? I wasn't really sure where to put it 🤔

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It does, I think it makes sense here.


## Using a Direct Link

The `?with=` query parameter can be used at any point to override login customizations. For example,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@deidraprado I'm tagging you because you’ll have the most insight into how users might interpret this. These are the docs for the custom login feature, and this specific part is about how you can override the default or backup method at any time if you don’t have something like “token” set as one. You and I had discussed this concern, so I wanted your take: any feedback on how this is worded, or do you think it’s clear enough for folks to understand?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM! the only (very minor) thing that could be tweaked, is a link to:
https://developer.hashicorp.com/vault/api-docs/system/mounts#listing_visibility
instead of just having it in code
(the reason I say that is that I had no idea listing_visibility existed!)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sounds good! Most people don't know it's a thing which is why I sprinkled links all over the place 😂 Easy enough to add here, too!

Comment on lines +13 to +14
Login settings can be used to customize which methods display in the web UI login form by setting a default and back up login methods.
Available to be created via the CLI or HTTP API.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
Login settings can be used to customize which methods display in the web UI login form by setting a default and back up login methods.
Available to be created via the CLI or HTTP API.
Use can use the Vault CLI or API to customize a default and one or more back up
login method for the Vault GUI login form.

Style correction: write in the active voice, write directly to the user in how-to guides


## Before you start

@include 'alerts/restricted-admin.mdx'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
@include 'alerts/restricted-admin.mdx'

We should just list the permission requirements in the list instead of inserting an aside

@include 'alerts/restricted-admin.mdx'

- **You must have Vault Enterprise 1.20.0 or higher installed.**
- **You must have the appropriate permissions**:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
- **You must have the appropriate permissions**:
- **You must have permission to operate from the `root` namespace**.
- **You must have the appropriate permissions**:

Copy link
Copy Markdown
Contributor Author

@hellobontempo hellobontempo Jun 10, 2025

Choose a reason for hiding this comment

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

I almost wrote:

  • You must have permission to operate from the root or admin namespace."

But decided against it because I wanted to differentiate between HCP admin/ namespaces (administrative) and namespaces that just happened to be named admin

</Tab>
</Tabs>

## Using a direct link
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
## Using a direct link
## Bypass authentication customization

},
{
"title": "Custom Messages",
"title": "Custom login",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
"title": "Custom login",
"title": "Customize GUI authN",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Whoops I missed this earlier - is this imperative? Also - what is the reasoning behind "AuthN"?

@hellobontempo hellobontempo merged commit 3701dcf into main Jun 10, 2025
33 of 34 checks passed
@hellobontempo hellobontempo deleted the docs/gui-custom-login branch June 10, 2025 22:38
drivera258 pushed a commit that referenced this pull request Jun 11, 2025
* saving because laptop is bad and should feel bad

* save

* make supported login types partial

* add api-docs partial

* update custom login docs

* reword tip?

* add delete section

* address feedback, update using a direct link section

* move tips down

* remove table lines and see if that fixes build?

* revert changes to custom-messages mdx

* add line break?

* format fixes

* empty commit again

* check vercel?

* add line break

* update "namespace" to be "namespace_path"

* reduce use of "preferred"

* address feedback

* use "settings" to match GUI verbiage

* missed a couple feedback comments

* add "single" and "multiple"

* fix link rendering

* fix namespace-path typos for namespace params referencing namespace context

* address feedback

---------

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>
Monkeychip pushed a commit that referenced this pull request Jun 12, 2025
* saving because laptop is bad and should feel bad

* save

* make supported login types partial

* add api-docs partial

* update custom login docs

* reword tip?

* add delete section

* address feedback, update using a direct link section

* move tips down

* remove table lines and see if that fixes build?

* revert changes to custom-messages mdx

* add line break?

* format fixes

* empty commit again

* check vercel?

* add line break

* update "namespace" to be "namespace_path"

* reduce use of "preferred"

* address feedback

* use "settings" to match GUI verbiage

* missed a couple feedback comments

* add "single" and "multiple"

* fix link rendering

* fix namespace-path typos for namespace params referencing namespace context

* address feedback

---------

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>
Erfankam pushed a commit to Erfankam/vault that referenced this pull request Sep 1, 2025
* saving because laptop is bad and should feel bad

* save

* make supported login types partial

* add api-docs partial

* update custom login docs

* reword tip?

* add delete section

* address feedback, update using a direct link section

* move tips down

* remove table lines and see if that fixes build?

* revert changes to custom-messages mdx

* add line break?

* format fixes

* empty commit again

* check vercel?

* add line break

* update "namespace" to be "namespace_path"

* reduce use of "preferred"

* address feedback

* use "settings" to match GUI verbiage

* missed a couple feedback comments

* add "single" and "multiple"

* fix link rendering

* fix namespace-path typos for namespace params referencing namespace context

* address feedback

---------

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed pr/no-changelog pr/no-milestone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants