Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hvac 0.10.6 - approle auth method - generate_secret_id : issue with metadata type #656

Open
xtof-osd opened this issue Dec 18, 2020 · 3 comments

Comments

@xtof-osd
Copy link

Using HVAC 0.10.6 with Vault v1.5.2

The following instruction:
client.auth.approle.generate_secret_id( rolename, metadata=metadata, mount_point=VAULT_APPROLE_PATH )
fails with ParamValidationError (hvac/api/auth_methods/approle.py", line 244) if metadata is not a dict.

BUT, the requests to Vault fails if metadata is a dict:
error converting input map[target:development] for field "metadata": '' expected type 'string', got unconvertible type 'map[string]interface {}' , on post https://vault.certificare.vin:8200/v1/auth/apptoken/role/somerole/secret-id
If you change the check line 244 in approle.py to verify if metadat is str and not dict, everything works OK.

@lperdereau
Copy link
Contributor

Hello @jeffwecan, I'm trying to find a way for this issue on my repo (lperdereau@096eb4d)

Would you accept this type of PR ? I'll find a way to make test OK :). If you have another solution I'm open to it. And if you think there is no issue on this, could you says me how I add metadata to a secret ?

@jeffwecan
Copy link
Member

Yes a PR would be most welcome! ☺

@lperdereau
Copy link
Contributor

Nice I'll link on this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants