vault-guides icon indicating copy to clipboard operation
vault-guides copied to clipboard

How do I "vault login john" using the vault-plugin-auth-mock example?

Open kwtj43 opened this issue 2 years ago • 0 comments

I'm new to vault so sorry if I'm overlooking something obvious to more experienced users.

I'm following the vault-plugin-auth mock example at https://developer.hashicorp.com/vault/tutorials/app-integration/plugin-backends#deploy-a-custom-auth-plugin

I'd expect a two step process...

  1. As root ("vault login root") to create the john user (already in the example)
  2. Later (without root privileges), login as "john" using the credentials returned in the output from the "vault write auth/mock-auth/login ..." command.

I have tried different combinations for the second steps but am getting errors. Examples are...

  • vault login john
  • vault login method=mock-auth john
  • vault login method=vault-plugin-auth-mock john
  • vault login method=vault-plugin-auth-mock <token value from #2 above>
  • vault login method=vault-plugin-auth-mock <token_accessor value from #2 above>

Can the tutorial be updated to include the secondary login step (ex. "vault login method=??? ???")?

kwtj43 avatar Aug 23 '23 14:08 kwtj43