Sending Email in WSO2 EI using Email connector V1.0.2 - ERROR: InvokeMediator Sequence template org.wso2.carbon.connector.email.send cannot be found - email

I am trying to send Email by using WSO2 Email connector V1.0.2 in WSO2 EI 6.5.0.
Receiving ERROR like below in log
InvokeMediator Sequence template org.wso2.carbon.connector.email.send cannot be found
WIRE Logs:
[2023-01-06 14:15:24,412] [] DEBUG - wire HTTP-Listener I/O dispatcher-4 >> "POST /email/send HTTP/1.1[\r][\n]"
[2023-01-06 14:15:24,428] [] DEBUG - wire HTTP-Listener I/O dispatcher-4 >> "Content-Type: application/json[\r][\n]"
[2023-01-06 14:15:24,428] [] DEBUG - wire HTTP-Listener I/O dispatcher-4 >> "User-Agent: PostmanRuntime/7.30.0[\r][\n]"
[2023-01-06 14:15:24,428] [] DEBUG - wire HTTP-Listener I/O dispatcher-4 >> "Accept: */*[\r][\n]"
[2023-01-06 14:15:24,428] [] DEBUG - wire HTTP-Listener I/O dispatcher-4 >> "Cache-Control: no-cache[\r][\n]"
[2023-01-06 14:15:24,428] [] DEBUG - wire HTTP-Listener I/O dispatcher-4 >> "Postman-Token: caf3e8c5-a4df-4ad2-9ee0-fb96c36a3225[\r][\n]"
[2023-01-06 14:15:24,428] [] DEBUG - wire HTTP-Listener I/O dispatcher-4 >> "Host: localhost:8280[\r][\n]"
[2023-01-06 14:15:24,428] [] DEBUG - wire HTTP-Listener I/O dispatcher-4 >> "Accept-Encoding: gzip, deflate, br[\r][\n]"
[2023-01-06 14:15:24,428] [] DEBUG - wire HTTP-Listener I/O dispatcher-4 >> "Connection: keep-alive[\r][\n]"
[2023-01-06 14:15:24,428] [] DEBUG - wire HTTP-Listener I/O dispatcher-4 >> "Content-Length: 435[\r][\n]"
[2023-01-06 14:15:24,428] [] DEBUG - wire HTTP-Listener I/O dispatcher-4 >> "[\r][\n]"
[2023-01-06 14:15:24,428] [] DEBUG - wire HTTP-Listener I/O dispatcher-4 >> "{[\r][\n]"
[2023-01-06 14:15:24,428] [] DEBUG - wire HTTP-Listener I/O dispatcher-4 >> " "from": "mail2justinraj96#gmail.com",[\r][\n]"
[2023-01-06 14:15:24,428] [] DEBUG - wire HTTP-Listener I/O dispatcher-4 >> " "to": "mail2justinraj96#gmail.com",[\r][\n]"
[2023-01-06 14:15:24,428] [] DEBUG - wire HTTP-Listener I/O dispatcher-4 >> " "subject": "This is the subject",[\r][\n]"
[2023-01-06 14:15:24,428] [] DEBUG - wire HTTP-Listener I/O dispatcher-4 >> " "content": "This is the body",[\r][\n]"
[2023-01-06 14:15:24,428] [] DEBUG - wire HTTP-Listener I/O dispatcher-4 >> " "contentType": "text/plain",[\r][\n]"
[2023-01-06 14:15:24,428] [] DEBUG - wire HTTP-Listener I/O dispatcher-4 >> " "attachments": [[\r][\n]"
[2023-01-06 14:15:24,428] [] DEBUG - wire HTTP-Listener I/O dispatcher-4 >> " {[\r][\n]"
[2023-01-06 14:15:24,428] [] DEBUG - wire HTTP-Listener I/O dispatcher-4 >> " "name": "sampleimagefile.png",[\r][\n]"
[2023-01-06 14:15:24,428] [] DEBUG - wire HTTP-Listener I/O dispatcher-4 >> " "content": "iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=="[\r][\n]"
[2023-01-06 14:15:24,428] [] DEBUG - wire HTTP-Listener I/O dispatcher-4 >> " }[\r][\n]"
[2023-01-06 14:15:24,428] [] DEBUG - wire HTTP-Listener I/O dispatcher-4 >> " ][\r][\n]"
[2023-01-06 14:15:24,428] [] DEBUG - wire HTTP-Listener I/O dispatcher-4 >> "}"
[2023-01-06 14:15:24,428] [] INFO - LogMediator EmailService**** = Called***, Log_from: = mail2justinraj96#gmail.com, Log_to: = mail2justinraj96#gmail.com, Log_subject: = This is the subject, Log_content: = This is the body, Log_contentType: = text/plain
[2023-01-06 14:15:24,428] [] ERROR - InvokeMediator Sequence template org.wso2.carbon.connector.email.send cannot be found
[2023-01-06 14:15:24,428] [] ERROR - EmailService Sequence template org.wso2.carbon.connector.email.send cannot be found
[2023-01-06 14:15:24,441] [] DEBUG - wire HTTP-Listener I/O dispatcher-4 << "HTTP/1.1 202 Accepted[\r][\n]"
[2023-01-06 14:15:24,441] [] DEBUG - wire HTTP-Listener I/O dispatcher-4 << "Date: Fri, 06 Jan 2023 08:45:24 GMT[\r][\n]"
[2023-01-06 14:15:24,441] [] DEBUG - wire HTTP-Listener I/O dispatcher-4 << "Transfer-Encoding: chunked[\r][\n]"
[2023-01-06 14:15:24,444] [] DEBUG - wire HTTP-Listener I/O dispatcher-4 << "Connection: keep-alive[\r][\n]"
[2023-01-06 14:15:24,444] [] DEBUG - wire HTTP-Listener I/O dispatcher-4 << "[\r][\n]"
[2023-01-06 14:15:24,444] [] DEBUG - wire HTTP-Listener I/O dispatcher-4 << "0[\r][\n]"
[2023-01-06 14:15:24,444] [] DEBUG - wire HTTP-Listener I/O dispatcher-4 << "[\r][\n]"
API Code:
<?xml version="1.0" encoding="UTF-8"?>
<api context="/email" name="EmailService" xmlns="http://ws.apache.org/ns/synapse">
<resource methods="POST" uri-template="/send">
<inSequence>
<log level="custom">
<property name="EmailService****" value="Called***"/>
<property expression="json-eval($.from)" name="Log_from:"/>
<property expression="json-eval($.to)" name="Log_to:"/>
<property expression="json-eval($.subject)" name="Log_subject:"/>
<property expression="json-eval($.content)" name="Log_content:"/>
<property expression="json-eval($.contentType)" name="Log_contentType:"/>
</log>
<email.send configKey="smtpsconnection">
<from>{json-eval($.from)}</from>
<to>{json-eval($.to)}</to>
<subject>{json-eval($.subject)}</subject>
<content>{json-eval($.content)}</content>
<contentType>{json-eval($.contentType)}</contentType>
</email.send>
<respond/>
</inSequence>
<outSequence/>
<faultSequence/>
</resource>
</api>
LocalEnrty:
<?xml version="1.0" encoding="UTF-8"?>
<localEntry key="smtpsconnection" xmlns="http://ws.apache.org/ns/synapse">
<email.init>
<connectionType>SMTPS</connectionType>
<port>465</port>
<host>smtp.gmail.com</host>
<username>mail2justinraj96#gmail.com</username>
<password>mypassword</password>
<name>smtpsconnection</name>
</email.init>
</localEntry>
Note:
In above <password> field i tried to give both gmail password and App Password, none of them are working.
Project is imported from Getting started page of WSO2 Integration Studio 8.0.0
I followed below prerequisites suggested by WSO2 Doc
Go to the security tab in your account settings and turn on less secure app access.--> this option not supported by google, so i tried App Password
Go to the gmail settings -> Forwarding and POP/IMAP and enable IMAP under IMAP access.
Email Connector enabled in WSO2 EI 6.5.0 Server
API Hit:
Email Connector in WSO2 EI Console:
Reference link 1
Reference Link 2
How can we resolve this?

