我想在Jenkins中的安全性下启用LDAPS,但是我的LDAP服务器具有自签名的CERT。有没有人做过或对此有一些指示?我必须使用keytool吗?
在我的Dockerfile中,我正在尝试以下操作,但这不起作用:
FROM jenkins USER root # Install CA certs COPY ca-certificates.crt /etc/ssl/certs/ca-certificates.crt RUN chmod +r /etc/ssl/certs/ca-certificates.crt # Install the Jenkins plugin COPY plugins.txt /usr/share/jenkins/plugins.txt RUN /usr/local/bin/plugins.sh /usr/share/jenkins/plugins.txt # Expose container port 33838 for Jenkins UDP-based auto-discovery EXPOSE 33848/udp ENV JAVA_OPTS -Xmx2048m
事实证明,我只需要在Dockerfile中添加它,其中ldap.cer是我的自签名证书的证书链。
COPY ldap.cer $JAVA_HOME/jre/lib/security RUN \ cd $JAVA_HOME/jre/lib/security \ && keytool -keystore cacerts -storepass changeit -noprompt -trustcacerts -importcert -alias ldapcert -file ldap.cer