Hello Philipp,
I have implemented the debug trace which returned the following:
<?xml version="1.0" encoding="UTF-8"?><?xml version="1.0" encoding="UTF-8"?><stsuuser:STSUniversalUser xmlns:stsuuser="urn:ibm:names:ITFIM:1.0:stsuuser"> <stsuuser:Principal> <stsuuser:Attribute name="name" type="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress"> <stsuuser:Value>
email@address.nl</stsuuser:Value> </stsuuser:Attribute> </stsuuser:Principal> <stsuuser:AttributeList> <stsuuser:Attributename="groups" type="urn:oasis:names:tc:SAML:2.0:attrname-format:basic"> <stsuuser:Value>SugarCRM Test</stsuuser:Value> <stsuuser:Value>Office365</stsuuser:Value> <stsuuser:Value>Box</stsuuser:Value> </stsuuser:Attribute> <stsuuser:Attribute name="AuthnContextClassRef" type="urn:oasis:names:tc:SAML:2.0:assertion"> <stsuuser:Value>urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport</stsuuser:Value> </stsuuser:Attribute> </stsuuser:AttributeList> <stsuuser:RequestSecurityToken/> <stsuuser:ContextAttributes/> <stsuuser:AdditionalAttributeStatement/></stsuuser:STSUniversalUser>
So the attributes I added in the proxy config ("mobileNumber = mobile" or "commonName = cn") are not present in the trace.
I think only the attributes in the integrated LDAP (Policy administration) may be passed and everything I add in the
[TAM_CRED_ATTRS_SVC:eperson] stanza is ignored.
I have looked at the cookbooks paragraphs about mapping rules (6.2.x) but what is described there has been done.
Maybe it has something to do with the federated directory?
Best regards,
Maarten Loor
------------------------------
Maarten Loor
------------------------------
Original Message:
Sent: Tue July 02, 2019 10:49 AM
From: Philipp Klueter
Subject: Adding AD attritutes to the SAML token
Hi Maarten,
so the [TAM_CRED_ATTRS_SVC:eperson] stanza is used to add data of the ISAM user registry to the user session. It can subsequently be accessed in the mapping rule. More Information on this : https://www.ibm.com/support/knowledgecenter/en/SSPREK_9.0.7/com.ibm.isam.doc/wrp_config/task/tsk_spec_attr_add_crdl.html
The error shown looks like an Javascript error in your mapping rule. You can trace your mapping rule using the runtime tracing under > Monitor > Logs > Runtime Tracing you can find the files under Monitor > Logs > Application Log Files > federation > runtime > trace.log
A good trace level to start is "com.tivoli.am.fim.trustserver.sts.utilities.*=ALL" this traces the IDMappingExtUtils.traceString() function. With
IDMappingExtUtils.traceString("idp mapping rule called with stsuu: " + stsuu.toString());
you can trace the whole stsuu. Do not forget to import the package:
importPackage(Packages.com.tivoli.am.fim.trustserver.sts.utilities);
I think this should be enough to get you started with getting your ready to modify your mapping rules. Though I still think reading through the cookbook will help you to get more information.
Regards
Philipp
------------------------------
Philipp Klueter
Original Message:
Sent: Tue July 02, 2019 10:13 AM
From: Maarten Loor
Subject: Adding AD attritutes to the SAML token
Thanks Philipp,
The problem with pointing to documentation or cookbooks is that they contain so much information that is not relevant to the goal I want to archive, I get lost in "terms". I am not that familiar with ISAM that I can simply get the information I need from that kind of documentation.
I still am not any futher passing anything from AD to the XML. I am also not sure why I need to fill out the reverse proxy section [TAM_CRED_ATTRS_SVC:eperson]. It does not seem to matter if I add it or not.
The information I need is in the LDAP of AD. Whenever I use the stsuu.getAttributeContainer().getAttributeValueByName("attributename"); function the ISAM just throws an error:
/sps/ibmci/saml20/auth
2019-07-02T14:12:36Z
Error details
FBTSML225E Token exchange failed.Stack trace
(so no stack trace indeed)
------------------------------
Maarten Loor
Original Message:
Sent: Tue July 02, 2019 03:33 AM
From: Philipp Klueter
Subject: Adding AD attritutes to the SAML token
Hi Maarten,
any attribute which is not found in the LDAP will not be added to the credential and is therefore not available in the mapping rule or SAML token.
In the following Cookbook from Jon Harry you can also find additional information on how to manage the SAML token mapping and how to call a second STS to make LDAP lookup calls against attribute sources. But if all attributes you want to add are in the ISAM LDAP anyway, you should not need this.
https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/IBM%20Security%20Federated%20Identity%20Manager/page/Federation%20Cookbook/comment/3ab86bb5-7930-479c-b6c5-85c28141aaa3
Note: I'm unaware if there is any newer version out there but the SAML setup has not really changed since 9.0.3.
Regards,
Philipp
------------------------------
Philipp Klueter
Original Message:
Sent: Tue July 02, 2019 02:09 AM
From: Maarten Loor
Subject: Adding AD attritutes to the SAML token
Thanks Mike.
I have added a custom parameter like this to the reverse proxy configuration:
[TAM_CRED_ATTRS_SVC:eperson]
emailAddress = mail
mobileNumber = mobile
commonName = cn
familyName = sn
description = description
sometest = sometest
Should the "sometest" attribute show up (with an empty value) in the XML token using the SAML-tracer? because it doesn't :(
I had to add the emailAddress and mobileNumber as well. They do not show up either.
------------------------------
Maarten Loor
Original Message:
Sent: Mon July 01, 2019 04:55 PM
From: Mike Book
Subject: Adding AD attritutes to the SAML token
You will need to do a couple things to have the additional attributes sent in the SAML assertion to Cloud Identity:
1. Configure your ISAM reverse proxy instance to add the additional attributes to the user credential generated when the user authenticates. Edit the reverse proxy configuration file, look for the [TAM_CRED_ATTRS_SVC:eperson] stanza, and add the additional attributes:
[TAM_CRED_ATTRS_SVC:eperson]
emailAddress = mail
mobileNumber = mobile
commonName = cn
familyName = sn
description = description
2. Configure the ISAM mapping rule for your ISAM to Cloud Identity federation and insert the relevant additional attributes in this JavaScript mapping rule. An example ISAM - Cloud Identity mapping rule can be found here: http://ibm.biz/BdZBhm
You can either replace your existing federation mapping module with this one or just add the relevant lines to your existing one. You will need to edit your federation to find out the name of your existing mapping rule.
------------------------------
Mike Book
Identity and Access Management CyberSecurity Specialist
IBM
St. Louis MO
Original Message:
Sent: Mon July 01, 2019 10:16 AM
From: Maarten Loor
Subject: Adding AD attritutes to the SAML token
I am trying to pass information from AD -> ISAM -> IBM CLoud Identity -> Office 365. For this to work I need to add custom attributes values to the SAML2 token.
I am struggeling finding information for that. I already added a fixed value attribute on the ISAM to "Secure Federation / Attribute Souce" but it doesn not show up in the XML (intercepted with the SAML-tracer for Firefox).
What am I doing wrong?
------------------------------
Maarten Loor
------------------------------