Created 10-31-2023 04:10 AM
Caused by: org.springframework.web.client.ResourceAccessException: I/O error on GET request for "https://accounts.google.com/.well-known/openid-configuration": sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target;
this is error which im getting
my nifi.properties file is as follows :-
Created 11-02-2023 09:54 AM
@jai1gupta
What makes you think your NiFi is not secured over https?
You did not share your nifi.properties web properties.
If you have set the following properties:
nifi.web.https.host=<hostname>
nifi.web.https.port=<port>
and have configured the NiFi keystore and truststore properties (which you did share), the your NiFi would have started at logged url being available over HTTPS://<hostname>:<port>/nifi
My guess is your issue probably extends from the use of "localhost" instead of an actual resolvable hostname.
If you found any of the suggestions/solutions provided helped you with your issue, please take a moment to login and click "Accept as Solution" on one or more of them that helped.
Thank you,
Matt
Created 10-31-2023 04:11 AM
Created on 10-31-2023 06:19 AM - edited 10-31-2023 06:22 AM
@jai1gupta
The exception:
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
This indicates a trust chain issue in your TLS exchange with accounts.google.com. A complete trust chain requires all know public certs between certificate that signed for accounts.google.com --> intermediate CA(s) --> rootCA (owner and issuer same DN).
Your configuration shows that the oidc authentication client configuration is set to:
nifi.security.user.oidc.truststore.strategy=JDK
HTTPS Certificate Trust Store Strategy defines the source of certificate authorities that NiFi uses when communicating with the OpenID Connect Provider. The value of JDK uses the Java platform default configuration stored in cacerts under the Java Home directory. The value of NIFI enables using the trust store configured in the nifi.security.truststore property. The default value is JDK
This means that the Java version you have installed that NiFi is using is missing some trustedCertEntries from the trust chain for accounts.google.com.
Google makes all its public root and intermediate certificates available for download here:
https://pki.goog/repository/#:~:text=Download%20CA%20certificates
You'll want to download all these (pem files) and add any that are missing from your Java's cacerts truststore file. While you can use the following openssl command to get all the public certs in the chain, you may find at times you get redirected to a different accounts.google.com server with a different trust chain. So I recommend downloading all instead of just those returned by the openssl command:
openssl s_client -connect accounts.google.com:443 -showcerts
Restart your NiFi and this trust issue should be gone.
I am confused why your google console setup is using http instead of https urls for your NiFi? NiFi will not support authentication and authorization unless it is secured over https.
If you found any of the suggestions/solutions provided helped you with your issue, please take a moment to login and click "Accept as Solution" on one or more of them that helped.
Thank you,
Matt
Created on 11-02-2023 03:51 AM - edited 11-02-2023 03:53 AM
after changing the nifi.security.user.oidc.truststore.strategy to NIFI my error got resolved. now when i access the nifi on browser i get this error
i think this error is because my nifi is not secured over https.
i've already ran this command
please tell me what can i do next to make it secured. Thanks
Created 11-02-2023 09:54 AM
@jai1gupta
What makes you think your NiFi is not secured over https?
You did not share your nifi.properties web properties.
If you have set the following properties:
nifi.web.https.host=<hostname>
nifi.web.https.port=<port>
and have configured the NiFi keystore and truststore properties (which you did share), the your NiFi would have started at logged url being available over HTTPS://<hostname>:<port>/nifi
My guess is your issue probably extends from the use of "localhost" instead of an actual resolvable hostname.
If you found any of the suggestions/solutions provided helped you with your issue, please take a moment to login and click "Accept as Solution" on one or more of them that helped.
Thank you,
Matt