Sunday Dec 09, 2012

OAM OVD integration - Error Encounterd while performance test "LDAP response read timed out, timeout used:2000ms"

While working on OAM OVD integration for one of my client, I have been involved in the performance test of the products wherein I encountered OAM authentication failures while talking to OVD during heavy load. OAM logs revealed the following:

oracle.security.am.common.policy.common.response.ResponseException: oracle.security.am.engines.common.identity.provider.exceptions.IdentityProviderException: OAMSSA-20012: Exception in getting user attributes for user : dummy_user1, idstore MyIdentityStore with exception javax.naming.NamingException: LDAP response read timed out, timeout used:2000ms.; remaining name 'ou=people,dc=oracle,dc=com' at oracle.security.am.common.policy.common.response.IdentityValueProvider.getUserAttribute(IdentityValueProvider.java:271)

...

During the authentication and authorization process, OAM complains that the LDAP repository is taking too long to return user attributes.The default value is 2 seconds as can be seen from the exception, "2000ms". While troubleshooting the issue, it was found that we can increase the ldap read timeout in oam-config.xml. 

For reference, the attribute to add in the oam-config.xml file is:

<Setting Name="LdapReadTimeout" Type="xsd:string">2000</Setting>

However it is not recommended to increase the time out unless it is absolutely necessary and ensure that back-end directory servers are working fine. Rather I took the path of tuning OVD in the following manner:

1) Navigate to ORACLE_INSTANCE/config/OPMN/opmn folder and edit opmn.xml. Search for <data id="java-options" ………> and edit the contents of the file with the highlighted items:

<category id="start-options"><data id="java-bin" value="$ORACLE_HOME/jdk/bin/java"/><data id="java-options" value="-server -Xms1024m -Xmx1024m -Dvde.soTimeoutBackend=0 -Didm.oracle.home=$ORACLE_HOME -Dcommon.components.home=$ORACLE_HOME/../oracle_common -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:/opt/bea/Middleware/asinst_1/diagnostics/logs/OVD/ovd1/ovdGClog.log -XX:+UseConcMarkSweepGC -Doracle.security.jps.config=$ORACLE_INSTANCE/config/JPS/jps-config-jse.xml"/><data id="java-classpath" value="$ORACLE_HOME/ovd/jlib/vde.jar$:$ORACLE_HOME/jdbc/lib/ojdbc6.jar"/></category></module-data><stop timeout="120"/><ping interval="60"/></process-type>

When the system is busy, a ping from the Oracle Process Manager and Notification Server (OPMN) to Oracle Virtual Directory may fail. As a result, OPMN will restart Oracle Virtual Directory after 20 seconds (the default ping interval). To avoid this, consider increasing the ping interval to 60 seconds or more.

2) Navigate to ORACLE_INSTANCE/config/OVD/ovd1 folder.Open listeners.os_xml file and perform the following changes:

· Search for <ldap id=”Ldap Endpoint”…….> and point the cursor to that line.

· Change threads count to 200.

· Change anonymous bind to Deny.

· Change workQueueCapacity to 8096.

Add a new parameter <useNIO> and set its value to false viz: <useNIO>false</useNio>

Snippet: <ldap version="8" id="LDAP Endpoint">

.......

....... 

<socketOptions><backlog>128</backlog>

         <reuseAddress>false</reuseAddress>
         <keepAlive>false</keepAlive>
         <tcpNoDelay>true</tcpNoDelay>
         <readTimeout>0</readTimeout>
      </socketOptions>
<useNIO>false</useNIO>
</ldap>

Restart OVD server.

For more information on OVD tuneup refer to http://docs.oracle.com/cd/E25054_01/core.1111/e10108/ovd.htm.

Please Note: There were few patches released from OAM side for performance tune-up as well. Will provide the updates shortly !!!


WNA Configuration in OAM 11g

Pre-Requisite:

  1. Kerberos authentication scheme has to exist. This is usually pre-configured OAM authentication scheme. It should have Authentication Level - "2", Challenge Method - "WNA", Challenge Direct URL - "/oam/server" and Authentication Module- "Kerberos".
  2. The default authentication scheme name is "KerberosScheme", this name can be changed.
  3. The DNS name has to be resolvable on the OAM Server.
  4. The DNS name with referrals to AD have to be resolvable on OAM Server. Ensure nslookup work for the referrals.

Pre-Install:

  1. AD team to produce keytab file on the AD server by running ktpass command.
  2. Provide OAM Hostname to AD Team.
  3. Receive from AD team the following:
    • Keypass file produced when running the ktpass command
    • ktpass username
    • ktpass password
  4. Copy the keytab file to convenient location in OAM install tree and rename the file if desired. For instance where oam-policy.xml file resides. i.e. /fa_gai2_d/idm/admin/domains/idm-admin/IDMDomain/config/fmwconfig/keytab.kt

Configure WNA Authentication on OAM Server:

  1. Create config file krb.config and set the environment variable to the path to this file:
    KRB_CONFIG=/fa_gai2_d/idm/admin/domains/idm-admin/IDMDomain/config/fmwconfig/krb.conf
    The variable KRB_CONFIG has to be set in the profile for the user that OAM java container(i.e. Wbelogic Server) runs as, so that this setting is available to the OAM server. i.e. "applmgr" user.
  2. In the krb.conf file specify:
    [libdefaults]
    default_realm= NOA.ABC.COM
    dns_lookup_realm= true
    dns_lookup_kdc= true
    ticket_lifetime= 24h
    forwardable= yes

    [realms]
    NOA.ABC.COM={
    kdc=hub21.noa.abc.com:88
    admin_server=hub21.noa.abc.com:749
    default_domain=NOA.ABC.COM

    [domain_realm]
    .abc.com=ABC.COM
    abc.com=ABC.COM
    .noa.abc.com=NOA.ABC.COM
    noa.abc.com=NOA.ABC.COM

    Where hub21.noa.abc.com is load balanced DNS VIP name for AD Server and NOA.ABC.COM is the name of the domain.
  3. Create authentication policy to WNA protect the resource( i.e. EBSR12) and choose the "KerberosScheme" as authentication scheme.
    Login to OAM Console => Policy Configuration Tab => Browse Tab => Shared Components => Application Domains => IAM Suite => Authentication Policies => Create
    Name: ABC WNA Auth Policy
    Authentication Scheme: KerberosScheme
    Failure URL: http://hcm.noa.abc.com/cgi-bin/welcome

  4. Edit System Configuration for Kerberos
    • System Configuration Tab => Access Manager Settings => expand Authentication Modules => expand Kerberos Authentication Module => double click on Kerberos
    • Edit "Key Tab File" textbox - put in /fa_gai2_d/idm/admin/domains/idm-admin/IDMDomain/config/fmwconfig/keytab.kt
    • Edit "Principal" textbox - put in HTTP/OAM_Host@NOA.ABC.COM
    • Edit "KRB Config File" textbox - put in /fa-gai2_d/idm/admin/domains/idm-admin/IDMDomain/config/fmwconfig/krb.conf
    • Cilck "Apply"
    • In the script setting environment for the WLS server where OAM is deployed set the variable:
      KRB_CONFIG=/fa_gai2_d/idm/admin/domains/idm-admin/IDMDomain/config/fmwconfig/krb.conf

  5. Re-start OAM server and OAM Server Container( Weblogic Server)

About

OIM11gR2 Blog by NA-TAG Offshore IDAM team

Search

Categories
Archives
« December 2012 »
SunMonTueWedThuFriSat
      
2
4
6
7
8
10
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
     
Today