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

Broken Compatibility for write for pki #6

Closed
seeder opened this issue Nov 28, 2016 · 13 comments
Closed

Broken Compatibility for write for pki #6

seeder opened this issue Nov 28, 2016 · 13 comments

Comments

@seeder
Copy link
Contributor

seeder commented Nov 28, 2016

We were using your module to issue pki certs from vault, now we do not get the data back sent by vault only a message written by your module... it would be useful to actually have it working again

@TerryHowe
Copy link
Owner

I could use a pip list, environment you are working in, what command you are running and the output

@seeder
Copy link
Contributor Author

seeder commented Nov 28, 2016

We have used this construct :

  hashivault_write:
    token: "{{vault_pki_token}}"
    url: "{{vault_pki_url}}"
    secret: "/{{vault_pki_path}}/issue/{{vault_pki_role}}"
    data: "{{vault_pki_issue_}}"
  register: vault_pki_issue_result
  run_once: yes

and inside vault_pki_issue_result was data with certificate and key now there is only msg. :(

in data is {"cn": "our-lovely-cn.com"}

@TerryHowe
Copy link
Owner

And the message is?

@TerryHowe
Copy link
Owner

I also need the version of ansible-module-hashivault you are running

@TerryHowe
Copy link
Owner

it may be that leading '/' on your secret name. Is that secret on the mount point /secret or /{{vault_pki_path}}?

@seeder
Copy link
Contributor Author

seeder commented Nov 29, 2016

What gets returned is { "changed": true, "msg": "Secret /devops-pki/issue/config-uksouth-staging written", "rc": 0 }

vault_pki_path is a path to mounted PKI backed https://www.vaultproject.io/docs/secrets/pki/index.html

@seeder
Copy link
Contributor Author

seeder commented Nov 29, 2016

Tried with latest version from this repo also using hvac 0.2.16

@seeder
Copy link
Contributor Author

seeder commented Nov 29, 2016

btw we actually have forked your repo and made improvements to previous version.

So it looks like this functionality was never in your version https://github.com/generiklimited/ansible-modules-hashivault , sorry!

@TerryHowe
Copy link
Owner

I'm not following on what the problem is with { "changed": true, "msg": "Secret /devops-pki/issue/config-uksouth-staging written", "rc": 0 } is that the incorrect mount point?

There was a change around 2.9 where if the secret name starts with / it is assumed absolute path meaning you are specifying the mount point. It doesn't assume that the mount point ins /secret anymore. I assume this is what you are seeing.

@TerryHowe
Copy link
Owner

If you have any more PRs, that'd probably make life easier for both of us.

@seeder
Copy link
Contributor Author

seeder commented Dec 1, 2016

Mount point is correct, however, client.write returns data from vault response, and it is required for use with PKI. ( as when you write to pki/issue/role it returns the certificate and key )

I will write the patch it requires for your latest version when I get a spare time.

@TerryHowe
Copy link
Owner

https://pypi.python.org/pypi/ansible-modules-hashivault/2.10.0 new release should have what you want

@TerryHowe
Copy link
Owner

I'm going to close this out, if you have something else, reopen or make a new issue, thanks for the PR!

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

2 participants