Posted: 13 Apr 2016 7:53 EDT Last activity: 15 Jun 2016 9:22 EDT
Facing Issue in integrating with twitter
Facing issue with twitter integration. We have to integrate with twitter to POST messages. Created OAuthClient (with consumer Key and Secret key for the app created in the twitter). Created an activity to call pyConnectSocialNetwork activity and the OauthClient created is passed.(when the activity is executed it attempts to connect to twitter using the Oauth client).
The first time we execute this, A pop up should be displayed to grant access for our PRPC application to twitter application.Instead fail status with message :"There has been an issue; Please consult your system administrator" is displayed. On tracing the error message is " ** Caught unhandled exception: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated." and "Unable to open an instance using the given inputs: pxObjClass = "Data-Admin-Security-OAuth-Client-AccessToken", pyConsumerKey = "MCdYXNzsM4CVRPfHQ4IDcjW8q", pyUserIdentifier = "PoornimaBonagiri". PFA for the error screen shots.
I'm a little confused here. Where do you have your truststore configured? Is it at application server level? pyConnectSocialNetwork internally uses HTTP connectors. You haven't added your truststore to any of these standard HTTP connectors, have you? I'm asking this because it is surprising to see this error "Couldn't base64 decode keystore file content". Have you created a keystore instance in Pega and referenced it anywhere in your flow?
We are trying to install certificates using key store field provided on Connect-HTTP/ REST rules.PFA for the certificate /keystore details we used. We are stilling getting the error:"Couldn't base64 decode keystore file content".
The 'mycert.crt' file you provided seems fine - it matches the one that Jeff advised you to get.
So : now we need to verify whether this CERT was correctly inserted into the JKS file you provided - we'll need the password to do this. (I assume this keystore *only* contains this one public certificate - and no private keys - otherwise if it contains other stuff (esp. password-less private-keys) then you should not share the password of course!)
We are following the PDN article "https://pdn.pega.com/connecting-twitter-prpc". But failing at step-4 ( Executing the activity to use the OAuth client to connect to Twitter). Pega will receive NBO details from other system, From Pega application these NBO details have to be posted to a twitter ID. this is the requirement. We also tried to create connector, same error "peer not authenticated" is not displayed.
We suspect this is an issue with connectivity to twitter site. We are using capgemini local server where twitter is blocked. But We have already enabled this on server , but looks like api.twitter not enabled properly. We checked twitter access on server machine also. When we do the same on a personal edition (without keystore/certificates) we are able to run the activity and connect to twitter Authorize app page. Now Working with network team to recheck the twitter connectivity.
Just to second on your post here Praneeth: the PDN article (https://pdn.pega.com/connecting-twitter-prpc) does not mention having to set up Trust Stores etc - and in fact it would seem odd to have to for a well-known internet-facing application like Twitter (who are using a CA-signed cert of course).
Maybe the 'CACERTS' file for the Java version being used here for PRPC is old and doesn't recognize the particular Digicert-signed CERT here ?
What version of Java is being used here ? (PegaLogs and/or prsysmgmt/SMA will show this - or just check directly in 'setenv.sh' (etc) if using Tomcat).
I am also getting error upon calling pyConnectSocialNetwork activity. but the error is like below
1.On step 3 of pyConnectSocialNetwork:Unable to open an instance using the given inputs: pxObjClass = "Data-Admin-Security-OAuth-Client-AccessToken", pyConsumerKey = "xxxxxxxxxxxxxxxxxxxx", pyUserIdentifier = "xxxx"
2. On step 5 of pyConnectSocialNetwork:com.pega.pegarules.pub.PRRuntimeException: Authorization Failed :the server responded with an HTTP 401 code, indicating an authorization problem
Please help. I am running Pega 7.2 on Tomcat 8 without any SSL encryption.