@RB764
@ckumar is correct that what is failing here is a mutual TLS handshake.
"PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"
Above is telling you that one side or the other of this TLS connection is unable to establish trust for the certificate presented during the handshake. The "PrivateKeyEntry" from the keystore file is being presented and the "trustedCertEntry"s from the truststore file are being used to verify trust for that certificate.
In order to establish trust, the complete trust chain needs to be in your truststore files.
Your PrivateKeyEntry will have an owner and an issuer. The issuer is the signer of the certificate.
That issuer will have its own public key (TrustedCertEntry) in the truststore files. That issuer public key will also have an owner and an issuer. If the issuer DN is not the same as the owner DN, then it is an intermediate CA. So again you would need the public key for the issuer of that intermediate Public key. Once you reach the point in the trust chain where the public key owner and issuer are the same DN, then you have the complete trust chain.
You can use openssl command to get the complete trustchain in most scenarios.
openssl s_client -connect <nifi-hostname>:<nifi port> -showcerts
openssl s_client -connect <nifi-regsitry-hostname>:<nifi-registry port> -showcerts
The certs will be returned in the format of:
-----BEGIN CERTIFICATE-----
MIIFljCCA36gAwIBAgINAgO...
-----END CERTIFICATE-----
You can copy each and save it is a .pem file and import those that are missing in to your truststore files.
If NiFi-registry is secured, then NiFi will need to be secured to talk to use it.
If NiFi is secured, it is optional to secure NiFi-Registry. (You can add a http nifi-registry client in NiFi)
If you found the information provided by anyone was helpful with your query, please take a moment to login and click "Accept" on every response that helped you to a solution.
Matt