OAuth Provider Gitlab And Private Certs

Hello Nerds,

I have recently deployed a self-hosted instance. The plan is to use a local gitlab instance for auth. I have followed documentation, however, when an auth is attempt the user is redirected to the penpot login screen. Docker logs shows:

un.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target...

I assume the container requires the server’s local CA cert. What is the preferred method to adding said cert to the container - assuming this indeed the issue.

Cheers

This was a CA issue.

First attempt was adding my CA cert to the host anchors. No dice. Realizing it was a java keystore that was needed I rebuilt the backend image using the following:

FROM penpotapp/backend:latest

COPY myca.crt /usr/local/share/ca-certificates/

USER 0
RUN keytool -import -noprompt -keystore /opt/jdk/lib/security/cacerts -trustcacerts -file /usr/local/share/ca-certificates/myca.crt
USER 1001

success!!

1 Like