can you try with outlook smtp? Please check with outlook and see if
you are able to receive emails via email connector. Server Address: smtp-mail.outlook.com Username: Your Outlook Email Address (e.g. example#outlook.com) Password: Your Outlook Password Port Number: 587 (With TLS = true) You can try Gmail connector as
well
https://docs.wso2.com/display/EI660/Using+the+Gmail+Connector
I also noticed that you are sending attachments in postman while its not handled in your API
<?xml version="1.0" encoding="UTF-8"?>
<api context="/email" name="EmailService" xmlns="http://ws.apache.org/ns/synapse">
<resource methods="POST" uri-template="/send">
<inSequence>
<log level="custom">
<property name="EmailService****" value="Called***"/>
<property expression="json-eval($.from)" name="Log_from:"/>
<property expression="json-eval($.to)" name="Log_to:"/>
<property expression="json-eval($.subject)" name="Log_subject:"/>
<property expression="json-eval($.content)" name="Log_content:"/>
<property expression="json-eval($.contentType)" name="Log_contentType:"/>
</log>
<email.send configKey="smtpsconnection">
<from>{json-eval($.from)}</from>
<to>{json-eval($.to)}</to>
<subject>{json-eval($.subject)}</subject>
<content>{json-eval($.content)}</content>
<contentType>{json-eval($.contentType)}</contentType>
<attachments>{json-eval($.attachments)}</attachments>
</email.send>
<respond/>
</inSequence>
<outSequence/>
<faultSequence/>
</resource>
</api>

Related

XML reader error: com.ctc.wstx.exc.WstxIOException: Invalid UTF-8 start byte 0x8b (at char #2, byte #-1) WSO2 ESB

We have a sequence that calls a REST service, and in the receiving sequence we call a SOAP service.
This is the xml payload that is passed to that SOAP call.
<payloadFactory media-type="xml">
<format>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header/>
<S:Body>
<ns0:searchCust xmlns:ns0="">
<customerData xmlns="">
<Instrument/>
<EntityInformation>
<Individual>
<Name>
<Name Location="First">$1</Name>
</Name>
<ContactInformation>
<Address/>
<EMail>
<EMailAddress>$3</EMailAddress>
</EMail>
</ContactInformation>
</Individual>
</EntityInformation>
</customerData>
</ns0:searchCust>
</S:Body>
</S:Envelope>
</format>
<args>
</args>
</payloadFactory>
But for some reason, I get the following as response:
<?xml version='1.0' encoding='utf-8'?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<S:Fault xmlns:ns4="http://www.w3.org/2003/05/soap-envelope">
<faultcode>S:Client</faultcode>
<faultstring>Couldn't create SOAP message due to exception: XML reader error: com.ctc.wstx.exc.WstxIOException: Invalid UTF-8 start byte 0x8b (at char #2, byte #-1)</faultstring>
</S:Fault>
</S:Body>
</S:Envelope>
When the SOAP service is called on it's own through the ESB or through soapUI, it works fine. But through WSO2 Integration studio I get the above error.
These are my wirelogs.
[2023-01-04 17:15:21,061] DEBUG {wire} - HTTPS-Sender I/O dispatcher-2 >> "HTTP/1.1 500 Internal Server Error[\r][\n]"
[2023-01-04 17:15:21,061] DEBUG {wire} - HTTPS-Sender I/O dispatcher-2 >> "Date: Wed, 04 Jan 2023 11:45:21 GMT[\r][\n]"
[2023-01-04 17:15:21,062] DEBUG {wire} - HTTPS-Sender I/O dispatcher-2 >> "Transfer-Encoding: chunked[\r][\n]"
[2023-01-04 17:15:21,063] DEBUG {wire} - HTTPS-Sender I/O dispatcher-2 >> "Content-Type: text/xml; charset=utf-8[\r][\n]"
[2023-01-04 17:15:21,063] DEBUG {wire} - HTTPS-Sender I/O dispatcher-2 >> "Strict-Transport-Security: max-age=31536000[\r][\n]"
[2023-01-04 17:15:21,064] DEBUG {wire} - HTTPS-Sender I/O dispatcher-2 >> "X-ORACLE-DMS-RID: 0[\r][\n]"
[2023-01-04 17:15:21,064] DEBUG {wire} - HTTPS-Sender I/O dispatcher-2 >> "X-Content-Type-Options: nosniff[\r][\n]"
[2023-01-04 17:15:21,065] DEBUG {wire} - HTTPS-Sender I/O dispatcher-2 >> "X-ORACLE-DMS-ECID: d53a62da-093e-46c4-8f0b-4aabb22b9e40-00000052[\r][\n]"
[2023-01-04 17:15:21,065] DEBUG {wire} - HTTPS-Sender I/O dispatcher-2 >> "X-Frame-Options: SAMEORIGIN[\r][\n]"
[2023-01-04 17:15:21,066] DEBUG {wire} - HTTPS-Sender I/O dispatcher-2 >> "[\r][\n]"
[2023-01-04 17:15:21,066] DEBUG {wire} - HTTPS-Sender I/O dispatcher-2 >> "006e[\r][\n]"
[2023-01-04 17:15:21,067] DEBUG {wire} - HTTPS-Sender I/O dispatcher-2 >> "<?xml version='1.0' encoding='UTF-8'?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body>[\r][\n]"
Is there any way I can fix this? An extra properties to be set to get a proper response?
Try adding the following property before the second SOAP call.
<property action="remove" name="TRANSPORT_HEADERS" scope="axis2"/>

org.apache.http.NoHttpResponseException:The target server failed to respond when reqest server in microservice

when I using this command to to request server(Java 8 microservice):
curl 'http://localhost:11001/soa/user/user/2176' \
-H 'Sec-Fetch-Mode: cors' -H 'DNT: 1' \
-H 'requestId: 2e0dddf9-17d9-42d9-8614-b44de17fe135' \
-H 'Accept: */*' -H 'clientId: 7c54ff40-f11e-41c0-8d31-4b26d6569b5a' \
-H 'Referer: http://localhost:11001/swagger-ui.html' \
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36' -H 'token: e565b7f4-9ea2-4685-b3e6-77bc686d4ecd' \
-H 'appCode: 101' -H 'appVersion: Unknown' --compressed
the server side log output is:
2019-08-26 16:26:11.978 INFO [soa-user-service,f0f180a04e719f67,dc56cc9033988ff7,false] 487 --- [io-11001-exec-6] o.apache.http.impl.execchain.RetryExec : I/O exception (org.apache.http.NoHttpResponseException) caught when processing request to {}->http://192.168.2.80:11001: The target server failed to respond
2019-08-26 16:26:11.982 INFO [soa-user-service,f0f180a04e719f67,dc56cc9033988ff7,false] 487 --- [io-11001-exec-6] o.apache.http.impl.execchain.RetryExec : Retrying request to {}->http://192.168.2.80:11001
2019-08-26 16:26:38.594 INFO [soa-user-service,133250a52b415c71,dd171ebf43d3534d,false] 487 --- [io-11001-exec-3] o.apache.http.impl.execchain.RetryExec : I/O exception (org.apache.http.NoHttpResponseException) caught when processing request to {}->http://192.168.2.80:11001: The target server failed to respond
2019-08-26 16:26:38.595 INFO [soa-user-service,133250a52b415c71,dd171ebf43d3534d,false] 487 --- [io-11001-exec-3] o.apache.http.impl.execchain.RetryExec : Retrying request to {}->http://192.168.2.80:11001
2019-08-26 16:26:40.403 INFO [soa-user-service,,,] 487 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver : Resolving eureka endpoints via configuration
2019-08-26 16:28:23.046 INFO [soa-user-service,f0f180a04e719f67,dc56cc9033988ff7,false] 487 --- [io-11001-exec-6] o.apache.http.impl.execchain.RetryExec : I/O exception (org.apache.http.NoHttpResponseException) caught when processing request to {}->http://192.168.2.80:11001: The target server failed to respond
2019-08-26 16:28:23.047 INFO [soa-user-service,f0f180a04e719f67,dc56cc9033988ff7,false] 487 --- [io-11001-exec-6] o.apache.http.impl.execchain.RetryExec : Retrying request to {}->http://192.168.2.80:11001
my httpclient version config is:
<commons-httpclient.version>3.1</commons-httpclient.version>
<httpclient.version>4.5.8</httpclient.version>
what should I do to fix the problem?
I finally found it is proxy software problem,close the proxy software it should be ok:
ss-local -c /etc/shadowsocks/shadowsocks.json

JBoss EAP 7.1 RH-SSO 7.2 Rest Service Keycloak Bearer Only AuthenticatedActionsValve.invoke Policy enforcement is disabled 403 Forbidden

My configuration is:
JBoss EAP 7.1.4
RH-SSO 7.2.4
JDK 1.8.0u172
We have built a Rest/JSON web service based on the jboss-eap-quickstarts-7.1\contacts-jquerymobile example, without any of the JavaScript GUI components, which works fine.
We then attempted to secure this Rest/JSON web service using the redhat-sso-quickstarts-7.2.x\service-jee-jaxrs example for guidance, after getting the service-jee-jaxrs example running locally.
The Rest/JSON web service is secured using keycloak, and access is bearer only.
Here is the web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.1" blah blah blah >
<module-name>OurRestService</module-name>
<security-constraint>
<web-resource-collection>
<web-resource-name>All</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>mobilerole</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>KEYCLOAK</auth-method>
</login-config>
<security-role>
<role-name>mobilerole</role-name>
</security-role>
</web-app>
Here is the keycloak.json
{
"realm": "mobilerealm",
"bearer-only": true,
"auth-server-url": "blah blah localhost:8180/auth",
"ssl-required": "external",
"resource": "OurRestService",
"confidential-port": 0
}
Below is the JBoss server log output from an attempted GET using PostMan. As you can see the bearer only token is successfully authenticated by SSO, but the web service never fires, and PostMan gets a 403 Forbidden.
Please note the last 2 lines of the server log:
2018-08-30 13:13:19,851 DEBUG [org.keycloak.adapters.AuthenticatedActionsHandler] (default task-4) AuthenticatedActionsValve.invoke http://localhost:8080/OurRestService/rest/contacts/
2018-08-30 13:13:19,851 DEBUG [org.keycloak.adapters.AuthenticatedActionsHandler] (default task-4) Policy enforcement is disabled.
What am I missing?
2018-08-30 13:13:19,737 DEBUG [io.undertow.request] (default I/O-5) Matched prefix path /OurRestService for path /OurRestService/rest/contacts/
2018-08-30 13:13:19,738 DEBUG [org.keycloak.adapters.PreAuthActionsHandler] (default task-4) adminRequest ourUrlToGetPastStackOverflow10URLlimit/contacts/
2018-08-30 13:13:19,738 DEBUG [io.undertow.request.security] (default task-4) Security constraints for request /OurRestService/rest/contacts/ are [SingleConstraintMatch{emptyRoleSemantic=PERMIT, requiredRoles=[therole]}]
2018-08-30 13:13:19,738 DEBUG [io.undertow.request.security] (default task-4) Authenticating required for request HttpServerExchange{ GET /OurRestService/rest/contacts/ request {Postman-Token=[ba346ce6-995e-4c1c-859f-9d92c449b8c9], Accept=[*/*], cache-control=[no-cache], accept-encoding=[gzip, deflate], User-Agent=[PostmanRuntime/7.2.0], Connection=[keep-alive], Authorization=[Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJxSzJKWjUyVjFmU0pKRG82M0hmZHlJbjYyWERlX2hhSWhFMGV5ZXZkQlowIn0.eyJqdGkiOiI5YWM3MWUxMC1kMTYxLTRiYjYtYmE0OC1iMTRlZmJiZjRkZDEiLCJleHAiOjE1MzU2NDk0OTMsIm5iZiI6MCwiaWF0IjoxNTM1NjQ5MTkzLCJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjgxODAvYXV0aC9yZWFsbXMvbW9iaWxlcmVhbG0iLCJhdWQiOiJhZG1pbi1jbGkiLCJzdWIiOiIyMThlYTcwNC0zYTdhLTQ3NjYtYTI1MS02OWQ5YWE4ZTc1ZmYiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJhZG1pbi1jbGkiLCJhdXRoX3RpbWUiOjAsInNlc3Npb25fc3RhdGUiOiJjNjk4MzMxMi1mZTM1LTQwODQtYWQxMC1kZTQwOGY3NzQ1YzgiLCJhY3IiOiIxIiwiYWxsb3dlZC1vcmlnaW5zIjpbXSwicmVzb3VyY2VfYWNjZXNzIjp7fSwibmFtZSI6Ik1vYmlsZSBVc2VyIiwicHJlZmVycmVkX3VzZXJuYW1lIjoibW9iaWxldXNlciIsImdpdmVuX25hbWUiOiJNb2JpbGUiLCJmYW1pbHlfbmFtZSI6IlVzZXIiLCJlbWFpbCI6InNoYXduLmZpcnRoQGdtYWlsLmNvbSJ9.HFCYIdW7Xyd0eKjXOouujVCUH5zjnxNDbOBLQOnjfOzEj4Ff4pHd6q6Ukl3unmWpvM9tU2FtzoPtsxQ-BqIu1ITBuq5_U-fk0OebTCOWtF566vW6BjJb3czRO8f3pB1hd5O7-xCT2KXSv-oEIi0s0ZweiLH0A1PeYy7wur_eCuhONgiu7wI6uR-gimcZVe7o3yhKsDnukrdR-N8xrp1T9PugQe5MZq20ER2Hvc-TW_npnTxRyCHa4tg59_p7-JBGA-BT03mFvOdd4vALeW8xkK3vtaVQevMSa8u3WZrpNGsAvoKpT6QTzm6W0TxAb3t_ptOjusxoLqqRacmP-C9OUg], Content-Type=[application/json], cookie=[JSESSIONID=E7uZRSGcR1FaiNDFCYmJcF7YnJaQof0yP3LxstT5.sfirth], Host=[localhost:8080]} response {X-Powered-By=[Undertow/1], Server=[JBoss-EAP/7]}}
2018-08-30 13:13:19,738 DEBUG [io.undertow.request.security] (default task-4) Setting authentication required for exchange HttpServerExchange{ GET /OurRestService/rest/contacts/ request {Postman-Token=[ba346ce6-995e-4c1c-859f-9d92c449b8c9], Accept=[*/*], cache-control=[no-cache], accept-encoding=[gzip, deflate], User-Agent=[PostmanRuntime/7.2.0], Connection=[keep-alive], Authorization=[Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJxSzJKWjUyVjFmU0pKRG82M0hmZHlJbjYyWERlX2hhSWhFMGV5ZXZkQlowIn0.eyJqdGkiOiI5YWM3MWUxMC1kMTYxLTRiYjYtYmE0OC1iMTRlZmJiZjRkZDEiLCJleHAiOjE1MzU2NDk0OTMsIm5iZiI6MCwiaWF0IjoxNTM1NjQ5MTkzLCJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjgxODAvYXV0aC9yZWFsbXMvbW9iaWxlcmVhbG0iLCJhdWQiOiJhZG1pbi1jbGkiLCJzdWIiOiIyMThlYTcwNC0zYTdhLTQ3NjYtYTI1MS02OWQ5YWE4ZTc1ZmYiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJhZG1pbi1jbGkiLCJhdXRoX3RpbWUiOjAsInNlc3Npb25fc3RhdGUiOiJjNjk4MzMxMi1mZTM1LTQwODQtYWQxMC1kZTQwOGY3NzQ1YzgiLCJhY3IiOiIxIiwiYWxsb3dlZC1vcmlnaW5zIjpbXSwicmVzb3VyY2VfYWNjZXNzIjp7fSwibmFtZSI6Ik1vYmlsZSBVc2VyIiwicHJlZmVycmVkX3VzZXJuYW1lIjoibW9iaWxldXNlciIsImdpdmVuX25hbWUiOiJNb2JpbGUiLCJmYW1pbHlfbmFtZSI6IlVzZXIiLCJlbWFpbCI6InNoYXduLmZpcnRoQGdtYWlsLmNvbSJ9.HFCYIdW7Xyd0eKjXOouujVCUH5zjnxNDbOBLQOnjfOzEj4Ff4pHd6q6Ukl3unmWpvM9tU2FtzoPtsxQ-BqIu1ITBuq5_U-fk0OebTCOWtF566vW6BjJb3czRO8f3pB1hd5O7-xCT2KXSv-oEIi0s0ZweiLH0A1PeYy7wur_eCuhONgiu7wI6uR-gimcZVe7o3yhKsDnukrdR-N8xrp1T9PugQe5MZq20ER2Hvc-TW_npnTxRyCHa4tg59_p7-JBGA-BT03mFvOdd4vALeW8xkK3vtaVQevMSa8u3WZrpNGsAvoKpT6QTzm6W0TxAb3t_ptOjusxoLqqRacmP-C9OUg], Content-Type=[application/json], cookie=[JSESSIONID=E7uZRSGcR1FaiNDFCYmJcF7YnJaQof0yP3LxstT5.sfirth], Host=[localhost:8080]} response {X-Powered-By=[Undertow/1], Server=[JBoss-EAP/7]}}
2018-08-30 13:13:19,738 DEBUG [io.undertow.request.security] (default task-4) Attempting to authenticate HttpServerExchange{ GET /OurRestService/rest/contacts/ request {Postman-Token=[ba346ce6-995e-4c1c-859f-9d92c449b8c9], Accept=[*/*], cache-control=[no-cache], accept-encoding=[gzip, deflate], User-Agent=[PostmanRuntime/7.2.0], Connection=[keep-alive], Authorization=[Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJxSzJKWjUyVjFmU0pKRG82M0hmZHlJbjYyWERlX2hhSWhFMGV5ZXZkQlowIn0.eyJqdGkiOiI5YWM3MWUxMC1kMTYxLTRiYjYtYmE0OC1iMTRlZmJiZjRkZDEiLCJleHAiOjE1MzU2NDk0OTMsIm5iZiI6MCwiaWF0IjoxNTM1NjQ5MTkzLCJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjgxODAvYXV0aC9yZWFsbXMvbW9iaWxlcmVhbG0iLCJhdWQiOiJhZG1pbi1jbGkiLCJzdWIiOiIyMThlYTcwNC0zYTdhLTQ3NjYtYTI1MS02OWQ5YWE4ZTc1ZmYiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJhZG1pbi1jbGkiLCJhdXRoX3RpbWUiOjAsInNlc3Npb25fc3RhdGUiOiJjNjk4MzMxMi1mZTM1LTQwODQtYWQxMC1kZTQwOGY3NzQ1YzgiLCJhY3IiOiIxIiwiYWxsb3dlZC1vcmlnaW5zIjpbXSwicmVzb3VyY2VfYWNjZXNzIjp7fSwibmFtZSI6Ik1vYmlsZSBVc2VyIiwicHJlZmVycmVkX3VzZXJuYW1lIjoibW9iaWxldXNlciIsImdpdmVuX25hbWUiOiJNb2JpbGUiLCJmYW1pbHlfbmFtZSI6IlVzZXIiLCJlbWFpbCI6InNoYXduLmZpcnRoQGdtYWlsLmNvbSJ9.HFCYIdW7Xyd0eKjXOouujVCUH5zjnxNDbOBLQOnjfOzEj4Ff4pHd6q6Ukl3unmWpvM9tU2FtzoPtsxQ-BqIu1ITBuq5_U-fk0OebTCOWtF566vW6BjJb3czRO8f3pB1hd5O7-xCT2KXSv-oEIi0s0ZweiLH0A1PeYy7wur_eCuhONgiu7wI6uR-gimcZVe7o3yhKsDnukrdR-N8xrp1T9PugQe5MZq20ER2Hvc-TW_npnTxRyCHa4tg59_p7-JBGA-BT03mFvOdd4vALeW8xkK3vtaVQevMSa8u3WZrpNGsAvoKpT6QTzm6W0TxAb3t_ptOjusxoLqqRacmP-C9OUg], Content-Type=[application/json], cookie=[JSESSIONID=E7uZRSGcR1FaiNDFCYmJcF7YnJaQof0yP3LxstT5.sfirth], Host=[localhost:8080]} response {Expires=[0], Cache-Control=[no-cache, no-store, must-revalidate], X-Powered-By=[Undertow/1], Server=[JBoss-EAP/7], Pragma=[no-cache]}}, authentication required: true
2018-08-30 13:13:19,738 DEBUG [io.undertow.request.security] (default task-4) Authentication outcome was NOT_ATTEMPTED with method io.undertow.security.impl.CachedAuthenticatedSessionMechanism#6715ee5d for HttpServerExchange{ GET /OurRestService/rest/contacts/ request {Postman-Token=[ba346ce6-995e-4c1c-859f-9d92c449b8c9], Accept=[*/*], cache-control=[no-cache], accept-encoding=[gzip, deflate], User-Agent=[PostmanRuntime/7.2.0], Connection=[keep-alive], Authorization=[Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJxSzJKWjUyVjFmU0pKRG82M0hmZHlJbjYyWERlX2hhSWhFMGV5ZXZkQlowIn0.eyJqdGkiOiI5YWM3MWUxMC1kMTYxLTRiYjYtYmE0OC1iMTRlZmJiZjRkZDEiLCJleHAiOjE1MzU2NDk0OTMsIm5iZiI6MCwiaWF0IjoxNTM1NjQ5MTkzLCJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjgxODAvYXV0aC9yZWFsbXMvbW9iaWxlcmVhbG0iLCJhdWQiOiJhZG1pbi1jbGkiLCJzdWIiOiIyMThlYTcwNC0zYTdhLTQ3NjYtYTI1MS02OWQ5YWE4ZTc1ZmYiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJhZG1pbi1jbGkiLCJhdXRoX3RpbWUiOjAsInNlc3Npb25fc3RhdGUiOiJjNjk4MzMxMi1mZTM1LTQwODQtYWQxMC1kZTQwOGY3NzQ1YzgiLCJhY3IiOiIxIiwiYWxsb3dlZC1vcmlnaW5zIjpbXSwicmVzb3VyY2VfYWNjZXNzIjp7fSwibmFtZSI6Ik1vYmlsZSBVc2VyIiwicHJlZmVycmVkX3VzZXJuYW1lIjoibW9iaWxldXNlciIsImdpdmVuX25hbWUiOiJNb2JpbGUiLCJmYW1pbHlfbmFtZSI6IlVzZXIiLCJlbWFpbCI6InNoYXduLmZpcnRoQGdtYWlsLmNvbSJ9.HFCYIdW7Xyd0eKjXOouujVCUH5zjnxNDbOBLQOnjfOzEj4Ff4pHd6q6Ukl3unmWpvM9tU2FtzoPtsxQ-BqIu1ITBuq5_U-fk0OebTCOWtF566vW6BjJb3czRO8f3pB1hd5O7-xCT2KXSv-oEIi0s0ZweiLH0A1PeYy7wur_eCuhONgiu7wI6uR-gimcZVe7o3yhKsDnukrdR-N8xrp1T9PugQe5MZq20ER2Hvc-TW_npnTxRyCHa4tg59_p7-JBGA-BT03mFvOdd4vALeW8xkK3vtaVQevMSa8u3WZrpNGsAvoKpT6QTzm6W0TxAb3t_ptOjusxoLqqRacmP-C9OUg], Content-Type=[application/json], cookie=[JSESSIONID=E7uZRSGcR1FaiNDFCYmJcF7YnJaQof0yP3LxstT5.sfirth], Host=[localhost:8080]} response {Expires=[0], Cache-Control=[no-cache, no-store, must-revalidate], X-Powered-By=[Undertow/1], Server=[JBoss-EAP/7], Pragma=[no-cache]}}
2018-08-30 13:13:19,739 DEBUG [org.keycloak.adapters.BearerTokenRequestAuthenticator] (default task-4) Verifying access_token
2018-08-30 13:13:19,801 DEBUG [org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager] (default task-4) Get connection: {}->localhost:8180, timeout = 0
2018-08-30 13:13:19,802 DEBUG [org.apache.http.impl.conn.tsccm.ConnPoolByRoute] (default task-4) [{}->localhost:8180] total kept alive: 0, total issued: 0, total allocated: 0 out of 20
2018-08-30 13:13:19,802 DEBUG [org.apache.http.impl.conn.tsccm.ConnPoolByRoute] (default task-4) No free connections [{}->localhost:8180][null]
2018-08-30 13:13:19,802 DEBUG [org.apache.http.impl.conn.tsccm.ConnPoolByRoute] (default task-4) Available capacity: 20 out of 20 [{}->localhost:8180][null]
2018-08-30 13:13:19,802 DEBUG [org.apache.http.impl.conn.tsccm.ConnPoolByRoute] (default task-4) Creating new connection [{}->localhost:8180]
2018-08-30 13:13:19,809 DEBUG [org.apache.http.impl.conn.DefaultClientConnectionOperator] (default task-4) Connecting to localhost:8180
2018-08-30 13:13:19,820 DEBUG [org.apache.http.client.protocol.RequestAddCookies] (default task-4) CookieSpec selected: compatibility
2018-08-30 13:13:19,820 DEBUG [org.apache.http.client.protocol.RequestAuthCache] (default task-4) Auth cache not set in the context
2018-08-30 13:13:19,821 DEBUG [org.apache.http.client.protocol.RequestTargetAuthentication] (default task-4) Target auth state: UNCHALLENGED
2018-08-30 13:13:19,821 DEBUG [org.apache.http.client.protocol.RequestProxyAuthentication] (default task-4) Proxy auth state: UNCHALLENGED
2018-08-30 13:13:19,821 DEBUG [org.apache.http.impl.client.DefaultHttpClient] (default task-4) Attempt 1 to execute request
2018-08-30 13:13:19,821 DEBUG [org.apache.http.impl.conn.DefaultClientConnection] (default task-4) Sending request: GET /auth/realms/mobilerealm/protocol/openid-connect/certs HTTP/1.1
2018-08-30 13:13:19,821 DEBUG [org.apache.http.wire] (default task-4) >> "GET /auth/realms/mobilerealm/protocol/openid-connect/certs HTTP/1.1[\r][\n]"
2018-08-30 13:13:19,822 DEBUG [org.apache.http.wire] (default task-4) >> "Host: localhost:8180[\r][\n]"
2018-08-30 13:13:19,822 DEBUG [org.apache.http.wire] (default task-4) >> "Connection: Keep-Alive[\r][\n]"
2018-08-30 13:13:19,822 DEBUG [org.apache.http.wire] (default task-4) >> "[\r][\n]"
2018-08-30 13:13:19,822 DEBUG [org.apache.http.headers] (default task-4) >> GET /auth/realms/mobilerealm/protocol/openid-connect/certs HTTP/1.1
2018-08-30 13:13:19,822 DEBUG [org.apache.http.headers] (default task-4) >> Host: localhost:8180
2018-08-30 13:13:19,822 DEBUG [org.apache.http.headers] (default task-4) >> Connection: Keep-Alive
2018-08-30 13:13:19,825 DEBUG [org.apache.http.wire] (default task-4) << "HTTP/1.1 200 OK[\r][\n]"
2018-08-30 13:13:19,826 DEBUG [org.apache.http.wire] (default task-4) << "Connection: keep-alive[\r][\n]"
2018-08-30 13:13:19,826 DEBUG [org.apache.http.wire] (default task-4) << "Cache-Control: no-cache[\r][\n]"
2018-08-30 13:13:19,826 DEBUG [org.apache.http.wire] (default task-4) << "Content-Type: application/json[\r][\n]"
2018-08-30 13:13:19,826 DEBUG [org.apache.http.wire] (default task-4) << "Content-Length: 462[\r][\n]"
2018-08-30 13:13:19,826 DEBUG [org.apache.http.wire] (default task-4) << "Date: Thu, 30 Aug 2018 17:13:19 GMT[\r][\n]"
2018-08-30 13:13:19,826 DEBUG [org.apache.http.wire] (default task-4) << "[\r][\n]"
2018-08-30 13:13:19,826 DEBUG [org.apache.http.impl.conn.DefaultClientConnection] (default task-4) Receiving response: HTTP/1.1 200 OK
2018-08-30 13:13:19,826 DEBUG [org.apache.http.headers] (default task-4) << HTTP/1.1 200 OK
2018-08-30 13:13:19,826 DEBUG [org.apache.http.headers] (default task-4) << Connection: keep-alive
2018-08-30 13:13:19,826 DEBUG [org.apache.http.headers] (default task-4) << Cache-Control: no-cache
2018-08-30 13:13:19,826 DEBUG [org.apache.http.headers] (default task-4) << Content-Type: application/json
2018-08-30 13:13:19,826 DEBUG [org.apache.http.headers] (default task-4) << Content-Length: 462
2018-08-30 13:13:19,826 DEBUG [org.apache.http.headers] (default task-4) << Date: Thu, 30 Aug 2018 17:13:19 GMT
2018-08-30 13:13:19,829 DEBUG [org.apache.http.impl.client.DefaultHttpClient] (default task-4) Connection can be kept alive indefinitely
2018-08-30 13:13:19,833 DEBUG [org.apache.http.wire] (default task-4) << "{"keys":[{"kid":"qK2JZ52V1fSJJDo63HfdyIn62XDe_haIhE0eyevdBZ0","kty":"RSA","alg":"RS256","use":"sig","n":"5dKNlsMOu2W6WB0X1G27PcqUoBLPzPUDtfQmA7uf0BaPSkYu7CnbUPdShrs09RGQM6tWWL_6_qiacFi9jBgyEAhT9MhQ-rgkPe0YpdyQtVqznZH5CHkaAq9fTxwmEUXUZvRWuP4cAF7Pi5RfVgOIRflI-AgGyiH-ygdinRQx10nr-m7Us2seCM8QB5zjsKz3YLNdnk_bmvc6axhPpZAAlUCaAMM-j0Edc9CR7NDw09aUIKGED8wWdmxxdteqfPVjKiIlFjg1-QiroEH2PnNOqFTn2UKX6imOJmEc9XlJCsthlEHz-1Pqz23imiLkk-n2S3CJVyvnnI-OvUYaaOF6_w","e":"AQAB"}]}"
2018-08-30 13:13:19,836 DEBUG [org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager] (default task-4) Released connection is reusable.
2018-08-30 13:13:19,836 DEBUG [org.apache.http.impl.conn.tsccm.ConnPoolByRoute] (default task-4) Releasing connection [{}->localhost:8180][null]
2018-08-30 13:13:19,836 DEBUG [org.apache.http.impl.conn.tsccm.ConnPoolByRoute] (default task-4) Pooling connection [{}->localhost:8180][null]; keep alive indefinitely
2018-08-30 13:13:19,836 DEBUG [org.apache.http.impl.conn.tsccm.ConnPoolByRoute] (default task-4) Notifying no-one, there are no waiting threads
2018-08-30 13:13:19,838 DEBUG [org.keycloak.adapters.rotation.JWKPublicKeyLocator] (default task-4) Realm public keys successfully retrieved for client OurRestService. New kids: [qK2JZ52V1fSJJDo63HfdyIn62XDe_haIhE0eyevdBZ0]
2018-08-30 13:13:19,839 DEBUG [org.keycloak.adapters.BearerTokenRequestAuthenticator] (default task-4) successful authorized
2018-08-30 13:13:19,841 DEBUG [io.undertow.request.security] (default task-4) Authenticated as 218ea704-3a7a-4766-a251-69d9aa8e75ff, roles []
2018-08-30 13:13:19,849 DEBUG [org.keycloak.adapters.wildfly.WildflyRequestAuthenticator] (default task-4) propagate security context to wildfly
2018-08-30 13:13:19,849 DEBUG [org.keycloak.adapters.RequestAuthenticator] (default task-4) User '218ea704-3a7a-4766-a251-69d9aa8e75ff' invoking 'ourUrlToGetPastStackOverflow10URLlimit/contacts/' on client 'OurRestService'
2018-08-30 13:13:19,849 DEBUG [org.keycloak.adapters.RequestAuthenticator] (default task-4) Bearer AUTHENTICATED
2018-08-30 13:13:19,850 DEBUG [io.undertow.request.security] (default task-4) Authentication outcome was AUTHENTICATED with method org.keycloak.adapters.wildfly.WildflyAuthenticationMechanism#2d35f3f1 for HttpServerExchange{ GET /OurRestService/rest/contacts/ request {Postman-Token=[ba346ce6-995e-4c1c-859f-9d92c449b8c9], Accept=[*/*], cache-control=[no-cache], accept-encoding=[gzip, deflate], User-Agent=[PostmanRuntime/7.2.0], Connection=[keep-alive], Authorization=[Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJxSzJKWjUyVjFmU0pKRG82M0hmZHlJbjYyWERlX2hhSWhFMGV5ZXZkQlowIn0.eyJqdGkiOiI5YWM3MWUxMC1kMTYxLTRiYjYtYmE0OC1iMTRlZmJiZjRkZDEiLCJleHAiOjE1MzU2NDk0OTMsIm5iZiI6MCwiaWF0IjoxNTM1NjQ5MTkzLCJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjgxODAvYXV0aC9yZWFsbXMvbW9iaWxlcmVhbG0iLCJhdWQiOiJhZG1pbi1jbGkiLCJzdWIiOiIyMThlYTcwNC0zYTdhLTQ3NjYtYTI1MS02OWQ5YWE4ZTc1ZmYiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJhZG1pbi1jbGkiLCJhdXRoX3RpbWUiOjAsInNlc3Npb25fc3RhdGUiOiJjNjk4MzMxMi1mZTM1LTQwODQtYWQxMC1kZTQwOGY3NzQ1YzgiLCJhY3IiOiIxIiwiYWxsb3dlZC1vcmlnaW5zIjpbXSwicmVzb3VyY2VfYWNjZXNzIjp7fSwibmFtZSI6Ik1vYmlsZSBVc2VyIiwicHJlZmVycmVkX3VzZXJuYW1lIjoibW9iaWxldXNlciIsImdpdmVuX25hbWUiOiJNb2JpbGUiLCJmYW1pbHlfbmFtZSI6IlVzZXIiLCJlbWFpbCI6InNoYXduLmZpcnRoQGdtYWlsLmNvbSJ9.HFCYIdW7Xyd0eKjXOouujVCUH5zjnxNDbOBLQOnjfOzEj4Ff4pHd6q6Ukl3unmWpvM9tU2FtzoPtsxQ-BqIu1ITBuq5_U-fk0OebTCOWtF566vW6BjJb3czRO8f3pB1hd5O7-xCT2KXSv-oEIi0s0ZweiLH0A1PeYy7wur_eCuhONgiu7wI6uR-gimcZVe7o3yhKsDnukrdR-N8xrp1T9PugQe5MZq20ER2Hvc-TW_npnTxRyCHa4tg59_p7-JBGA-BT03mFvOdd4vALeW8xkK3vtaVQevMSa8u3WZrpNGsAvoKpT6QTzm6W0TxAb3t_ptOjusxoLqqRacmP-C9OUg], Content-Type=[application/json], cookie=[JSESSIONID=E7uZRSGcR1FaiNDFCYmJcF7YnJaQof0yP3LxstT5.sfirth], Host=[localhost:8080]} response {Expires=[0], Cache-Control=[no-cache, no-store, must-revalidate], X-Powered-By=[Undertow/1], Server=[JBoss-EAP/7], Pragma=[no-cache]}}
2018-08-30 13:13:19,850 DEBUG [io.undertow.request.security] (default task-4) Authentication result was AUTHENTICATED for HttpServerExchange{ GET /OurRestService/rest/contacts/ request {Postman-Token=[ba346ce6-995e-4c1c-859f-9d92c449b8c9], Accept=[*/*], cache-control=[no-cache], accept-encoding=[gzip, deflate], User-Agent=[PostmanRuntime/7.2.0], Connection=[keep-alive], Authorization=[Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJxSzJKWjUyVjFmU0pKRG82M0hmZHlJbjYyWERlX2hhSWhFMGV5ZXZkQlowIn0.eyJqdGkiOiI5YWM3MWUxMC1kMTYxLTRiYjYtYmE0OC1iMTRlZmJiZjRkZDEiLCJleHAiOjE1MzU2NDk0OTMsIm5iZiI6MCwiaWF0IjoxNTM1NjQ5MTkzLCJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjgxODAvYXV0aC9yZWFsbXMvbW9iaWxlcmVhbG0iLCJhdWQiOiJhZG1pbi1jbGkiLCJzdWIiOiIyMThlYTcwNC0zYTdhLTQ3NjYtYTI1MS02OWQ5YWE4ZTc1ZmYiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJhZG1pbi1jbGkiLCJhdXRoX3RpbWUiOjAsInNlc3Npb25fc3RhdGUiOiJjNjk4MzMxMi1mZTM1LTQwODQtYWQxMC1kZTQwOGY3NzQ1YzgiLCJhY3IiOiIxIiwiYWxsb3dlZC1vcmlnaW5zIjpbXSwicmVzb3VyY2VfYWNjZXNzIjp7fSwibmFtZSI6Ik1vYmlsZSBVc2VyIiwicHJlZmVycmVkX3VzZXJuYW1lIjoibW9iaWxldXNlciIsImdpdmVuX25hbWUiOiJNb2JpbGUiLCJmYW1pbHlfbmFtZSI6IlVzZXIiLCJlbWFpbCI6InNoYXduLmZpcnRoQGdtYWlsLmNvbSJ9.HFCYIdW7Xyd0eKjXOouujVCUH5zjnxNDbOBLQOnjfOzEj4Ff4pHd6q6Ukl3unmWpvM9tU2FtzoPtsxQ-BqIu1ITBuq5_U-fk0OebTCOWtF566vW6BjJb3czRO8f3pB1hd5O7-xCT2KXSv-oEIi0s0ZweiLH0A1PeYy7wur_eCuhONgiu7wI6uR-gimcZVe7o3yhKsDnukrdR-N8xrp1T9PugQe5MZq20ER2Hvc-TW_npnTxRyCHa4tg59_p7-JBGA-BT03mFvOdd4vALeW8xkK3vtaVQevMSa8u3WZrpNGsAvoKpT6QTzm6W0TxAb3t_ptOjusxoLqqRacmP-C9OUg], Content-Type=[application/json], cookie=[JSESSIONID=E7uZRSGcR1FaiNDFCYmJcF7YnJaQof0yP3LxstT5.sfirth], Host=[localhost:8080]} response {Expires=[0], Cache-Control=[no-cache, no-store, must-revalidate], X-Powered-By=[Undertow/1], Server=[JBoss-EAP/7], Pragma=[no-cache]}}
2018-08-30 13:13:19,851 DEBUG [org.keycloak.adapters.AuthenticatedActionsHandler] (default task-4) AuthenticatedActionsValve.invoke ourUrlToGetPastStackOverflow10URLlimit/contacts/
2018-08-30 13:13:19,851 DEBUG [org.keycloak.adapters.AuthenticatedActionsHandler] (default task-4) Policy enforcement is disabled.
Problem Solved!
What is not obvious from the Keycloak/SSO documentation is that on RH-SSO you need a Public client paired with your bearer-only client in order to get your authenticated token. So, the solution is to create a 2nd SSO client in your realm that is "public":
* Select `Clients` from the menu
* Click `Create`
* Add the following values:
* Client ID: RestAuth
* Client Protocol: `openid-connect`
* Click `Save`
You request your token from the public client, and that will give you access to your bearer-only rest API on JBoss.

eclipse "Run As --> Groovy Script" gives me the DEBUG info

I right click the groovy class and select Run As --> Groovy Script. I can't find my println output in the console, but I get all these DEBUG messages. How can I get rid of them?
10:57:10.687 [main] DEBUG org.apache.http.wire - >> "[\r][\n]"
10:57:10.687 [main] DEBUG org.apache.http.headers - >> GET /nexus/service/local/repositories/snapshots/content/devops/README.md/1.0.0-rc1/ HTTP/1.1
10:57:10.687 [main] DEBUG org.apache.http.headers - >> Accept: application/xml, text/xml, application/xhtml+xml, application/atom+xml
10:57:10.687 [main] DEBUG org.apache.http.headers - >> Host: localhost:8060

Connection of Titan graph DB to Gephi through Gremlin console

I am trying to connect to gephi(0.9.1) through gremlin console. I have a graph in my titan database. I also have the streaming server enabled in my gephi. And through gremlin i executed the following commands:
:plugin use tinkerpop.gephi
g = TinkerFactory.createModern()
:remote connect tinkerpop.gephi
All these worked fine.But when i ran the last command:
:> g
I got the following error:
==>tinkergraph[vertices:6 edges:6]
16:07:16.783 [main] DEBUG groovyx.net.http.HTTPBuilder - POST http://localhost:8080/workspace0?format=JSON&operation=updateGraph
16:07:16.801 [main] DEBUG o.a.h.i.c.BasicClientConnectionManager - Get connection for route {}->http://localhost:8080
16:07:16.809 [main] DEBUG o.a.h.i.c.DefaultClientConnectionOperator - Connecting to localhost:8080
16:07:16.817 [main] DEBUG o.a.h.c.protocol.RequestAddCookies - CookieSpec selected: default
16:07:16.822 [main] DEBUG o.a.h.c.protocol.RequestAuthCache - Auth cache not set in the context
16:07:16.826 [main] DEBUG o.a.h.c.p.RequestTargetAuthentication - Target auth state: UNCHALLENGED
16:07:16.831 [main] DEBUG o.a.h.c.p.RequestProxyAuthentication - Proxy auth state: UNCHALLENGED
16:07:16.836 [main] DEBUG o.a.h.impl.client.DefaultHttpClient - Attempt 1 to execute request
16:07:16.840 [main] DEBUG o.a.h.i.conn.DefaultClientConnection - Sending request: POST /workspace0?format=JSON&operation=updateGraph HTTP/1.1
16:07:16.850 [main] DEBUG org.apache.http.wire - >> "POST /workspace0?format=JSON&operation=updateGraph HTTP/1.1[\r][\n ]"
16:07:16.862 [main] DEBUG org.apache.http.wire - >> "Accept: */*[\r][\n]"
16:07:16.868 [main] DEBUG org.apache.http.wire - >> "Content-Length: 23[\r][\n]"
16:07:16.873 [main] DEBUG org.apache.http.wire - >> "Content-Type: application/json[\r][\n]"
16:07:16.879 [main] DEBUG org.apache.http.wire - >> "Host: localhost:8080[\r][\n]"
16:07:16.885 [main] DEBUG org.apache.http.wire - >> "Connection: Keep-Alive[\r][\n]"
16:07:16.890 [main] DEBUG org.apache.http.wire - >> "[\r][\n]"
16:07:16.895 [main] DEBUG org.apache.http.headers - >> POST /workspace0?format=JSON&operation=updateGraph HTTP/1.1
16:07:16.900 [main] DEBUG org.apache.http.headers - >> Accept: */*
16:07:16.905 [main] DEBUG org.apache.http.headers - >> Content-Length: 23
16:07:16.910 [main] DEBUG org.apache.http.headers - >> Content-Type: application/json
16:07:16.915 [main] DEBUG org.apache.http.headers - >> Host: localhost:8080
16:07:16.920 [main] DEBUG org.apache.http.headers - >> Connection: Keep-Alive
16:07:16.925 [main] DEBUG org.apache.http.wire - >> "{"dn":{"filter":"ALL"}}"
16:07:16.935 [main] DEBUG org.apache.http.wire - << "HTTP/1.1 404 Not Found[\r][\n]"
16:07:16.940 [main] DEBUG org.apache.http.wire - << "Cache-Control: must-revalidate,no-cache,no-store[\r][\n]"
16:07:16.945 [main] DEBUG org.apache.http.wire - << "Content-Type: text/html;charset=ISO-8859-1[\r][\n]"
16:07:16.951 [main] DEBUG org.apache.http.wire - << "Content-Length: 1277[\r][\n]"
16:07:16.956 [main] DEBUG org.apache.http.wire - << "Server: Jetty(8.1.17.v20150415)[\r][\n]"
16:07:16.961 [main] DEBUG org.apache.http.wire - << "[\r][\n]"
16:07:16.966 [main] DEBUG o.a.h.i.conn.DefaultClientConnection - Receiving response: HTTP/1.1 404 Not Found
16:07:16.971 [main] DEBUG org.apache.http.headers - << HTTP/1.1 404 Not Found
16:07:16.978 [main] DEBUG org.apache.http.headers - << Cache-Control: must-revalidate,no-cache,no-store
16:07:16.984 [main] DEBUG org.apache.http.headers - << Content-Type: text/html;charset=ISO-8859-1
16:07:16.991 [main] DEBUG org.apache.http.headers - << Content-Length: 1277
16:07:16.996 [main] DEBUG org.apache.http.headers - << Server: Jetty(8.1.17.v20150415)
16:07:17.002 [main] DEBUG o.a.h.impl.client.DefaultHttpClient - Connection can be kept alive indefinitely
16:07:17.010 [main] DEBUG groovyx.net.http.HTTPBuilder - Response code: 404; found handler: org.codehaus.groovy.runtime. MethodClosure#2c768ada
16:07:17.020 [main] DEBUG org.apache.http.wire - << "<html>[\n]"
16:07:17.024 [main] DEBUG org.apache.http.wire - << "<head>[\n]"
16:07:17.029 [main] DEBUG org.apache.http.wire - << "<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>[\n]"
16:07:17.039 [main] DEBUG org.apache.http.wire - << "<title>Error 404 Not Found</title>[\n]"
16:07:17.043 [main] DEBUG org.apache.http.wire - << "</head>[\n]"
16:07:17.048 [main] DEBUG org.apache.http.wire - << "<body>[\n]"
16:07:17.052 [main] DEBUG org.apache.http.wire - << "<h2>HTTP ERROR: 404</h2>[\n]"
16:07:17.057 [main] DEBUG org.apache.http.wire - << "<p>Problem accessing /workspace0. Reason:[\n]"
16:07:17.062 [main] DEBUG org.apache.http.wire - << "<pre> Not Found</pre></p>[\n]"
16:07:17.068 [main] DEBUG org.apache.http.wire - << "<hr /><i><small>Powered by Jetty://</small></i>[\n]"
16:07:17.074 [main] DEBUG org.apache.http.wire - << " [\n]"
16:07:17.079 [main] DEBUG org.apache.http.wire - << " [\n]"
16:07:17.083 [main] DEBUG org.apache.http.wire - << " [\n]"
16:07:17.088 [main] DEBUG org.apache.http.wire - << " [\n]"
16:07:17.093 [main] DEBUG org.apache.http.wire - << " [\n]"
16:07:17.098 [main] DEBUG org.apache.http.wire - << " [\n]"
16:07:17.103 [main] DEBUG org.apache.http.wire - << " [\n]"
16:07:17.107 [main] DEBUG org.apache.http.wire - << " [\n]"
16:07:17.111 [main] DEBUG org.apache.http.wire - << " [\n]"
16:07:17.116 [main] DEBUG org.apache.http.wire - << " [\n]"
16:07:17.121 [main] DEBUG org.apache.http.wire - << " [\n]"
16:07:17.125 [main] DEBUG org.apache.http.wire - << " [\n]"
16:07:17.130 [main] DEBUG org.apache.http.wire - << " [\n]"
16:07:17.136 [main] DEBUG org.apache.http.wire - << " [\n]"
16:07:17.141 [main] DEBUG org.apache.http.wire - << " [\n]"
16:07:17.146 [main] DEBUG org.apache.http.wire - << " [\n]"
16:07:17.151 [main] DEBUG org.apache.http.wire - << " [\n]"
16:07:17.156 [main] DEBUG org.apache.http.wire - << " [\n]"
16:07:17.160 [main] DEBUG org.apache.http.wire - << " [\n]"
16:07:17.165 [main] DEBUG org.apache.http.wire - << " [\n]"
16:07:17.170 [main] DEBUG org.apache.http.wire - << "</body>[\n]"
16:07:17.174 [main] DEBUG org.apache.http.wire - << "</html>[\n]"
16:07:17.178 [main] DEBUG o.a.h.i.c.BasicClientConnectionManager - Releasing connection org.apache.http.impl.conn.ManagedClientConnectionImpl#c1fca2a
16:07:17.188 [main] DEBUG o.a.h.i.c.BasicClientConnectionManager - Connection can be kept alive indefinitely Not Found
Display stack trace? [yN]
And also often i get:
15:38:20.276 [Finalizer] DEBUG o.a.h.i.conn.DefaultClientConnection - Connection 0.0.0.0:60710<->127.0.0.1:8080 closed
I have checked for the opened ports, and i also found that 8080 port is opened.
Note that the Gephi Plugin was only recently made compliant with Gephi 0.9.x as of TinkerPop 3.2.1-SNAPSHOT a few days ago. As you are using Titan 1.0, I would guess that you have an older version. I would recommend going back to Gephi 0.8.x beta if you want everything to work seamlessly.
All that said, you might yet be able to get it to work. The default workspace that Gephi provides is no longer "workspace0" - it is now indexed starting at "1". You can change the workspace used by the Gremlin remote by doing:
:remote config workspace workspace1
That should allow the data to be sent to Gephi and it should show in the "laboratory" pane. You may yet have problems with the visualization. I found that while fixing this problem that not auto-setting the "size", "x" and "y" properties to "sensible" things seemed to prevent the visualization pane from displaying the vertices and edges. I think that you would need to add those properties to any graph you wanted to push across to Gephi. The patch I did set the size to "10" and the x/y were set to a random float - setting them all to to zero/zero (i.e. the same positions) did not work.
All of the above workaround instructions are mostly for informational purposes. That's probably a lot of extra work that you don't need to do when downloading Gephi 0.8.x is a pretty easy course of action.