DEV Community

Frederick Ollinger
Frederick Ollinger

Posted on

Vault Enable Userpass Auth Method

NOTE: This post assumes that you have all ready set up a vault server: https://dev.to/frederickollinger/production-hashicorp-vault-minimal-configuration-485a

What is an Auth Method?

An auth method is a method to valid requests from clients. It provides authentication, that is it checks to see that you are who you say you are. It does not handle authorization which tells you what resources you may or may not do or access.

It also assumes that one is logged in via the root token.

Where Would You Use Userpass Auth Method?

Userpass allows you to create user accounts which map to a real human. Each user can authenticate separately using a password.

What is a Policy?

A policy allows one to control what a particular Role can do with vault, what secrets to change, access, etc.

Enabling Userpass

As a one time operation, one needs to enable the userpass auth method as it is off in new Vault deployments by default.

vault auth enable userpass
Enter fullscreen mode Exit fullscreen mode

Create a New User

vault write auth/userpass/users/bondj password=doubleohseven policies=default
Enter fullscreen mode Exit fullscreen mode

List All Users

vault list auth/userpass/users
Enter fullscreen mode Exit fullscreen mode

Login To userpass

vault login -method=userpass username=bondj password=doubleohseven
Enter fullscreen mode Exit fullscreen mode

References

  1. Official Documentation

https://www.vaultproject.io/docs/auth/userpass

Top comments (0)