Jazz Authorization Server (JAS) can be configured to use the System for Cross-domain Identity Management (SCIM) for the WebSphere Liberty profile. SCIM is a standard for cloud-based identity management for single sign-on (SSO) in browsers. It is a RESTful protocol for identity account management operations.
This article will focus on the configuration steps to setup CLM / ELM with JAS for SCIM.
CLM
JAS
[JazzAuthServer_Install_Dir]/wlp/usr/servers/jazzop/defaults
folder one level up to [JazzAuthServer_Install_Dir]/wlp/usr/servers/jazzop/
server.xml
, appConfig.xml
and ldapUserRegistry.xml
appConfig.xml
- Contains Jazz Group/Role mappings and UserRegistry file information
ldapUserRegistry.xml
- Configuring Liberty with an LDAP user registry
[JazzAuthServer_Install_Dir]/wlp/usr/servers/jazzop/server.xml
and include the following in the list of features
<feature>scim-1.0</feature>
[JazzAuthServer_Install_Dir]/wlp/usr/servers/jazzop/appConfig.xml
file and towards the end of the file change the following <include location="localUserRegistry.xml" optional="true"/> <!--include location="ldapUserRegistry.xml" optional="true"/-->TO
<!--include location="localUserRegistry.xml" optional="true"/--> <include location="ldapUserRegistry.xml" optional="true"/>
[JazzAuthServer_Install_Dir]/wlp/usr/servers/jazzop/ldapUserRegistry.xml
and modify to match your environment, examples below
<server> <ldapRegistry ldapType="Microsoft Active Directory" baseDN="CN=Users,DC=test,DC=com" bindDN="CN=CLM Admin,CN=Users,DC=test,DC=com" bindPassword="********" host="ldapserver" id="ldapserver:389" ignoreCase="true" port="389" realm="ldapserver:389" recursiveSearch="true" sslEnabled="false"> <activedFilters userFilter="(&(sAMAccountName=%v)(objectcategory=user))" groupFilter="(&(cn=%v)(objectcategory=group))" userIdMap="user:sAMAccountName" groupIdMap="*:cn" groupMemberIdMap="memberOf:member" > </activedFilters> <attributeConfiguration> <attribute name="cn" propertyName="displayName" entityType="PersonAccount"/> <!-- propertyName is the scim property, name is the ldap property--> </attributeConfiguration> </ldapRegistry> <federatedRepository> <primaryRealm name="FVTRegistry"> <participatingBaseEntry name="CN=Users,DC=test,DC=com"/> </primaryRealm> </federatedRepository> <administrator-role> <user>clmadmin</user> <group>MyJazzAdmins</group> </administrator-role> </server>
<administrator-role>
tag are SCIM Administrators
< attributeConfiguration >
is mandatory as the displayName
SCIM property is mapped to Name attribute in CLM / ELM. You can change the LDAP attribute mapping from cn
to as per your organization's requirement.
<server> <ldapRegistry ldapType="IBM Tivoli Directory Server" baseDN="o=test.com" bindDN="uid=clmadmin,c=in,ou=Users,o=test.com" bindPassword="********" host="ldapserver" id="ldapserver:389" ignoreCase="true" port="389" realm="ldapserver:389" recursiveSearch="true" searchTimeout="10m" sslEnabled="false"> <idsFilters groupFilter="(&(cn=%v)(|(objectclass=groupOfUniqueNames)(objectclass=posixGroup)))" groupIdMap="*:cn" groupMemberIdMap="groupOfUniqueNames:uniquemember" userFilter="(&(uid=%v)(objectclass=person))" userIdMap="*:uid"> </idsFilters> <attributeConfiguration> <attribute name="cn" propertyName="displayName" entityType="PersonAccount"/> <!-- propertyName is the scim property, name is the ldap property--> </attributeConfiguration> <ldapEntityType name="PersonAccount"> <searchBase>c=in,ou=Users,o=test.com</searchBase> </ldapEntityType> <ldapEntityType name="Group"> <searchBase>ou=JazzGroups,ou=Groups,o=test.com</searchBase> </ldapEntityType> </ldapRegistry> <administrator-role> <user>myscimadmin</user> </administrator-role> </server>
<administrator-role>
tag are SCIM Administrators
< attributeConfiguration >
is mandatory as the displayName
SCIM property is mapped to Name attribute in CLM / ELM. You can change the LDAP attribute mapping from cn
to as per your organization's requirement
< ldapEntityType >
tag is not mandatory, but can be used to limit the User and group query scope
<server> <ldapRegistry ldapType="Custom" baseDN="dc=example,dc=com" host="ldapserver" id="ldapserver:10389" ignoreCase="true" port="10389" realm="ldapserver:10389" recursiveSearch="true" sslEnabled="false" timestampFormat="yyyyMMddHHmmss.SSSSSSZ"> <customFilters groupFilter="(&(cn=%v)(|(objectclass=groupOfUniqueNames)(objectclass=posixGroup)))" groupIdMap="*:cn" groupMemberIdMap="groupOfUniqueNames:uniquemember" userFilter="(&(uid=%v)(objectclass=inetOrgPerson))" userIdMap="*:uid" > </customFilters> <attributeConfiguration> <attribute name="cn" propertyName="displayName" entityType="PersonAccount"/> <!-- propertyName is the scim property, name is the ldap property--> </attributeConfiguration> </ldapRegistry> <administrator-role> <user>myscimdmin</user> </administrator-role> </server>
< attributeConfiguration >
is mandatory as the displayName
SCIM property is mapped to Name attribute in CLM / ELM. You can change the LDAP attribute mapping from cn
to as per your organization's requirement
<administrator-role>
tag are SCIM Administrators
< timestampFormat >
attribute as shown above resolves the error.
<federatedRepository maxSearchResults="100000" />
[JazzAuthServer_Install_Dir]/wlp/bin/securityUtility
$ securityUtility encode userPasswordwhere userPassword is the password to encode
Map Groups or Users as JAS Administrators who can perform JAS CLI operations, register Applications to JAS and access WebSphere Liberty AdminConsole
<oauth-roles> <authenticated> <special-subject type="ALL_AUTHENTICATED_USERS" /> </authenticated> <clientManager> <group name="MYJazzAdmins" /> <user name = "myscimadmin" /> </clientManager> </oauth-roles>
When you first install JAS, it comes configured to use a local Derby database for storing information. It is not recommended to use Derby database for a production environment and note that Derby database won't work in a clustered JAS environment, since that information won't be available to all the instances.
The basic steps to configure the database are:
The following links provide information for Oracle, MSSQL and DB2 database servers and sample SQL scripts are available that can create the necessary tables. But note that you will need to customize these scripts for your own environment.
$ cd JazzAuthServer_install_dir $ ./start-jazz
Note
The Jazz Group to Registry Group Mapping configuration is important for User to jazz group role mapping. When Users accesses an ELM application URL, they are redirected to JAS for Authentication. Post successful authentication JTS will fetch group information with SCIM details mentioned under com.ibm.team.repository.service.jts.internal.userregistry.scim.SCIMUserRegistryProvider
By default the CLM login Id is configured to Ldap UserId attribute, example sAMAccountName
or uid
. If you wish to change the the CLM Login value to another LDAP attribute here are the steps.
https:/jtsserver:port/jts/admin
page and Click Server > Advanced Properties and search for the property SCIM Property to User ID mapping
mobile | phoneNumbers/type=mobile | LDAP User Mobile |
Ldap UserId Attribute | SCIM Property to UserId Mapping | User Name |
sAMAccountName, uid | userName (default value) | LDAP User Uid |
emails | LDAP User Email | |
emails/type=work | LDAP User Email 2 |
{"emails":[{"value":"shubjitnaik@testmail.com", "where":"work"},{"value":"shubjit1@homemail.com", "where":"home"}], "location":"https:\/\/jasserver:9643\/ibm\/api\/scim\/Users\/uid=shubjit,ou=Users,dc=ldap,dc=com", "displayName":"Shubjit Naik","schemas":["urn:scim:schemas:core:1.0"],"id":"uid=shubjit,ou=Users,dc=ldap,dc=com", "name":{"formatted":"Shubjit Naik","givenName":"Shubjit","familyName":"Naik"},"userName":"shubjit"}
https://[JAS_SERVER]:[JAS_PORT]/ibm/api/scim/Users/uid=shubjit,ou=Users,dc=ldap,dc=com
userName
attribute value is used as CLM login Id, in this case it is shubjit
emails
would not work as there are multiple email addresses associated with the user and it would result in an error
emails/where=work
which will extract shubjitnaik@testmail.com
as the value to Login to CLM
Synchronize Jazz Team Server Users With External User Registry
During JTS setup , Step 6 or when you change the User Registry type to SCIM in JTS Admin > Advanced properties the following Error is encountered
A call to the SCIM provider failed. Description: Internal Server Error. Details: Unexpectd character "69": line1, column 1, uri=https://<JAS_URL>/ibm/api/scim/Users?count=1&startIndex=1&attributes=*
Cause - JAS Server running our of memory. Following errors would be registered in JAS logs
[3/10/21 10:20:13:366 EST] 00000036 com.ibm.ws.webcontainer.srt W SRVE8115W: WARNING: Cannot set status. Response already committed. [3/10/21 10:28:40:693 EST] 000001a4 SystemErr R Exception in thread "Default Executor-thread-90" [3/10/21 10:28:40:695 EST] 000001a4 SystemErr R java.lang.OutOfMemoryError [3/10/21 10:28:40:696 EST] 000001a4 SystemErr R : [3/10/21 10:28:40:696 EST] 000001a4 SystemErr R Java heap space [3/10/21 10:28:40:696 EST] 000001a4 SystemErr R at [3/10/21 10:28:40:696 EST] 000001a4 SystemErr R java.util.concurrent.ConcurrentLinkedQueue FFDC1015I: An FFDC Incident has been created: "java.lang.OutOfMemoryError: Java heap space com.ibm.ws.tcpchannel.internal.WorkQueueManager workerRun(req)" at ffdc_21.03.10_10.28.40.0.log
Resolution - Increase the Java Heap space allocated to JAS. By default 500 MB is allocated. To increase the heap perform the following
jvm.options
in [JAS_HOME]\wlp\usr\server\jazzop\
-Xms2G -Xmx4G
During JTS setup , step 6 or when we change the User Registry type in JTS Admin > Advanced properties the following Error is encountered
A call to the SCIM provider failed. Description: Internal Server Error. Details: A call to the SCIM provider failed. Description: https://<JAS_URL>/ibm/api/scim/Users?count=1&startIndex=1&attributes=*
Cause : The URL https://[JAS_URL]/ibm/api/scim/Users?count=1&startIndex=1&attributes=*
fails to load. You would see errors similar to
{"Errors":[{"code":"500","description":"com.ibm.wsspi.security.wim.exception.WIMSystemException: CWIML1013E: The user registry operation could not be completed. The entered value of the property manager is not valid for the entity uid=user1,ou=Users,dc=test,dc=com. The value of the property must be correct and must be of the correct data type."}]}
Our investigations revealed that there are identifier attributes like manager
or secretary
which links to users that does not exist in the LDAP registry. Based on the above error if we lookup for the user uid=user1
on the LDAP registry, the attribute manager
linked to a non existing user. In such cases you would encounter an error.
Resolution - You can remap the identifier attributes. For example, manager could be remapped as shown in example snippet below.
<ldapRegistry ... > ... <attributeConfiguration> ... <!-- 1. We are mapping the manager property to a non-existent attribute so that no value is found. 2. We are mapping the newly defined extended property myManager to manager. We have defined the syntax as a string so that it will not treat it as an Identifier and try to look it up. --> <attribute name="notsupported" propertyName="manager" syntax="Identifier" entityType="PersonAccount" /> <attribute name="manager" propertyName="myManager" syntax="String" entityType="PersonAccount" /> </attributeConfiguration> ... </ldapRegistry> <federatedRepository ...> <!-- Add an extended property myManager that we can use to look up any managers. --> <extendedProperty dataType="String" name="myManager" entityType="PersonAccount" /> </federatedRepository>
Post restart of JAS server try loading the URL https://[JAS_URL]/ibm/api/scim/Users?count=1&startIndex=1&attributes=*
Status icon key: