JIT User Provisioning in OAM and SP

This article discusses on how to add user provisioning to OAM/SP which allows the server to create a user record on the fly during Federation SSO, if the user does not have an account yet.

During a Federation SSO operation, OAM/SP validates the incoming SSO response (SAML or OpenID) and attempts to map it to a local LDAP user record based on information contained in the SSO response (typically user attributes):

OAM/SP validates the SSO response, process the attributes using rules defined in the IdP Attribute Profile for the IdP partner, and if needed invokes the User Provisioning module configured in OAM/SP:

After the invocation of the User Provisioning module (default or custom), the server creates a session for the user. Subsequent Federation SSO operations for the same user results in OAM/SP mapping the SSO response to that newly created LDAP record.

Built-in User Provisioning Module

The built-in User Provisioning module allows a user record to be created in the LDAP directory when mapping fails by:

Important Note: The above algorithm is somewhat complex, but it allows an administrator

Enabling User Provisioning in OAM/SP

Perform the following steps to enable/disable User Provisioning in OAM/SP:

  1. Enter the WLST environment by executing: $IAM_ORACLE_HOME/common/bin/wlst.sh

  2. Connect to the WLS Admin server: connect()

  3. Navigate to the Domain Runtime branch: domainRuntime()

  4. Update the userprovisioningenabled property to:

  5. Exit the WLST environment: exit()

Testing Setup

Use the same SAML 2.0 Federation setup that was previously configured, where:

During a SAML 2.0 Federation SSO with the remote IdP partner, the XML SAML Response with the Assertion sent back by the IdP would be:

<samlp:Response ..>
    <saml:Issuer ...>http://acme.com/idp</saml:Issuer>
    <samlp:Status>
        <samlp:StatusCode
Value="urn:oasis:names:tc:SAML:2.0:status:Success"/>
    </samlp:Status>
    <saml:Assertion ...>
        <saml:Issuer ...>http://acme.com</saml:Issuer>
        <dsig:Signature ...>
        ...
        </dsig:Signature>
        <saml:Subject>
<saml:NameID ...>alice</saml:NameID>
            ...
        </saml:Subject>         <saml:Conditions ...>
         ...
        </saml:Conditions>         <saml:AuthnStatement ...>
        ...
        </saml:AuthnStatement>
        <saml:Attributestatement ...>
            <saml:Attribute Name="email" ...>
                <saml:AttributeValue
...>alice@oracle.com</saml:AttributeValue>
            </saml:Attribute>
            <saml:Attribute Name="title" ...>
                <saml:AttributeValue
...>manager</saml:AttributeValue>
            </saml:Attribute>
            <saml:Attribute Name="surname" ...>
                <saml:AttributeValue
...>Appleton</saml:AttributeValue>
            </saml:Attribute>
            <saml:Attribute Name="fname" ...>
                <saml:AttributeValue
...>Alice</saml:AttributeValue>
            </saml:Attribute>
        </saml:Attributestatement>
    </saml:Assertion>
</samlp:Response>

The result of the processing of the SAML 2.0 Assertion by OAM/SP shows the transformed attributes as well as the NameID

Description of the illustration Operation_Result.jpg

Test Cases

The test cases showcases different configurations for the User Provisioning module, with the user alice not existing in OAM/SP before each test:

Use Case #1:

Use Case #2:

Use Case #3:

Use Case #4:

Use Case #5:

After each Federation SSO operation, print out the LDAP user record of the user created and subsequently deletes that record before the next test.

Important note: The IdP Attribute Profile must map the incoming SAML Attribute names to the attribute names that is used in the LDAP directory. That’s why in our test IdP Attribute Profile, fname is mapped to givenname. The built-in User Provisioning plugin takes the attribute names from the list of processed attributes and add them as is to the LDAP user record (if configured to do so): there is no additional attribute name mapping.

Use Case #1

In this use case, the setup is such that:

After Federation SSO, the user record for alice was created:

dn: uid=alice,ou=users,dc=us,dc=oracle,dc=com
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: top
uid: alice
cn: alice
sn: alice

The LDAP user record has the following characteristics:

Use Case #2

In this use case, the setup is such that:

After Federation SSO, the user record for alice was created:

dn: uid=alice,ou=users,dc=us,dc=oracle,dc=com
mail: alice@oracle.com
objectClass: person
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: top
uid: alice
cn: alice
sn: alice

The LDAP user record has the following characteristics:

Use Case #3

In this use case, the setup is such that:

To do so, perform the following steps:

  1. Go to the OAM Administration Console: http(s)://oam-admin-host:oam-adminport/oamconsole

  2. Navigate to Access Manager, Plugins

  3. Select the FedUserProvisioningPlugin

  4. In the KEY_USER_RECORD_ATTRIBUTE_LIST field, enter givenname, sn and mail as a comma separated list without spaces: givenname,sn,mail

  5. Click Save

Description of the illustration Plug_ins_Screen.jpg

After Federation SSO, the user record for alice is created:

dn: uid=alice,ou=users,dc=us,dc=oracle,dc=com
mail: alice@oracle.com
givenName: Alice
objectClass: person
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: top
uid: alice
cn: alice
sn: alice
sn: Appleton

The LDAP user record has the following characteristics:

Use Case #4

In this use case, the setup is such that:

To do so, perform the following steps:

  1. Go to the OAM Administration Console: http(s)://oam-admin-host:oam-adminport/oamconsole

  2. Navigate to Access Manager, Plugins

  3. Select the FedUserProvisioningPlugin

  4. Set the KEY_USER_RECORD_ATTRIBUTE_LIST field to blank value

  5. Set the KEY_USERID_ATTRIBUTE_NAME field to givenname

  6. Click Save

Description of the illustration Access_mngt.jpg

After Federation SSO, the user record for alice is created:

dn: uid=Alice,ou=users,dc=us,dc=oracle,dc=com
mail: alice@oracle.com
objectClass: person
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: top
uid: Alice
cn: Alice
sn: Alice

The LDAP user record has the following characteristics:

Use Case #5

In this use case, the setup is such that:

To do so, perform the following steps:

  1. Go to the OAM Administration Console: http(s)://oam-admin-host:oam-adminport/oamconsole

  2. Navigate to Access Manager, Plugins

  3. Select the FedUserProvisioningPlugin

  4. Set the KEY_USER_RECORD_ATTRIBUTE_LIST field to (comma separated list without spaces): givenname,sn

  5. Set the KEY_USERID_ATTRIBUTE_NAME field to fed.nameidvalue, which is the name of the attribute for the NameID value

  6. Click Save

Description of the illustration Access_mngt_nameID_Value.jpg

After Federation SSO, the user record for alice is created:

dn: uid=alice,ou=users,dc=us,dc=oracle,dc=com
mail: alice@oracle.com
givenName: Alice
objectClass: person
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: top
uid: alice
cn: alice
sn: alice
sn: Appleton

The LDAP user record has the following characteristics:

More Learning Resources

Explore other labs on docs.oracle.com/learn or access more free learning content on the Oracle Learning YouTube channel. Additionally, visit education.oracle.com/learning-explorer to become an Oracle Learning Explorer.

For product documentation, visit Oracle Help Center.