Hello,
I am trying to send a JWT token down a junction without using TFIMSSO. The data is coming via SAML federation token which I then use a mapping rule to update my credentials. In the mapping rule, I applied code to invoke the STS chain to generate the JWT token and then I return that JWT token back to the ISAM via EAI. Finally now that it is in the session, I configured an Extended Attribute which sends it down the junction.
I have gotten everything to work as I outlined above. However, the JWT token contains some XML tags that is surrounding it.
Below is an example of what I see (note: JWT.TOKEN.DATA is valid data I want to keep):
<wss:BinarySecurityToken+wss:EncodingType="http://ibm.com/2004/01/itfim/base64encode"+wss:ValueType="urn:com:ibm:JWT">JWT.TOKEN.DATA</wss:BinarySecurityToken>
How do I update my mapping rule to remove those XML tags on each side of my JWT Token?
Below is my code I got this to work:
var JWT_TOKEN = ""
var base_element = stsuu.toXML().getDocumentElement();
//Call STS to get JWT Token
var res = LocalSTSClient.doRequest("http://schemas.xmlsoap.org/ws/2005/02/trust/Issue", "TT:STSUU:2:JWT", "TT:ISAM", base_element, null);
if (res.errorMessage == null) {
JWT_TOKEN = IDMappingExtUtils.xmlElementToString(res.token);
IDMappingExtUtils.traceString("Issued JWT Token: : " + JWT_TOKEN); }
else {
IDMappingExtUtils.traceString("JWT Token Error : " + res.errorMessage);
}
if(JWT_TOKEN != null){
var JWTAttr = new Attribute("com-transamerica-jwt","urn:ibm:names:ITFIM:5.1:accessmanager", JWT_TOKEN );
stsuu.addAttribute(JWTAttr);
}
My focus has been on the IDMappingExtUtils object hoping to find something that will return the data and exclude the tags. But so far no good. Any help would be appreciated as I track this down.