-
Notifications
You must be signed in to change notification settings - Fork 62
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
CA verification does not work at all with hvac 2.0 on FreeBSD #413
Comments
Thanks for reporting this @Vladimir-csp , I have been looking at it, but I've been very short on time. I believe the changes, ultimately, are related to the change in And since this collection does use a custom session, we probably have to adjust for those changes. I still don't have a 100% complete picture yet, and I can't actually say if this truly only affects FreeBSD (it shouldn't). |
@Vladimir-csp can I ask if you are also using the |
Yes, retries are set via |
Thank you @Vladimir-csp , can you also show a dump of your env vars (non-sensitive values of course). As I look through the code, the changes we made in If you try without retries, does that fix the CA issue or is it still present? |
I will be able to check in a week+ or so, thanks. |
Yes, with (but still requires explicitly setting |
thank you @Vladimir-csp
|
there was also |
Are there any news or estimates on this? |
Unfortunately not, I started looking at it back then, but I have not been able to find the time since then due to other priorities in the collection and mostly lack of time in general. I still think this is worthwhile to work on but I can't offer any estimate. If you or anyone would like to try to investigate further or put up a fix I would certainly encourage that too. |
I wanted to add my experience to this issue. I'm seeing the same behavior when upgrading from
The stack trace shows failure with
So for now, the only workaround is to keep As @briantist pointed out, this issue stems from hvac changes to session And here's the hvac outline of breaking changes planned for 2.x and 3.x
I think the changes to community.hashi_vault need to be made here, but I'm not familiar enough with python to say for sure (or offer a fix). :( |
@daniel-chamberland thanks very much for the additional information, I'm still very short on time until at least later this month, but I do hope to track down the cause and fix, whether it's in this collection or in |
I am running into the same issue as above with As a workaround I'll use If any additional information is needed please let me know. |
SUMMARY
After upgrading
py39-hvac
from 1.2.1 to 2.0.0 vault modules fail withrequests.exceptions.SSLError
due toCERTIFICATE_VERIFY_FAILED
ISSUE TYPE
COMPONENT NAME
hvac
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
FreeBSD 13
STEPS TO REPRODUCE
Set variables in context of vault module or lookup:
Try accessing vault via any vault module.
EXPECTED RESULTS
It works. Preferably it should work even without
ansible_hashi_vault_ca_cert
, since/etc/ssl/certs
is a system trust store.ACTUAL RESULTS
Underlying python
requests
module fails to verify HTTPS server, despite CA exists in system's trust store (hvac 1.2.1), and despiteansible_hashi_vault_ca_cert
points it to system trust store explicitly (hvac 2.0.0).The text was updated successfully, but these errors were encountered: