Tuesday, October 27, 2015

SOA Suite 12.2.1 is released. Below is the summary of New Features

SOA Suite 12.2.1 was released and below is the summary of new features.
·         Patch running instances of the composites.
This features enables us to patch the running instances of a composite and recover faulted instances after patching the runtime. However we can only include those fixes in the patch that are compatible with Composite Instance Patching.
To create the patch we need to use the SOA Patch Developer role in Oracle JDeveloper
This will help us to deliver urgent composite fixes that can be picked up by long running instances. This enables us to make changes without aborting in-flight instances. If a patched running instance comes across a business process that has been fixed by the patch, say a BPEL transformation, then it picks up the fixes applied to the business process. Read more here 

·         Support for in Memory SOA: Oracle has been pushing hard on coherence and this is one more example where coherence cache can be used. Using this feature the non-transactional business process as read and write operations are performed out of the cache as opposed to database in previous releases. The database performance and management also improves, as the costs associated with continuous disk reads and writes are significantly reduced. Read more here 


·         Debugging Improvements in XSLT mapper: Now we can debug our XSLT maps using the SOA Debugger. We can add breakpoints just like java at strategic locations in the XSLT map. During debugging, the debugger halts execution at the breakpoints, enabling us to verify the data and output.

·         Support for End-to-End JSON and JavaScript.  Now our SOA composites can use JSON from end to end. This means that now the REST service can receive the REST request and route it to the BPEL engine without translating it to XML. The BPEL component can use the JavaScript action, and also use JavaScript in conditional and iterative constructs, to work on JSON objects directly. The REST reference can receive the REST message from the BPEL engine and route it to an external REST endpoint without translation. Following are some of the features:-
    1. Enable End-to-End JSON
    2. Enable End-to-End JSON
    3. Enable REST support in new or existing services.
    4. Integrate with external REST APIs.
    5. Orchestrate a set of RESTful state transitions (RPC/Hypermedia as the Engine of Application State (HATEOAS) approach).
    6. Support for XML, JavaScript Object Notation (JSON) (with automatic translation to and from XML), text, opaque (binary), and URL-encoded payload data.
    7. Generation of sample URI for REST service operations.
    8. Support for WADL services. The WADL can be provided by a deployed Oracle SOA Suite or Oracle Service Bus service or a non-Oracle SOA Suite or Oracle Service Bus service such as a Jersey REST service.  Read more here 


Reference :- Oracle Docs

Monday, October 26, 2015

SOA Suite 12C - Resolve MBean attribute access denied. MBean: oracle.soa.config:name="default",j2eeType=SOAFolder,Application=soa-infra Error

Recently while working on a SOA 12C project I was seeing the following error in the logs.
<AdminServer> <[ACTIVE] ExecuteThread: '20' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <c3edacf6-49eb-407c-a03b-ac905a0a8ad1-000017eb> <1441380976786> <BEA-080003> <A RuntimeException was generated by the RMI server: javax.management.remote.rmi.RMIConnectionImpl.getAttribute(Ljavax.management.ObjectName;Ljava.lang.String;Ljavax.security.auth.Subject;)
javax.management.RuntimeMBeanException: java.lang.SecurityException: MBean attribute access denied.
MBean: oracle.soa.config:name="default",j2eeType=SOAFolder,Application=soa-infra
Getter for attribute State
Detail: access denied ("oracle.fabric.permission.CompositePermission" "default" "read").
javax.management.RuntimeMBeanException: java.lang.SecurityException: MBean attribute access denied.


On : 12.1.3.0.0 version, Fabric

MBean attribute access denied. Warning/Errors seen in the Admin/SOA domain logs

The Admin/SOA domain server logs are repeatedly filled with MBean attribute access denied warnings. It doesn't affect the deployment or composites during runtime. The user is not logging as weblogic but as ohscustadmin.

<Warning> <RMI> <hostname> <AdminServer> <[ACTIVE] ExecuteThread: '20' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <c3edacf6-49eb-407c-a03b-ac905a0a8ad1-000017eb> <1441380976786> <BEA-080003> <A RuntimeException was generated by the RMI server: javax.management.remote.rmi.RMIConnectionImpl.getAttribute(Ljavax.management.ObjectName;Ljava.lang.String;Ljavax.security.auth.Subject;)
javax.management.RuntimeMBeanException: java.lang.SecurityException: MBean attribute access denied.
MBean: oracle.soa.config:name="default",j2eeType=SOAFolder,Application=soa-infra
Getter for attribute State
Detail: access denied ("oracle.fabric.permission.CompositePermission" "default" "read").
javax.management.RuntimeMBeanException: java.lang.SecurityException: MBean attribute access denied.


ERROR
-----------------------
[oracle.as.jmx.framework.generic.spi.security.AbstractMBeanSecurityInterceptor] [tid: [ACTIVE].ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: odemmon] [ecid: f66cbcbf-ba3c-48da-8cde-f3d7578fcda2-00023944,0] [APP: soa-infra] MBean attribute access denied. [[
MBean: oracle.as.soainfra.config:name=soa-infra,type=SoaInfraConfig,Application=soa-infra
Getter for attribute NonFatalConnectionMaxRetry
Detail: access denied ("oracle.fabric.permission.SOAPlatformPermission" "read") java.security.AccessControlException: access denied ("oracle.fabric.permission.SOAPlatformPermission" "read")
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:372)
at java.security.AccessController.checkPermission(AccessController.java:559)
at oracle.security.jps.util.JpsAuth$AuthorizationMechanism$3.checkPermission(JpsAuth.java:472)
at oracle.security.jps.util.JpsAuth.checkPermission(JpsAuth.java:532)
at oracle.security.jps.util.JpsAuth.checkPermission(JpsAuth.java:558)
at oracle.fabric.permission.internal.InternalSOAPermissionCheckHelper$2.run(InternalSOAPermissionCheckHelper.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at oracle.fabric.permission.internal.InternalSOAPermissionCheckHelper.internalCheckSOAPermission(InternalSOAPermissionCheckHelper.java:200)
at oracle.fabric.permission.internal.InternalSOAPermissionCheckHelper.checkSOAPermission(InternalSOAPermissionCheckHelper.java:171)
at oracle.fabric.permission.management.SOAPermissionCheckPluginFactory$SOAMBeanCustomSecurityPlugin.checkGetAttribute(SOAPermissionCheckPluginFactory.java:60)
at oracle.as.jmx.framework.MBeanCustomSecurityHelper.checkGetAttribute(MBeanCustomSecurityHelper.java:193)
at oracle.as.jmx.framework.generic.spi.security.AbstractMBeanSecurityInterceptor.checkAttributeAccess(AbstractMBeanSecurityInterceptor.java:264)
at oracle.as.jmx.framework.generic.spi.security.AbstractMBeanSecurityInterceptor.internalGetAttributes(AbstractMBeanSecurityInterceptor.java:138)
at oracle.as.jmx.framework.generic.spi.interceptors.AbstractMBeanInterceptor.doGetAttributes(AbstractMBeanInterceptor.java:114)
at oracle.security.jps.ee.jmx.JpsJmxInterceptor$GetAttributesDelegator.delegate(JpsJmxInterceptor.java:959)
at oracle.security.jps.ee.jmx.JpsJmxInterceptor$7.run(JpsJmxInterceptor.java:826)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)
at oracle.security.jps.ee.jmx.JpsJmxInterceptor.jpsInternalInvoke(JpsJmxInterceptor.java:868)
at oracle.security.jps.ee.jmx.JpsJmxInterceptor.internalGetAttributes(JpsJmxInterceptor.java:217)
at oracle.as.jmx.framework.generic.spi.interceptors.AbstractMBeanInterceptor.doGetAttributes(AbstractMBeanInterceptor.java:114)
at oracle.as.jmx.framework.generic.spi.interceptors.ContextClassLoaderMBeanInterceptor.internalGetAttributes(ContextClassLoaderMBeanInterceptor.java:115)
at oracle.as.jmx.framework.generic.spi.interceptors.AbstractMBeanInterceptor.doGetAttributes(AbstractMBeanInterceptor.java:114)
at oracle.as.jmx.framework.generic.spi.interceptors.MBeanRestartInterceptor.internalGetAttributes(MBeanRestartInterceptor.java:87)
at oracle.as.jmx.framework.generic.spi.interceptors.AbstractMBeanInterceptor.doGetAttributes(AbstractMBeanInterceptor.java:114)
at oracle.as.jmx.framework.standardmbeans.spi.OracleStandardEmitterMBean.getAttributes(OracleStandardEmitterMBean.java:654)
at oracle.as.jmx.framework.standardmbeans.spi.OracleStandardEmitterConfigMBean.getAttributes(OracleStandardEmitterConfigMBean.java:620)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttributes(DefaultMBeanServerInterceptor.java:709)
at com.sun.jmx.mbeanserver.JmxMBeanServer.getAttributes(JmxMBeanServer.java:705)
at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase$13.run(WLSMBeanServerInterceptorBase.java:353)
at java.security.AccessController.doPrivileged(Native Method)
at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase.getAttributes(WLSMBeanServerInterceptorBase.java:351)
at weblogic.management.mbeanservers.internal.JMXContextInterceptor.getAttributes(JMXContextInterceptor.java:192)
at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase$13.run(WLSMBeanServerInterceptorBase.java:353)
at java.security.AccessController.doPrivileged(Native Method)
at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase.getAttributes(WLSMBeanServerInterceptorBase.java:351)
at weblogic.management.mbeanservers.internal.SecurityInterceptor.getAttributes(SecurityInterceptor.java:308)
at weblogic.management.jmx.mbeanserver.WLSMBeanServer.getAttributes(WLSMBeanServer.java:292)
at weblogic.management.mbeanservers.internal.JMXConnectorSubjectForwarder$6$1.run(JMXConnectorSubjectForwarder.java:383)
at weblogic.management.mbeanservers.internal.JMXConnectorSubjectForwarder$6$1.run(JMXConnectorSubjectForwarder.java:381)
at java.security.AccessController.doPrivileged(Native Method)
at weblogic.management.mbeanservers.internal.JMXConnectorSubjectForwarder$6.run(JMXConnectorSubjectForwarder.java:381)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.management.mbeanservers.internal.JMXConnectorSubjectForwarder.getAttributes(JMXConnectorSubjectForwarder.java:376)
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)
at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:97)
at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1328)
at java.security.AccessController.doPrivileged(Native Method)
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1427)
at javax.management.remote.rmi.RMIConnectionImpl.getAttributes(RMIConnectionImpl.java:693)
at javax.management.remote.rmi.RMIConnectionImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:701)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:527)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:523)
at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)



Raised an Oracle SR and the solution provided by them was :-


1) Login into WLS console
2) select the domain -> security -> Embedded LDAP
3) Make sure "Refresh Replica At Startup " is enabled
4) save changes & restart all servers

enjoy!!

Saturday, July 11, 2015

Oracle Access Manager Create A WebService for Authentication using Access Gate

Creating a Access Gate using OAM11gR2

The oracle documentation has proper steps for creating a custom Access Gate  but it lacks on steps on how to deploy it . Recently I had to create a Webservice for authentication from OAM using custom access gate and it took a while to deploy it. Below are the brief steps on how to create one. The code was created using eclipse. 

  1. Download ASDK from edelivery.oracle.com. We were using OAM 11gR2 Bp04 but could not find ASDK for the same version. We download the version 11.1.2.2.2 and it worked for us.  
  2. Unzip the contents to a directory.
  3. Create a webservice project in Eclipse
  4. Project Name Used : OamAuthenticationService
  5. In the project class path add the following jar files.
  6. Add the oamasdk-api.jar in the web-inf/lib folder.
  7. Copy the ObAccessClient.xml file to ASDK/oblix/lib folder.(I had a 10 g webgate hence only ObAccessClient.xml) else we need to copy cwallet.sso as well.
  8. For running the code as a standalone java program you need to add jps-config.xml as well under the folder ASDK/config.

  9. Contents of the jps-config.xml should be updated to reflect the Access Gate name.
  10. Write the java code as per the oracle doc. Oracle Doc
  11. I am reading the ASDK location and Access Gate name from properties file. The resource name (ms_resource) should be of the format Access Gate Name from OAM Console /resource.For e.g. in my case the name is http://OAMASDK/fed. Refer screen shot in step 7.
  12. Contents of the properties file:-Note the location is folder where you unzipped the ASDK contents.
  13. Thats all what is required to test the app as a standalone java program.
  14. In order to deploy this to a server with JRF environment there are some further modifications which need to be done. 
  15. Failing to do this may result in run time exceptions like class definitions not found. Create a weblogic.xml file under WEB-INF folder if it does not exist. Add the following contents to the file.<?xml version="1.0" encoding="UTF-8"?>
    <wls:weblogic-web-app xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.3/weblogic-web-app.xsd">
        <wls:weblogic-version>10.3.6</wls:weblogic-version>
        <wls:context-root>OAMAuthenticationService</wls:context-root>
        <wls:container-descriptor>
        <wls:prefer-application-packages>
     <!-- add package names from the Oracle Access Server SDK -->

     <wls:package-name>oracle.security.am.*</wls:package-name>
        </wls:prefer-application-packages>
      </wls:container-descriptor>
    </wls:weblogic-web-app>
  16. On the server where we intend to deploy the WAR file , in  $domain_home/config/fmwconfig folder locate system-jazn.xml file.
  17. Take a back up of the current file and add an entry in the file as follows. Make sure the entry is done under <jazn-policy> section and not under <admin-policy> category.If this entry is not done properly you will get an exception oracle.secuirty. jps.access denied. The file location should be from the tmp folder and the folder name should be the project name. Do not forget a "/-" in the end. <grant>
    <grantee>
    <codesource>
    <url>file:${domain.home}/servers/${weblogic.Name}/tmp/_WL_user/OAMAuthenticationService/-</url>
    </codesource>
    </grantee>
    <permissions>
    <permission>
    <class>oracle.security.jps.service.credstore.CredentialAccessPermission</class>
    <name>context=SYSTEM,mapName=OAMAgent,keyName=*</name>
    <actions>read</actions>
    </permission>
    </permissions>
    </grant> 
  18. Move the ASDK to the server machine and update the path in the java code as required.The jps-config.xml file placed under config folder in step 8 needs to be removed from the ASDK on the server machine.
  19. In the generated war file check that the oamasdk-api.jar is included in the web-inf/lib folder.
  20. Deploy the WAR
  21. Thats all and you should be all good to go.

Wednesday, January 28, 2015

SOA Suite - Adding an existing Database MDS connection to a new Application

When we store artifacts like XSDs in database MDS and want to reuse it in a new SOA application following are the steps which we need to follow.


  1. Once the SOA application is created expand the IDE connections ->SOA-MDS and right click on the MDS connection and select the option Add to Application.
  2. Once "Add to Application" is finished in the left hand side of the Jdeveloper find Application Resources , expand->Descriptors->ADF META-INF->adf-config.xml.
  3. Open the adf-config.xml and look for the mds connection name "mstore-usage_2". Many a time this entry does not exist and you may need to manually edit the xml file like below.
  4. Add the line  <namespace path="/apps" metadata-store-usage="mstore-usage_2"/> under  <metadata-namespaces>.
  5. Navigate to  <metadata-store-usages> and add the entry for "mstore-usage_2" if it does noe exists. If the entry exists make sure the entry for MDS password. <property name="jdbc-password" value="oracle"/>. More than often you need to add it manually.
                 <metadata-store-usage id="mstore-usage_2">
                <metadata-store class-name="oracle.mds.persistence.stores.db.DBMetadataStore">
                  <property name="jdbc-userid" value="DEV_MDS"/>
                  <property name="jdbc-password" value="oracle"/>
                  <property name="jdbc-url"
                            value="jdbc:oracle:thin:@localhost:1521:XE"/>
                  <property name="partition-name" value="soa-infra"/>
                </metadata-store>
              </metadata-store-usage>
  6. Sample XML File.

Sunday, July 27, 2014

Installation of SOA Suite 12c

Oracle recently released the SOA Suite 12c and following are the steps to install SOA Suite 12c on your local system.
1. Download SOA Suite 12c from http://www.oracle.com/technetwork/middleware/soasuite/downloads/index.html 
2. Please note that SOA Suite is certified only for 64 bit machine on a 64 bit JVM. You should have 64bit JDK on your system , Only JRE is not sufficient.
3.The download results  includes two jar files fmw_12.1.3.0.0_soa_quickstart.jar and fmw_12.1.3.0.0_soa_quickstart2.jar

4.Open a command line and execute the command java -jar fmw_12.1.3.0.0_soa_quickstart.jar. Please note that in the class path we should include the path of jdk/bin and java home set to jdk.Or you may execute this command from the jdk/bin folder.
5. This opens up a GUI as follows.Follow the screen shots as listed below and thats it, your SOA is installed.






