How to get OpenID Connect to work. #20743
|
Hi All, Firstly thanks for taking the time to read my issue and for any help provided! Im using Pulsar 3.0.0. I've attempted to follow the instructions on https://pulsar.apache.org/docs/3.0.x/security-openid-connect/ in order to enable OpenID Connect Authentication, but can't seem to get passed a certificate error. I believe this error stems from pulsar's AuthenticationProviderOpenID.java class, where in the initialise method it attempts to setup the SSL context to enable a secure connection to the issuer url provided in the broker.config. In the example broker.conf it says that the "openIDTokenIssuerTrustCertsFilePath" is an optional setting and that it will use the trust store of the JVM. So I ensured that the required certificates where added to the trust store found at ".../jre/lib/security/cacerts" on my broker instance and left that config value as blank. This did not work, I was presented with the error: This to me seemed to indicate that it was expecting a .pem file to be supplied, so I copied the pem file onto the broker server and supplied the absolute path to the file as openIDTokenIssuerTrustCertsFilePath=/opt/pulsar/certificates/certificate.pem but I received the error: Here is a example of the broker.conf settings I'm using. |
Replies: 2 comments
|
cc @michaeljmarshall @nodece do you have some inputs here? I remember that you write the related logics. |
|
It looks like this issue was also created here https://stackoverflow.com/questions/76631732/apache-pulsar-unable-to-validate-issuer-certificate-when-attempting-to-load-open. I provided an answer here https://stackoverflow.com/a/76632625/21221450 and improved the docs here apache/pulsar-site#632. Here is a copy of the stack overflow answer:
It will work correctly when you remove the Note: #20745 should improve the behavior in a future release of pulsar by interpreting an empty configuration as using the OS's trust store.
In my testing, I observed this same error when the file was not in PEM format. I verified that the feature does work for custom trust stores configured using correctly formated files with these modified tests: #20746. Here is my full stack trace for the incorrectly formatted ca cert: |
It looks like this issue was also created here https://stackoverflow.com/questions/76631732/apache-pulsar-unable-to-validate-issuer-certificate-when-attempting-to-load-open. I provided an answer here https://stackoverflow.com/a/76632625/21221450 and improved the docs here apache/pulsar-site#632.
Here is a copy of the stack overflow answer:
It will work correctly wh…