-
Notifications
You must be signed in to change notification settings - Fork 15
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
Conjur lookup plugin fails to verify TLS certificate - works ok in role and Conjur Go CLI #207
Comments
Addendum - in case it's relevant, the Traefik proxy uses a wildcard certificate for all apps that it proxies, including Conjur. I've confirmed that my code works fine when I add |
Thanks @jamesfreeman959, we will have someone take a look at this when time allows. |
Ok I have an answer (of sorts) - this might actually come down to an opportunity for documentation rather than an actual bug, and it's almost certainly also got something to do with how Python/Ansible handles CA certificate chains. I followed the process discussed here to download the certificate chain from the Conjur server: https://discuss.cyberarkcommons.org/t/conjur-setup/1008 I've used similar before successfully, so I assumed (that was my error) it would work. On checking the contents of the PEM file generated by this command, I find that it's identical to the What is interesting though is that this PEM file contains only two certificates. And if we refer to https://letsencrypt.org/certificates/ - we can see there should be 3 in the full chain. I can also see this in my browser if I navigate to the Conjur server and click on the padlock next to the URL. Digging deeper into the PEM file generated, I noticed that the certificate for the ISRG Root X1 CA was missing. As a test, I downloaded this manually:
Now the CA chain file contains all 3 certificates in the chain. If I reset Also as a workaround, given that Ubuntu's included CA bundle can validate LetsEncrypt certificates, I tried:
This also works perfectly, and should for any TLS certificate which has been signed by a well known CA. Hope this information helps someone out! |
Sounds like this will probably end up being a documentation improvement, as you say. Great stuff, thanks for digging in! |
Summary
I am trying to make use of the Conjur lookup plugin in a simple Ansible playbook. I have a Conjur OSS server 1.21.2-547 server and have been following some steps based on the tutorial for Ansible integration. So far, everything is working except the lookup plugin, which fails with:
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)>
Steps to Reproduce
conjur whoami
)cyberark.conjur.conjur_host_identity
role to set up the Ansible control nodeurllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)>
Expected Results
I would expect this to work. The Conjur OSS server is behind a Traefik proxy, and has a valid LetsEncrypt (ACME) certificate issued. This certificate validates correctly in both the Conjur Go CLI tool, and the role, so it seems anomalous that it doesn't work in the lookup plugin.
Actual Results
I would expect the lookup plugin to return a valid value as both the Go CLI and the
cyberark.conjur.conjur_host_identity
are successfully validating the TLS certificateReproducible
Version/Tag number
*CyberArk Conjur OSS 1.21.2-547
Running on Ubuntu Server 24.04
Environment setup
Additional Information
Full output from Ansible:
The text was updated successfully, but these errors were encountered: