2015-04-18 00:41:56 +00:00
|
|
|
---
|
2020-01-18 00:18:09 +00:00
|
|
|
layout: docs
|
|
|
|
page_title: Auth Methods
|
|
|
|
sidebar_title: Auth Methods
|
|
|
|
description: Auth methods are mountable methods that perform authentication for Vault.
|
2015-04-18 00:41:56 +00:00
|
|
|
---
|
|
|
|
|
2017-09-13 01:48:52 +00:00
|
|
|
# Auth Methods
|
2015-04-18 00:41:56 +00:00
|
|
|
|
2017-09-13 01:48:52 +00:00
|
|
|
Auth methods are the components in Vault that perform authentication and are
|
|
|
|
responsible for assigning identity and a set of policies to a user.
|
2015-04-18 00:41:56 +00:00
|
|
|
|
2017-09-13 01:48:52 +00:00
|
|
|
Having multiple auth methods enables you to use an auth method that makes the
|
2019-03-22 15:36:14 +00:00
|
|
|
most sense for your use case of Vault and your organization.
|
2015-04-18 00:41:56 +00:00
|
|
|
|
2020-01-22 20:05:41 +00:00
|
|
|
For example, on developer machines, the [GitHub auth method](/docs/auth/github)
|
|
|
|
is easiest to use. But for servers the [AppRole](/docs/auth/approle)
|
2017-09-13 01:48:52 +00:00
|
|
|
method is the recommended choice.
|
2015-04-18 00:41:56 +00:00
|
|
|
|
|
|
|
To learn more about authentication, see the
|
2020-01-22 20:05:41 +00:00
|
|
|
[authentication concepts page](/docs/concepts/auth).
|
2015-04-18 00:41:56 +00:00
|
|
|
|
2017-09-13 01:48:52 +00:00
|
|
|
## Enabling/Disabling Auth Methods
|
2015-04-18 00:41:56 +00:00
|
|
|
|
2017-09-13 01:48:52 +00:00
|
|
|
Auth methods can be enabled/disabled using the CLI or the API.
|
2015-04-18 00:41:56 +00:00
|
|
|
|
2017-09-13 01:48:52 +00:00
|
|
|
```text
|
|
|
|
$ vault auth enable userpass
|
|
|
|
```
|
|
|
|
|
2020-01-22 20:05:41 +00:00
|
|
|
When enabled, auth methods are similar to [secrets engines](/docs/secrets):
|
2015-04-18 00:41:56 +00:00
|
|
|
they are mounted within the Vault mount table and can be accessed
|
2017-09-13 01:48:52 +00:00
|
|
|
and configured using the standard read/write API. All auth methods are mounted underneath the `auth/` prefix.
|
|
|
|
|
|
|
|
By default, auth methods are mounted to `auth/<type>`. For example, if you
|
|
|
|
enable "github", then you can interact with it at `auth/github`. However, this
|
|
|
|
path is customizable, allowing users with advanced use cases to mount a single
|
|
|
|
auth method multiple times.
|
2015-04-18 00:41:56 +00:00
|
|
|
|
2017-09-13 01:48:52 +00:00
|
|
|
```text
|
|
|
|
$ vault auth enable -path=my-login userpass
|
|
|
|
```
|
2015-04-18 00:41:56 +00:00
|
|
|
|
2017-09-13 01:48:52 +00:00
|
|
|
When an auth method is disabled, all users authenticated via that method are
|
|
|
|
automatically logged out.
|