6. Check that on the file system the following directories are created.
7.This version has an inbuilt jdeveloper which can be used for deploying soa composites as well unlike the older versions of jdeveloper. This means that to test the soa composites on our local system there is no need to create a soa domain. Just start the integrated weblogic from Jdeveloper and it will create a domain and the weblogic server will start. The port for this soa domain is 7101 and username password is weblogic/welcome1. 











Saturday, May 31, 2014

Installation and configuration of Webgate for Oracle HTTP Server

Oracle http  server webgate needs to be installed on both the nodes.Webagtes server on linux require 64 bit libraries for libgcc_s.so.1 under /usr/lib64 folder.
1.       Copy the GCC file libgcc_s.so.1 from /lib64 to /usr/lib64. Make sure the output of all the below commands is greater than 1.
a.        strings -a libgcc_s.so.1 | grep -c "GCC_3.0"
b.        strings  -a libgcc_s.so.1  | grep -v "GCC_3.3.1" | grep -c "GCC_3.3"
c.        strings -a libgcc_s.so.1 | grep -c "GCC_4.2.0"
d.        file  libgcc_s.so.1 | grep "64-bit" | grep -c "x86-64"
e.        file  -L libstdc++.so.6  |  grep "64-bit" | grep -c "x86-64"
2.       Navigate to the installable folder like  /media/FMW/IDM/Webgate/V38082-01/Disk1/install/linux64.
3.       Run the command ./runInstaller.
4.       Click next on the wlecome screen. Wait for th pre-requisities check to be completed.

5.       Specify the installation location /apps/oracle/product/fmw.Leave the Oracle Home Directory as Oracle_OAMWebgate1.Click on Next.

6.       Wait for the installation to be completed.






Configuration of OHS and Webgate

1.  Login to OHS box i.e. and stop the OHS instance(if running) by executing the command ./opmnctl stopall 
2.       Navigate to /apps/oracle/product/fmw/Oracle_OAMWebGate1/webgate/ohs/tools/deployWebGate/ on the OHS box.

3.       Execute the command.  
./deployWebGateInstance.sh -w /apps/oracle/product/admin/instance1/config/OHS/ohs1 -oh /apps/oracle/product/fmw/Oracle_OAMWebGate1
/apps/oracle/product/admin/instance1/config/OHS/ohs1- is the home directory of OHS server instance
/apps/oracle/product/fmw/Oracle_OAMWebGate1 is the home directory of webgate is installation


4.       Set the LD_LIBRARY_PATH variable.
export LD_LIBRARY_PATH=/apps/oracle/product/fmw/Oracle_WT1/lib
Navigate to /apps/oracle/product/fmw/Oracle_OAMWebGate1/webgate/ohs/tools/setup/InstallTools.


5.Execute the command
 ./EditHttpConf -w /apps/oracle/product/admin/instance1/config/OHS/ohs1/ -oh /apps/oracle/product/fmw/Oracle_OAMWebGate1 -o webgate.conf
Excerpt of the command:-
[oracle@linuxmachine InstallTools]$ ./EditHttpConf -w /apps/oracle/product/admin/instance1/config/OHS/ohs1/ -oh /apps/oracle/product/fmw/Oracle_OAMWebGate1 -o webgate.conf
The web server configuration file was successfully updated
/apps/oracle/product/admin/instance1/config/OHS/ohs1/httpd.conf has been backed up as /apps/oracle/product/admin/instance1/config/OHS/ohs1/httpd.conf.ORIG



Saturday, February 15, 2014

Setting up Kerberos authentication on Oracle Access Manager

The configuration for Windows Native Authentication requries a keytab file to be generated by the AD administrator.

                       1.       Send a request to AD administrator to generate a Keytab file .Instructions to be sent to AD                        administrator is as follows.Windows Server 2008 R2.
a.       Create an AD user. username = oam1 password = Welcome1
b.      Verify that the SPNs do not exist for oam1.
a.       setspn -L oam1
c.       Generate the keytab by using the following command.
d.      ktpass -princ HTTP/oam1.domain.com@DOMAIN.COM -pass Welcome1 -mapuser oam1 -out c:\temp\oam1.keytab. (The name oam1.domain.com is the listen address of OAM server. Not specifying any encyption mechanism makes use of RC4-HMAC protocol.)
e.      Check the box does not require Kerberos pre authentication. (this was requried else I was getting an error saying that pre authentication is required.)
2.       Update the krb5.conf file located at /etc folder on the OAM servers 

