Wednesday Dec 16, 2015

Using OUD plugin for SAML authentication with OAM against users stored in SQLServer

Here is a practical example about how to use a custom OUD plugin to speed up deployment of an Identity Management solution for a fraction of the price compared to developing a custom connector:

The use-case is to enable SAML authentication as an IDP where some of the users are stored in a SQLServer database and some in AD (external users in DB, internal users in AD).

The customer is planning to have OAM authenticate the users and perform the role of a SAML IDP doing LDAP authentication for users stored in the database and Kerberos for the users stored in AD. In order to allow OAM to authenticate users that are stored in the database, OUD can be deployed as a RDBMS proxy thanks to the RDBMS workflow element feature, so that users stored in a database table are exposed as a LDAP tree that OAM will authenticate against.

Problem is with the password field in the database that is hashed in a specific way.  

The trick is to deploy a custom OUD plugin component ahead of the RDBMS workflow element. That plugin is responsible for processing bind requests only. Upon reception of a bind request against a user stored in SQLServer, the custon plugin retrieves the user entry containing hashed password and salt, accesses the plain text password provided in the bind request, and performs the password comparison based on custom logic. 

Design, dev and testing took me a couple of days, much simpler and cost effective than adding support for this new source in OAM/OIM.


 

Tuesday Dec 15, 2015

Oracle E-Business Suite certified with Unified Directory

Oracle Unified Directory 11gR2 Patchset 3 (11.1.2.3.0) is now certified for use with Oracle E-Business Suite Release 12.2.

