vault CLI client 0.11.4 errors using aws login

Created on 24 Oct 2018  路  10Comments  路  Source: hashicorp/vault

To Reproduce

% env | grep VAULT
VAULT_CACERT=/Users/me/.certs/vault-ca.pem
VAULT_ADDR=https://myvaultserver.com:8200/
% vault --version
Vault v0.11.4 ('612120e76de651ef669c9af5e77b27a749b0dba3')
% vault login -method aws
panic: assignment to entry in nil map
goroutine 1 [running]:
github.com/hashicorp/vault/command.(*LoginCommand).Run(0xc0001fc280, 0xc0000960a0, 0x0, 0x0, 0xc0004d0060)
    /private/tmp/vault-20181024-94467-1i61kxt/src/github.com/hashicorp/vault/command/login.go:255 +0xdee
github.com/hashicorp/vault/vendor/github.com/mitchellh/cli.(*CLI).Run(0xc000523540, 0xc000523540, 0xc0004d04a0, 0xc00024e5a0)
    /private/tmp/vault-20181024-94467-1i61kxt/src/github.com/hashicorp/vault/vendor/github.com/mitchellh/cli/cli.go:255 +0x207
github.com/hashicorp/vault/command.RunCustom(0xc000096090, 0x3, 0x3, 0xc0000b2b90, 0x0)
    /private/tmp/vault-20181024-94467-1i61kxt/src/github.com/hashicorp/vault/command/main.go:170 +0x74a
github.com/hashicorp/vault/command.Run(0xc000096090, 0x3, 0x3, 0xc000088058)
    /private/tmp/vault-20181024-94467-1i61kxt/src/github.com/hashicorp/vault/command/main.go:81 +0x48
main.main()
    /private/tmp/vault-20181024-94467-1i61kxt/src/github.com/hashicorp/vault/main.go:10 +0x62

Expected behavior
I expect the behavior from 0.11.1

% vault login -method aws
Success! You are now authenticated. The token information displayed below
is already stored in the token helper. You do NOT need to run "vault login"
again. Future Vault requests will automatically use this token.

Key                                Value
---                                -----
...

Environment:

  • Vault Server Version (retrieve with vault status):
% vault status
Key             Value
---             -----
Seal Type       shamir
Sealed          false
Total Shares    8
Threshold       2
Version         0.10.0
Cluster Name    vault-cluster-name
Cluster ID      uuid
HA Enabled      true
HA Cluster      https://x.x.x.x:8201
HA Mode         active
  • Vault CLI Version (retrieve with vault version):
    0.11.4

  • Server Operating System/Architecture:
    osx installing vault cli via home brew brew install vault

Most helpful comment

@kalafut could we get this released? 馃榿

All 10 comments

I wanted to make sure this wasn't just an OSX or homebrew issue, so I reproduced it on one of our linux servers

bash-4.3# uname -a
Linux myapp-77b5fdf5b9-rsxsp 4.14.67-coreos #1 SMP Mon Sep 10 23:14:26 UTC 2018 x86_64 Linux
bash-4.3# wget https://releases.hashicorp.com/vault/0.11.4/vault_0.11.4_linux_amd64.zip
bash-4.3# unzip vault_0.11.4_linux_amd64.zip -d /usr/local/bin
bash-4.3# vault --version
Vault v0.11.4 ('612120e76de651ef669c9af5e77b27a749b0dba3')
bash-4.3# vault login -method aws
panic: assignment to entry in nil map

goroutine 1 [running]:
github.com/hashicorp/vault/command.(*LoginCommand).Run(0xc0000c07d0, 0xc0000b6020, 0x0, 0x0, 0xc000227a00)
        /gopath/src/github.com/hashicorp/vault/command/login.go:255 +0xdee
github.com/hashicorp/vault/vendor/github.com/mitchellh/cli.(*CLI).Run(0xc000546dc0, 0xc000546dc0, 0xc000227dc0, 0xc00023c780)
        /gopath/src/github.com/hashicorp/vault/vendor/github.com/mitchellh/cli/cli.go:255 +0x207
github.com/hashicorp/vault/command.RunCustom(0xc0000b6010, 0x3, 0x3, 0xc0006a8640, 0x0)
        /gopath/src/github.com/hashicorp/vault/command/main.go:170 +0x74a
github.com/hashicorp/vault/command.Run(0xc0000b6010, 0x3, 0x3, 0xc0000a0058)
        /gopath/src/github.com/hashicorp/vault/command/main.go:81 +0x48
main.main()
        /gopath/src/github.com/hashicorp/vault/main.go:10 +0x62

Thanks for the report. I believe the cause is a dependency update which we'll investigate.

https://github.com/mitchellh/mapstructure/commit/3536a929edddb9a5b34bd6861dc4a9647cb459fe#diff-4ac32a78649ca5bdd8e0ba38b7006a1eR14

thanks for the quick fix

@kalafut could we get this released? 馃榿

I can confirm I have the same issue - not only for AWS method

Any update on when this patch will be released?

Confirming @cityofships comment and experiencing this for github method.

We're in a beta cycle now, and 1.0.0-beta2 will be released soon which will include this fix. As mentioned elsewhere, this is a client-side issue and you can use the 0.11.3 binary as a workaround.

can you please tell me how do i install older version of vault using brew. I tried "brew install [email protected]" that did not work

For homebrew if you've previously installed vault you can run brew switch vault 0.11.1

If you haven't previously installed, to install the older, working version brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/5c864fa8d5dbf61e0d1946f09ad75c4e2b705bc4/Formula/vault.rb

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Wonder007 picture Wonder007  路  3Comments

andris9 picture andris9  路  3Comments

ngunia picture ngunia  路  3Comments

dwdraju picture dwdraju  路  3Comments

anthonyGuo picture anthonyGuo  路  3Comments