Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
JHO1
Contributor
Contributor

Error "Assertion can not be validated" [error code 401 Unathorized] when using Authentication SAML token to secure REST API on Talend ESB Open studio version 7.0 and 7.3

Issue encountered :

Encountered always the error "Assertion can not be validated" [error code 401 Unathorized] when calling the endpoint beside client using Authentication SAML token while the STS token was generated without issue.

Details:

I developed a rest API on talend open studio ESB using the tRESTRequest component and activating SAML token authentication to secure client requests with a token as you can see below the Design:

0695b00000DtGwDAAV.png

This job has been successfully deployed on Talend's container Runtime and the configurations are OK as you can see below:

1) Secure Token service (STS) activation on container Runtime (apache karaf):

0695b00000DtG69AAF.png

2) Deployment of the JOB on Runtime:

0695b00000DtGwdAAF.png

Next Generated the Token used to call the endpoint:

I used the following link to generate the STS Token: http://coheigea.blogspot.com/2016/09/invoking-on-talend-esb-sts-using-soapui.html. in fact, we ask the STS for a SAML Token by using RequestSecurityToken part on the SOAP request as below :

0695b00000DtH0eAAF.png

And the SOAP Response on successful invocation of STS is shown below:

0695b00000DtGwxAAF.png

After I switched to RAW XML and extract SAML Assertion as below :

0695b00000DtH2pAAF.png

In fact to call the REST API using an authentication token, we need to deflate and base64-encode a SAML Message before sending it like below :

(I used the following link https://www.samltool.com/encode.php to encode the xml response from STS)

0695b00000DtH3JAAV.png

Invocation of REST service using Postaman and a curl command:

I used this token generated to call the api on client side as below :

Response on POSTMAN tool to execute the api with the error "Assertion can not be validated" [error code 401 Unathorized]:

0695b00000DtH4RAAV.png

So I always got this above error when testing on postman tool

Could you please see and give me what is the cause of this error and the correction that I must be made in order to remedy this error?

Thank you for your feedback.

Labels (3)
1 Reply
JHO1
Contributor
Contributor
Author

Hi Guys,

 

Would you please share any update or comments on the above issue I encountered ?

Thank you in advance for your feedback.

 

JHO