I have been tasked to learn about using OAuth for an application we are developing. I have downloaded the OAuthTutorialClient and followed the instructions found here....
https://developer.atlassian.com/server/jira/platform/oauth/
After following the instructions all I am seeing is the following.....
javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
at sun.security.ssl.SSLSessionImpl.getPeerCertificates(Unknown Source)
at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:128)
at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:339)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:123)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:147)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:108)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:415)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:641)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:576)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:554)
at com.google.api.client.http.apache.ApacheHttpRequest.execute(ApacheHttpRequest.java:67)
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:981)
at com.google.api.client.auth.oauth.AbstractOAuthGetToken.execute(AbstractOAuthGetToken.java:73)
at com.atlassian.oauth.client.example.JiraOAuthClient.getAndAuthorizeTemporaryToken(JiraOAuthClient.java:37)
at com.atlassian.oauth.client.example.OAuthClient.handleGetRequestTokenAction(OAuthClient.java:69)
at com.atlassian.oauth.client.example.OAuthClient.execute(OAuthClient.java:51)
at com.atlassian.oauth.client.example.ClientMain.main(ClientMain.java:23)
I am running Jira (v7.1.10#71014-sha1:8f9212c). Java version openjdk version "1.8.0_171". It is running behind a Apache HTTP reverse proxy. The server.xml file is setup properly to handle the reverse proxy with proxyName=<proxy name> proxyPort="443" scheme="https" secure="true"
We have no problems access Jira normally behind the proxy so there shouldn't be any problems there. Can I get any advice as to what to look for to help debug this problem?
More INFO:
After turning on SSL debugging I saw that I needed to put the Jira servers certificate on my system running the tutorial client. I added the cert via key tool but now still am seeing a problem but this time it is a hangup which is causing the peer not authenticated problem.....
main, WRITE: TLSv1.2 Handshake, length = 221
main, received EOFException: error
main, handling exception: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
main, SEND TLSv1.2 ALERT: fatal, description = handshake_failure
main, WRITE: TLSv1.2 Alert, length = 2
main, called closeSocket()
main, IOException in getSession(): javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated