Hi,
after upgrading from 0.6.0 to 0.6.1 I get the following error when running vault auth -methods:
$ vault auth -methods
Error reading auth table: json: cannot unmarshal number into Go value of type api.AuthMount
Currently I have enabled the github and token methods.
Regards
Malte
Hi @temal- ,
I'm unable to reproduce this. It would be helpful if you can get the raw output from that command via the HTTP API, which can be done with curl, like so:
curl -k -H "X-Vault-Token: $VAULT_TOKEN" https://127.0.0.1:8200/v1/sys/auth
{"token/":{"config":{"default_lease_ttl":60,"max_lease_ttl":60},"description":"token based credentials","type":"token"},"github/":{"config":{"default_lease_ttl":60,"max_lease_ttl":60},"description":"","type":"github"},"request_id":"dbec1bef-e46e-2b98-bdd4-87870761954b","lease_id":"","renewable":false,"lease_duration":0,"data":{"github/":{"config":{"default_lease_ttl":60,"max_lease_ttl":60},"description":"","type":"github"},"token/":{"config":{"default_lease_ttl":60,"max_lease_ttl":60},"description":"token based credentials","type":"token"}},"wrap_info":null,"warnings":null,"auth":null}
Obviously, ensure your token is in VAULT_TOKEN (or read it in from elsewhere) and adjust the address.
Thanks!
Hi @jefferai,
thanks for the quick response. Here is the requested output:
curl -k -H "X-Vault-Token: $VAULT_TOKEN" https://127.0.0.1:8200/v1/sys/auth|jq .
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 585 100 585 0 0 3754 0 --:--:-- --:--:-- --:--:-- 3774
{
"token/": {
"config": {
"default_lease_ttl": 0,
"max_lease_ttl": 0
},
"description": "token based credentials",
"type": "token"
},
"github/": {
"config": {
"default_lease_ttl": 0,
"max_lease_ttl": 0
},
"description": "",
"type": "github"
},
"request_id": "af70750b-ce7a-0921-774a-0af6b58dbff6",
"lease_id": "",
"renewable": false,
"lease_duration": 0,
"data": {
"github/": {
"config": {
"default_lease_ttl": 0,
"max_lease_ttl": 0
},
"description": "",
"type": "github"
},
"token/": {
"config": {
"default_lease_ttl": 0,
"max_lease_ttl": 0
},
"description": "token based credentials",
"type": "token"
}
},
"wrap_info": null,
"warnings": null,
"auth": null
}
$ vault auth -methods
Error reading auth table: json: cannot unmarshal number into Go value of type api.AuthMount
I just had a similar situation with vault messing up the handling of vault mounts while curling the end-point produced the correct output.
$ vault mounts
Error reading mounts: json: cannot unmarshal number into Go value of type api.MountOutput
I was writing an issue about it when I figured out the culprit. My vault client was not up-to-date (0.5.3-dev). I've just pulled the latest from master and it now works again. You may want to check that it's not what's happening in this one.
@jefferai, I had an old version of the vault client installed. Sorry for wasting your time!
Thanks @mgilbir!
@temal- Can you tell me which version of the client you had installed? We did change the output from the API endpoints in 0.6.1 but tried to ensure compatibility with 0.6.0. Any chance you were running 0.5.3 or lower?
@mgilbir Also, thank you for your helpful post!
Huh. I just tested, and we did screw something up with the 0.6 compatibility. Very sorry about that!
@jefferai My previous version was 0.6.0.
Don't be sorry, it's still an amazing tool. Keep up the good work! :)
Most helpful comment
@jefferai My previous version was 0.6.0.
Don't be sorry, it's still an amazing tool. Keep up the good work! :)