I'm encountering a Java error while trying to access an S3 bucket using JSCAPE, and I'm looking for some insights into what's causing it. The error message I receive is: 'Unable to execute HTTP request: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target.' I've googled it and found references to keystores, but my client thinks it's an AWS S3 permissions issue. However, I didn't find anything relevant in the access logs and no 4xx errors. Can anyone share their experiences or advice on this?
2 Answers
You're likely missing an intermediate certificate. JSCAPE should use the default Java trust store located at $JAVA_HOME/$JAVA_HOME/lib/security/cacerts. Updating Java could solve this issue, but if that doesn't work, you might need to download the AWS cert chains from the Amazon Trust Services repository and use the Java keytool to add them to your cacerts store.
It seems like the root or intermediate certificate from AWS is not trusted by JSCAPE. You might be using an older Java version that could lack the necessary certificate in its root store. You could download the required certs and manually import them into the Java keystore. If you're unsure about the command line, try using a tool like Keystore Explorer; it makes things a bit easier.

Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures