This message was deleted.
# opal
s
This message was deleted.
o
I'm guessing your using self signed certificates, you need to add those or the root certificate to the machine/container the client is running on
s
I have root certificate but not sure how to add it to the opal client container
Kindly share if you have any documentation on this
o
https://stackoverflow.com/questions/26028971/docker-container-ssl-certificates ;) You can of course also add it to the dockerfile to build an image
s
Thank you.
I added cert to /opal/certs location still not working
FROM permitio/opal-client-cedar:0.7.1 RUN mkdir -p /opal/certs RUN chown -R opal:opal /opal/certs RUN chmod 777 /opal/certs COPY opal-server-cert.crt /opal/certs/
I think /opal/certs location might not be correct
o
Have you tried /etc/ssl/certs ?
s
Yes but no luck
I tried /usr/local/share/ca-certificates as well
a
Hi @sarath reddy, you need the instructions in the description of this PR to make OPAL trust self signed certificates.
another reference: https://github.com/permitio/opal/pull/104#issue-947398809 I'm also adding this to the docs
@Filip please approve and merge 🙂 https://github.com/permitio/opal/pull/495
f
Looks great - all merged 😉
s
Thank you
@Asaf Cohen @Filip @Or Weis OPAL client is able to connect to OPAL server using root certificate.
Here is the customized docker script
FROM permitio/opal-client-cedar:0.7.1 USER root RUN pip3 install certifi RUN chmod 777 /usr/local/lib/python3.10/site-packages/certifi COPY opal-server-cert.crt /usr/local/share/ca-certificates/ RUN update-ca-certificates RUN cat /etc/ssl/certs/opal-server-cert.pem >> /usr/local/lib/python3.10/site-packages/certifi/cacert.pem
client env
env: - name: OPAL_SERVER_URL value: "https://devapi-lv01.fnbm.corp/opal-server" - name: OPAL_SCOPE_ID value: "myscope" - name: OPAL_CLIENT_SELF_SIGNED_CERTIFICATES_ALLOWED value: 'true' - name: OPAL_CLIENT_SSL_CONTEXT_TRUSTED_CA_FILE value: /usr/local/lib/python3.10/site-packages/certifi/cacert.pem
o
partycat