Oracle Unified Directory 11gR2 Patchset 3 (11.1.2.3.0) (along with Directory Integration Platform 11gR1 Patchset 7 (11.1.1.9.0)) can be integrated with Oracle Access Manager 11gR2 Patchset 3 (11.1.2.3) as a single sign-on solution. For availability and other information on Oracle Unified Directory, refer to the articles listed in the documentation section below.

  • My Oracle Support Knowledge Document 2003483.1 - Integrating Oracle E-Business Suite Release 12.2 with Oracle Unified Directory 11gR2 
  • My Oracle Support Knowledge Document 1576425.1 - Integrating Oracle E-Business Suite Release 12.2 with Oracle Access Manager 11gR2 (11.1.2) using Oracle E-Business Suite AccessGate
  • My oracle Support Knowledge Document 1388152.1 - Overview of Single Sign-On Integration Options for Oracle E-Business Suite
  • Oracle Fusion Middleware Installation Guide for Oracle Identity and Access Management 11g Release 2 (11.1.2) (E27301-04)
  • Oracle Fusion Middleware Installation Guide for Oracle Unified Directory 11g Release 2 (11.1.2) (E23737-02)
  • Oracle Fusion Middleware Installing Oracle Unified Directory 11g Release 2 (11.1.2) (E56132-02)
  • Oracle Fusion Middleware Installation Guide for Oracle Identity Management 11g Release 1 (11.1.1.9.0) (E12002-13)
  • Oracle Fusion Middleware Administrator's Guide for Oracle Unified Directory 11g Release 2 (11.1.2) (E22648-02)
  • Oracle Fusion Middleware Administrator's Guide for Oracle Directory Integration Platform (E56469-01)
  • Oracle Fusion Middleware Patching Guide 11g Release 1 (11.1.1.9.0) (E16793-28)
  • Thursday Sep 10, 2015

    Migration from OID to OUD: Adapting EUS metadata

    Enterprise User Security is an important component of Oracle Database Enterprise Edition. It enables you to address administrative and security challenges for a large number of enterprise database users by centralizing users and roles in a LDAP directory.

    It is possible to use either Oracle Internet Directory (OID) or Oracle Unified Directory (OUD) as LDAP repository for EUS.

    To migrate from OID to OUD, 
    - enable EUS support in OUD
    - copy your user and groups in <your_context)
    - copy across EUS metadata (in cn=oracleContext,<your suffix)

    EUS metadata as stored in OID must be slighly adapted before being impoorted to OUD otherwise the DB won't be able to authenticate against OUD and will raise the following error:

    ORA-28043: invalid bind credentials for DB-OID connection

    Migrating the DB entry from OID to OUD requires some specific steps for SASL/DIGEST-MD5 authentication. In OID, the password hash used for SASL/DIGEST-MD5 authentication is stored in authpassword;oid, with the {SASL/MD5} prefix.
    In OUD, this must be stored in orclcommonrpwdattribute with the {SASL-MD5} prefix.

    For instance:

    In OID:
    ldapsearch [conn details] -b cn=oraclecontext,dc=example,dc=com -s one "(cn=orcl11g)" authpassword
    dn: cn=orcl11g,cn=oraclecontext,dc=example,dc=com
    authpassword;oid: {SASL/MD5}ola+G+GFsSeiu6QcRiAh9g==
    authpassword;oid: {SASL/MD5-DN}3UeqmU5Axd+XVAM9Lxf28g==
    authpassword;oid: {SASL/MD5-U}BD6uyBcSiFbGtlPzq6TtUA==

    In OUD:
    ldapsearch [conn details] -b cn=oraclecontext,dc=example,dc=com -s one "(objectclass=orcldbserver)" orclcommonrpwdattribute
    dn: cn=orcl11g,cn=OracleContext,dc=example,dc=com
    orclcommonrpwdattribute: {SASL-MD5}ola+G+GFsSeiu6QcRiAh9g==


    Monday Jul 20, 2015

    OUD Directory Server vs Replication Server: Who Cares ?

    Oracle Unified Directory replication model relies on 2 logical components, Directory Servers and Replication Servers. Directory Servers contain user data, pushes changes to replication changed and get updates from replication servers. Replication Server stores replication changes, they receive changes to directory servers and forward them to the rest of the topology.

    By default, you don't need to care about Replication Servers. Replication Servers and internal components managed automatically: a Replication Server is autimatically configured in each OUD DIrectory Server process when replication is configured.

    OUD Replication Server and Directory Servers are NOT equivalent to DSEE Suppliers and Consumers. By default, every replicated OUD is a Read-Write Supplier/Master.

    When do you need to know about replication servers? - Primarily, when full network connectivity cannot be guarantied across every instance as every Replication Server must be able to communicate to each other. - Optionally, Replication Servers and DIrectory Servers can be separated to optimize resource usage in large OUD topologies (10's of instances) - To enable external changelog service on a standalone OUD instance (for instance in a test environment) as a Replication Server is required is such case.

    Example:

    Tuesday May 19, 2015

    Oracle Unified Directory 11gR2 PS3 available for download

    The Identity Management 11gR2 PS3 release, including OUD 11gR2 PS3 is available on eDelivery.  
    To download OUD, go to http://www.oracle.com/technetwork/middleware/id-mgmt/downloads/oid-11gr2-2104316.html
    and select OUD 11gR2 PS3 

    R2PS3 documentation is available at http://docs.oracle.com/cd/E52734_01/oud/docs.htm

    Certification Matrix is available at http://www.oracle.com/technetwork/middleware/id-mgmt/documentation/identity-access-111230certmatrix-2539086.xlsx

    Wednesday Apr 08, 2015

    New OUD Source Code plugin examples

    I've just published a couple of OUD plugin examples to help customers develop their own extensions.

    The ZIP package includes 2 plugin examples to demonstrate the richness of OUD plugin API. The FilterDistributor can be used to route bind request to 2 different workflow elements based on a condition present on the user entry about to be used for authentication. The PasswordSchemeUpgrade  can be used to migrate passwords from one storage/encryption scheme to another.

    Plugins examples are available at http://www.oracle.com/technetwork/middleware/id-mgmt/learnmore/oid-demos-182820.html

    OUD Plugin API reference is available at http://docs.oracle.com/cd/E49437_01/apirefs.111220/e38583/index.html

    OUD Plugin Developer Guide is available at http://docs.oracle.com/cd/E49437_01/doc.111220/e38455/toc.htm

    Tuesday Mar 10, 2015

    Support Dates for ODSEE have been updated

    FYI, the End of support dates for ODSEE have been updated. See link below (page 37 and 42):

    http://www.oracle.com/us/support/library/lifetime-support-middleware-069163.pdf

    Thursday Feb 12, 2015

    Sudden SSLv3-related errors in OUD explained

    Starting with the January 20, 2015 Critical Patch Update releases (JDK 8u31, JDK 7u75, JDK 6u91 and above) the Java Runtime Environment has SSLv3 disabled by default. More details about this change is available at http://www.oracle.com/technetwork/java/javase/documentation/cve-2014-3566-2342133.html

    Any attempt to connect to OUD with SSLv3 after applying the Java update above will fail with the error message below in the access logs:

    [09/Feb/2015:12:51:48 +0100] DISCONNECT conn=102 reason="I/O Error" msg="Client requested protocol SSLv3 not enabled or not supported"
    [09/Feb/2015:12:51:48 +0100] CONNECT conn=102 from=****:14123 to=****:1636 protocol=LDAPS

    For testing purpose only, a procedure to re-enable SSLv3 is described in http://www.oracle.com/technetwork/java/javase/documentation/cve-2014-3566-2342133.html howewer it is time to identify the LDAP client culprit and apply the appropriate security fix so that it uses TLS.


    Monday Feb 09, 2015

    How to lock every account in a LDAP subtree with OUD

    Let's assume a customer would like to lock every LDAP account in a given LDAP subtree stored in Oracle Unified Directory.
    An account can be locked by setting the ds-pwp-account-disabled operational to true in the accounts to lock. More about account lockout and password mpolicy is available at Managing password policies

    It is possible to assign the ds-pwp-account-disabled attribute to a set of accounts using virtual attributes.Virtual attributes are attribues whose values do not exist in persistent storage but are dynamically generated in some way.

    OUD Collective attribute is a mean to manage virtual attributes. More about collective attributes at using-collective-attributes '

    To lock every account in the oud=people,dc=example,dc=com subtree, create the following collective attribute:

    dn: cn=myattr,dc=example,dc=com
    objectclass: top
    objectClass: subentry
    objectClass: collectiveAttributeSubentry
    objectClass: extensibleObject
    ds-pwp-account-disabled;collective: true
    subtreespecification: {base "ou=people", minimum 1}
    collectiveConflictBehavior: virtual-overrides-real

    Friday Jan 30, 2015

    Global Administrators with a subset of Admin Privileges

    Oracle Unified Directory provides one default root DN or root user, "cn=Directory Manager". The default root DN is a user entry assigned with specialized privileges with full read and write access to all data in the server. Comparable to a Unix root user or superuser, the root DN can bypass access controls to carry out tasks on the server. The root user is defined below the "cn=Root DNs,cn=config" branch of the server atcn=Directory Manager,cn=Root DNs,cn=config. and is local to each OUD instance.  The server supports multiple root users who have their own entries and their own set of credentials on the server.

    OUD also provides the notion of global administrators. Global Administrators are responsible for managing and maintaining administrative server domains in replicated environments. One Global Administrator is created when you set up replication servers using the graphical installer or the dsreplication command (you are prompted to set a user name and password for the Global Administrator) . 

    The Global Administrator created for the replication exists in the cn=Administrators,cn=admin data subtree, so it is replicated and can be used with every OUD instance of a replicated topology. To view the Global Administrator entry, run the following ldapsearch command:

    $ ldapsearch -h localhost -p 4444 -D "cn=Directory Manager" -j pwd-file \
      --useSSL -b "cn=Administrators,cn=admin data" -s sub "(objectclass=*)"
    dn: cn=Administrators,cn=admin data
    objectClass: top
    objectClass: groupofurls
    description: Group of identities which have full access.
    cn: Administrators
    memberURL: ldap:///cn=Administrators,cn=admin data??one?(objectclass=*)
    dn: cn=admin,cn=Administrators,cn=admin data
    objectClass: person
    objectClass: top
    userPassword: {SSHA}+ed1wbhcWjxtv2zJ6OHEA2TuE9n1qIJGnuR94w==
    description: The Administrator that can manage all the OUD instances.
    cn: admin 

    The Global Administrator created for the replication exists has the full set of admin privileges. In some situations, it might be useful to create additional administrators having only a subset of admin right. For instance, a Monitor Administrator would have the privilege to read the OUD configuration but he/she would not be able to modify it.

    To do so, you can create your own admin container node in the cn=admin data suffix

    ./ldapmodify -a -p 4444 -Z -X -D "cn=directory manager"  -w ****
    dn: cn= my admins,cn=admin data
    objectclass: top
    objectClass: ds-cfg-branch
    
    dn: cn=monitor,cn=my admins,cn=admin data
    objectClass: person
    cn: monitor
    sn: monitor 
    userpassword: ****

    At that stage, it is possible to use these credentials (cn=monitor,cn=my admins,cn=admin data) with dsconfig. dsconfig can authenticate that user, however the "admin" won't be able to read the config as he/she does not have the privilege to do so. dsconfig reports the following error during navigation in the config:

    The Administration Connector could not be modified because you do not 
    have the correct authorization
    

    Appropriate privileges must be assigned to the admin so that he/she has the right to perform the desired actions. In that example, the admin requires the config-read privilege. The bypass-acl is also required so that he/she can perform privileged actions on the configuration.

    ./ldapmodify -p 4444 -Z -X -D "cn=directory manager"  -w ****
    dn: cn=monitor,cn=my admins,cn=admin data
    changetype: modify
    add: ds-privilege-name
    ds-privilege-name: bypass-acl
    ds-privilege-name: config-read

    Now the admin can read the config via dsconfig. However, any attempt to modify it would raise the following error:

    The Configuration could not be modified because you do not have 
    the correct authorization 


    Thursday Jan 22, 2015

    ODSEE 11.1.1.7.2 bundle patch available for download

    ODSEE 11.1.1.7.2 Bundle Patch has been Released for Directory Server and Directory Proxy Server. (Doc ID 1962875.1)

    Search for Doc ID 1962875.1 in My Oracle Support for instructions.


    Wednesday Jan 21, 2015

    How to get OUD to start on Linux/UNIX boot

    To simplify integration of OUD with the target OS, you can use the create-rc-script command  to generate a shell script to start, stop, and restart the directory server. You can update the resulting script to suit the needs of your directory service. This command is available for UNIX or Linux systems.

    So you can use this command to create RC scripts e.g. run  sudo create-rc-script -f /etc/init.d/oud -u oud.

    Then run this script when the appropriate run level change on the target distribution. For instance, on OEL, run sudo chkconfig --level 3 oud on

    Make sure you use the -u userName option unless you really want to run OUD as root. 

    Wednesday Jan 14, 2015

    Configuring OUD to Support Multiple Enterprise User Security Domains

    Configuring OUD to Support Multiple Enterprise User Security Domains

    If your users and groups are stored in multiple domains, you must configure OUD to support multiple EUS domains. For example, a single OUD instance contains two EUS domains. One EUS domain stores users entries in Active Directory below cn=users,dc=ad1,dc=com. A second EUS domain stores user entries in a different Active Directory instance below cn=users,dc=ad2,dc=com. You must configure OUD to support each EUS domain.

    To configure OUD to support multiple EUS domains:

    1. Configure OUD as if the primary domain is the single domain containing all your users and groups.

      In this example, the primary domain is dc=ad1,dc=com.

      Complete the tasks in 28.4 Oracle Unified Directory Used as a Proxy Server for an External LDAP Directory with Enterprise User Security

    2. Configure the secondary domain.

      In this example, the secondary domain is dc=ad2,dc=com.

      For this secondary domain, complete the steps in 28.4.1.1 User Identities in Microsoft Active Directory

    3. Create a new naming context for the EUS domain, which is dc=ad2,dc=com in this example.

      Complete the steps in 28.4.2.1.2 to configure Enterprise User Security for an existing Oracle Unified Directory Proxy Server instance.

    4. Update the Oracle context with the new naming context.

      1. Create an LDIF file.

        In the following myconfig.ldif example, make the following substitutions:

        • Replace dc=ad1,dc=com with the DN of your first domain.

        • Replace orclcommonusersearchbase with the users location in the secondary domain.

        • orclcommongroupsearchbase with the groups location in the secondary domain.

        dn: cn=Common,cn=Products,cn=OracleContext,dc=ad1,dc=com
        changetype: modify
        add: orclcommonusersearchbase
        orclcommonusersearchbase: cn=users,dc=ad2,dc=com
        orclcommongroupsearchbase: cn=groups,dc=ad2,dc=com
        
      2. Update OUD configuration using the LDIF file you created in step 4a.

        ldapmodify -h oudhost -p 1389 -D "cn=directory manager" 
        
        -w password -f myconfig.ldif

    Wednesday Oct 22, 2014

    OUD and Referral Management with AD

    Oracle Unified Directory(OUD) can be configured as a proxy to Active Directory (AD).
    For instance, it is possible to define a Remote LDAP Extension in OUD pointging to Root Catalog of AD 2008.

    Searches to AD would return referrals, so the appropriate OUD Network group can to be modified to  follow referrals automatically with the command below:

    /dsconfig -h localhost -p 4444 -D "cn=directory manager" -j ~/.pwd  -X -n set-network-group-qos-policy-prop --group-name network-group --policy-type referral --set referral-policy:follow

    In some cases, a ldapsearch with a basedn which is not local to the root catalog still returns referrals to another AD Server. 
    OUD reports the following error: 

    SEARCH operation failed
    Result Code:  1 (Operations Error)
    Additional Information:  Unable to process the operation because a referral leading to an unknown or disabled ldap-server example.com:389 was received

    This error is specific to AD because AD builds referrals as follow: ldap://example.com/CN=Configuration,DC=example,DC=com.  Example.com does not systematically correspond to a LDAP host declared in the OUD proxy configuration. For security reasons, OUD follows referrals to hosts explicitely declared as LDAP server extensions in the OUD proxy configuration.

    To make sure OUD is able to chase referrals, define a new ldap-server-extension with remote-ldap-server-address property set to example.com and remote-ldap-server-port set to 389. In this case, creation of a proxy workflow element is not required for this ldap-server-extension. More on ldap-server extensions at http://docs.oracle.com/cd/E29407_01/admin.111200/e22648/proxy_config.htm#solCREATING-AN-LDAP-SERVER-EXTENSION

    Friday Oct 17, 2014

    Troubleshooting OUD/EUS integration: Invalid username/password; logon denied

    Oracle's Enterprise User Security (EUS) enables you to store user identities in LDAP-compliant directory service for Oracle Database authentication.

    Enterprise User Security enables you to centrally manage database users across the enterprise. Enterprise users are created in LDAP-compliant directory service, and can be assigned roles and privileges across various enterprise databases registered with the directory.

    Users connect to Oracle Database by providing credentials that are stored in Oracle Unified Directory. The database executes LDAP search operations to query user specific authentication and authorization information.

    Here are steps to troubleshoot EUS when the "Invalid username/password; login denied" is reported to DB users by EUS:

    First, this error is reported in 2 cases:

    • the DB is not able to find a LDAP user that corresponds to the provided name on the DB side, 
    • the user password is invalid.
    Assuming the password is correct, follow the procedure below to identify the root cause:

    #1 Check EUS configuration

    The database reads its configuration from the entry cn=common,cn=products,cn=oraclecontext,$BASEDN:

    • The location of users and groups is configured in the attributes orclcommonusersearchbase and orclusercommongroupsearchbase. They are referred to as users and groups containers.
    • The username supplied to sqlplus must correspond to the value of orclcommonnicknameattribute in the user entry. For instance, if I connect to sqlplus using sqlplus joe/password, and orclcommonnicknameattribute=uid, then the database will look for an entry containing the attribute uid=joe.
    • The user entry DN must start with orclcommonnamingattribute. For instance, if orclcommonnamingattribute=cn, the user entry must be cn=joeuser,<orclcommonusersearchbase>.

    You can read the configuration using the following command:

    $ OracleUnifiedDirectory/bin/ldapsearch -h $LDAPSERVER -p $PORT -b cn=common,cn=products,cn=oraclecontext,$BASEDN  "(objectclass=*)" orclcommonusersearchbase orclcommongroupsearchbase orclcommonnicknameattribute orclcommonnamingattribute
    
    dn: cn=Common,cn=Products,cn=OracleContext,dc=eusovd,dc=com
    
    orclcommonusersearchbase: ou=people,dc=eusovd,dc=com
    
    orclcommongroupsearchbase: ou=groups,dc=eusovd,dc=com
    
    orclcommonnicknameattribute: uid
    
    orclcommonnamingattribute: cn

    #2 Check the User Entry

    You  must ensure that there is an LDAP entry in the user container that matches the username supplied by SQL+. Target LDAP entry must be an instance of inetorgperson and contain the attribute defined in orclcommonnicknameattribute:

    $ OracleUnifiedDirectory/bin/ldapsearch -h $LDAPSERVER -p $PORT -D $DN -w $PWD -b ou=people,$BASEDN  "(uid=joe)"                         
    
    dn: cn=joe,ou=people,dc=eusovd,dc=com
    
    userPassword: {SSHA}DdW5je5GCUnT2jVTeMdfPR9NWwkBt40FwWImpA==
    
    objectclass: person
    
    objectclass: organizationalPerson
    
    objectclass: inetorgperson
    
    objectclass: top
    
    uid: joe
    
    cn: joe
    
    sn: joe
    
    

    #3 Check the User-schema mappings

    If the user entry exists and can be read by the database entry, the problem can be that there is no user-schema mapping. EUS maps the LDAP user entry to a database schema following a mapping rule that is defined in Enterprise Manager console. The mapping associates either a user DN to a schema or all users of a subtree to a schema. It can be defined at the domain level or at the database level.

    #4 Check the global schema associated with the user

    If there is a user-schema mapping, ensure that the schema has the CONNECT privilege.

    The global schema was defined using the following commands:

    SQL> CREATE USER global_ident_schema_user IDENTIFIED GLOBALLY;
    User created.
    SQL> GRANT CONNECT TO global_ident_schema_user;
    About


    My name is Sylvain Duloutre, I worked as a Software Architect in the Oracle Directory Integration Team, the customer-facing part of Directory Services & Identity Management Product Development, working on Technical Field Enablement and Solutions Architecture.

    The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.

    A mirror of this blog is available on Wordpress here.

    Search

    Archives
    « May 2016
    SunMonTueWedThuFriSat
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
        
           
    Today