[logging]
 default = FILE:/var/log/krb5libs.log
 kdc = FILE:/var/log/krb5kdc.log
 admin_server = FILE:/var/log/kadmind.log

[libdefaults]
 default_realm = DOMAIN.COM
 dns_lookup_realm = false
 dns_lookup_kdc = false
 default_tkt_enctypes = arcfour-hmac-md5
 default_tgs_enctypes = arcfour-hmac-md5
 ticket_lifetime = 24h
 forwardable = yes
udp_preference_limit = 1  (I required this paramter because i was getting an error saying that packet size                                                was too huge. Then found that by default kereberos uses UDP Protocol which has                                                     a limitation of paket size. This parameter forces the use TCP protocol.)

[realms]
 DOMAIN.COM = {
  kdc = ADSERVER
  admin_server = ADSERVER
  default_domain = DOMAIN.COM
 }

[domain_realm]
 .lacmta.net  =  DOMAIN.COM
 lacmta.net =  DOMAIN.COM

[appdefaults]
 pam = {
   debug = true
   ticket_lifetime = 36000
   renew_lifetime = 36000
   forwardable = true
   krb4_convert = false
   autologin = true
   forward = true
   encrypt = true
 }

2.       Once the keytab file is sent by the AD administrator validate the keytab file by executing the below command on the OAM boxes.Place the keytab file on the OAM server at /share/oracle/keytab.
kinit -V -k -t /share/oracle/keytab/oam1.keytab HTTP/oam1.domain.com@DOMAIN.COM
                              This should result in an output of “Authenticated to Kerberos v5”.
                       In case you are not able to authenticate please debug and then proceed further.
3.       Login to http://oam.domain.com:7001/oamconsole and open the OAM console.Navigate to System Configuration.
4. Navigate to Common Configuration->Data Sources->User Identity Store and click on New.

5. Create a Datastore such that the samacountname from the AD matches the usernameattribute in the username.In my case the samaccountname in AD was kumarab, but in OID the cn was m80845kumar and orclasamaccountame was kumarab. So when creating the datastorein the username attribute of the datastore i specified orclsamaccountname. (generally we specify cn or uid.)Make the user store the default userstore.
6. Navigate to Access Manager ->  Authentication Modules -> Kerberos Authentication module -> Kerberos
7. Fill in the following details.                                                                                                                                         
   
               Name                                                     
                Kerberos
           Key Tab File
           /share/oracle/keytab/oam1.keytab
             Principal (same as the one which was given when creating the keytab.)
           HTTP/oam1.domain.com@DOMAIN.COM
             KRB Config File
           /etc/krb5.conf

8. Now go to authentication modules->protected policies->use kerberos scheme as the authentication policy.
9. ADD http://oam1.domain.com to your local list of intranet resources in your browser and you should be done.

Some common issues which I faced:-
OAM in most of cases gives a generic error saying userid is locked. Enable trace32 log for OAM and you may be able to see some more details in the diagonistic logs.


  1. gssheader did not find the right tag. The principal name which is sent by the browser does not the principal name in the keytab. for example the principal name sent by browser may be HTTP/oam2.domain.com whereas the keytab may be generated by using HTTP/oam1.domain.com. To find out which principal is generated use the network tracing NETSH Micorosoft netsh command and network monitor tool mechanism of Windows 7 and apply the filter as kerberos to view details. The error in the logs would say " KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN."Hence the spengo token is not sent instead NLTM token is sent. This can be detected by using a HTTP header, NLTM headers are generally one liners whereas SPENGO are bigger in size as compared to NLTM.(Definitely more than one line.)
  2. The other error is GSSException: Failure unspecified at GSS-API level which is  generally due to the non matching KVNO version .This can be resolved   by regenerating the keytab.
  3. Other issue which I faced was to the packet limit constraint, which was resolved by adding a parameter in the krb5.conf. udp_preference_limit = 1.
  4. Other issue is user not found in datastore. In this case cross verify the datastore configured in OAM, make sure the default userstore is the one which has usernameattribute==samaccountname from AD.