hashicorp/vault-guides

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

kwtj43 opened this issue · 0 comments

kwtj43 commented

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=??? ???")?