Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I set up username/password authentication with Hashicorp Vault

I'm just trying out the new Vault UI. I'd like to be able to log in with a username and password. How do I create a new user from the command line so I can log in with a username and password?

like image 666
Ashton Wiersdorf Avatar asked Jun 23 '18 16:06

Ashton Wiersdorf


People also ask

Can you use HashiCorp vault as a password manager?

Vault allows dynamically generated users and passwords for databases or other tools like SSH. This is a feature that's enormously beneficial to contain the sprawl of users and passwords around your organisation and to keep track of who, when and what a user is doing.

How do I authenticate my vault?

Authentication in Vault is the process by which user or machine supplied information is verified against an internal or external system. Vault supports multiple auth methods including GitHub, LDAP, AppRole, and more. Each auth method has a specific use case.

How do client applications authenticate themselves against vault?

Vault trusts the platform, the platform launches and provides a credential to the application, the application provides that credential to Vault, which can be verified against the platform, completing the loop.


1 Answers

Create a new user like so:

vault write auth/userpass/users/<username> policies=default password=<passwd>

You have to be authenticated as root (or another user with sufficient permissions) and have enabled the userpass auth method.

like image 87
Ashton Wiersdorf Avatar answered Oct 04 '22 03:10

Ashton Wiersdorf