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
Create a New User
vault write auth/userpass/users/bondj password=doubleohseven policies=default
List All Users
vault list auth/userpass/users
Login To userpass
vault login -method=userpass username=bondj password=doubleohseven
References
- Official Documentation
Top comments (0)