Showing posts with label Oracle Access Manager. Show all posts
Showing posts with label Oracle Access Manager. Show all posts

Thursday, January 21, 2016

How to configuration and test OAM Access SDK 10g + OAM 11g with Dot Net


Access SDK 10g Installation & Configuration with OAM 11g R2 PS2 

Purpose

  1. Install & configure ASDK 10g with OAM 11g R2 PS2 and test SSO using .NET ASDK API’s.

Environment

  1. OS: Windows 2008 Server SP2 (64-bit)
  2. DOT Net Framework: 4.0
  3. OAM: 11g R2 PS2 (11.1.2.2.0) running on OEL 5.9
  4. Access SDK: 10g (10.1.4.3.0+BP10, BP13+IP09 (Patch Number 18110352))

Installation
  • Download & Install Access SDK
  • Install ASDK using Oracle_Access_Manager10_1_4_3_0_Win64_AccessServerSDK.exe from oam_int_win_v17_cd1.zip
URL:       http://www.oracle.com/technetwork/middleware/ias/downloads/101401-099957.html

  • Access Gate Registration 


  • Download and install apply patch “18110352” from Oracle Support which is the BP13-IP09 (latest version of the ASDK for Win64).
  • Patch Output:

C:\Users\Administrator\Downloads\p18110352_10143_MSWIN-x86-64\AccessSDK\Oracle_Access_Manager10_1_4_ 3_0_BP13-IP09_Patch_win64_AccessServerSDK_binary_parameter>patchinst.exe
Please enter Installation directory:
C:\NetPoint\AccessServerSDK
--- Oracle Access Manager System install ---
Upgrading Access Server SDK from release 10.1.4.3.0 BP 10 to release 10.1.4.3.0.13-IP09 BP 13-IP09. Unloading files to C:\NetPoint\AccessServerSDK/unload-Oracle-10143013-IP09BP13-IP09-2564.
unloading 'include/obaccess_api_c.h'
unloading 'include/obaccess_api_mgd.h'
unloading 'oblix/config/np1014_sdk.txt'
unloading 'oblix/lib/access_api_mgd.lib'
unloading 'oblix/lib/access_flush.dll'
unloading 'oblix/lib/jobaccess.jar'
unloading 'oblix/lib/obaccess.dll'
unloading 'oblix/lib/obaccess.lib'
unloading 'oblix/lib/obaccess_api_mgd.dll'
unloading 'oblix/lib/obnlsrtl.dll'
unloading 'oblix/lib/obxmlengine.dll'
unloading 'oblix/tools/configureAccessGate/configureAccessGate.exe'
unloading 'oblix/tools/migration_tools/obmigratefiles.exe'
unloading 'oblix/tools/migration_tools/obmigratenp.exe'
unloading 'oblix/tools/migration_tools/obpdiff.exe'
Backing up old files to C:\NetPoint\AccessServerSDK/backup-Oracle-101430BP10-binary_parameter. backing up 'include/obaccess_api_c.h'
backing up 'include/obaccess_api_mgd.h'
backing up 'oblix/config/np1014_sdk.txt'
backing up 'oblix/lib/access_api_mgd.lib'
backing up 'oblix/lib/access_flush.dll'
backing up 'oblix/lib/jobaccess.jar'
backing up 'oblix/lib/obaccess.dll'
backing up 'oblix/lib/obaccess.lib'
backing up 'oblix/lib/obaccess_api_mgd.dll'
backing up 'oblix/lib/obnlsrtl.dll'
backing up 'oblix/lib/obxmlengine.dll'
backing up 'oblix/tools/configureAccessGate/configureAccessGate.exe'
backing up 'oblix/tools/migration_tools/obmigratefiles.exe'
backing up 'oblix/tools/migration_tools/obmigratenp.exe'
backing up 'oblix/tools/migration_tools/obpdiff.exe' C:\NetPoint\AccessServerSDK/backup-Oracle-101430BP10-binary_parameter/include: File exists
backing up 'include/obaccess_api_c.h'
backing up 'include/obaccess_api_mgd.h' C:\NetPoint\AccessServerSDK/backup-Oracle-101430BP10-binary_parameter/oblix: File exists C:\NetPoint\AccessServerSDK/backup-Oracle-101430BP10-binary_parameter/oblix/config: File exists backing up 'oblix/config/np1014_sdk.txt' C:\NetPoint\AccessServerSDK/backup-Oracle-101430BP10-binary_parameter/oblix/lib: File exists
backing up 'oblix/lib/access_api_mgd.lib'
backing up 'oblix/lib/access_flush.dll'
backing up 'oblix/lib/jobaccess.jar'
backing up 'oblix/lib/obaccess.dll'
backing up 'oblix/lib/obaccess.lib'
backing up 'oblix/lib/obaccess_api_mgd.dll'
backing up 'oblix/lib/obnlsrtl.dll'
backing up 'oblix/lib/obxmlengine.dll' C:\NetPoint\AccessServerSDK/backup-Oracle-101430BP10-binary_parameter/oblix/tools: File exists C:\NetPoint\AccessServerSDK/backup-Oracle-101430BP10-binary_parameter/oblix/tools/configureAccessGat e: File exists
backing up 'oblix/tools/configureAccessGate/configureAccessGate.exe' C:\NetPoint\AccessServerSDK/backup-Oracle-101430BP10-binary_parameter/oblix/tools/migration_tools: F ile exists
backing up 'oblix/tools/migration_tools/obmigratefiles.exe'
backing up 'oblix/tools/migration_tools/obmigratenp.exe'
backing up 'oblix/tools/migration_tools/obpdiff.exe' C:\NetPoint\AccessServerSDK/backup-Oracle-101430BP10-binary_parameter/include: File exists
backing up 'include/obaccess_api_c.h'
backing up 'include/obaccess_api_mgd.h' C:\NetPoint\AccessServerSDK/backup-Oracle-101430BP10-binary_parameter/oblix: File exists C:\NetPoint\AccessServerSDK/backup-Oracle-101430BP10-binary_parameter/oblix/config: File exists backing up 'oblix/config/np1014_sdk.txt'
C:\NetPoint\AccessServerSDK/oblix/config/np1014_sdk.txt: Permission denied C:\NetPoint\AccessServerSDK/backup-Oracle-101430BP10-binary_parameter/oblix/lib: File exists
backing up 'oblix/lib/access_api_mgd.lib'
backing up 'oblix/lib/access_flush.dll'
backing up 'oblix/lib/jobaccess.jar'
backing up 'oblix/lib/obaccess.dll'
backing up 'oblix/lib/obaccess.lib'
backing up 'oblix/lib/obaccess_api_mgd.dll'
backing up 'oblix/lib/obnlsrtl.dll'
backing up 'oblix/lib/obxmlengine.dll' C:\NetPoint\AccessServerSDK/backup-Oracle-101430BP10-binary_parameter/oblix/tools: File exists C:\NetPoint\AccessServerSDK/backup-Oracle-101430BP10-binary_parameter/oblix/tools/configureAccessGat e: File exists
backing up 'oblix/tools/configureAccessGate/configureAccessGate.exe'
C:\NetPoint\AccessServerSDK/backup-Oracle-101430BP10-binary_parameter/oblix/tools/migration_tools: F ile exists
backing up 'oblix/tools/migration_tools/obmigratefiles.exe'
backing up 'oblix/tools/migration_tools/obmigratenp.exe'

backing up 'oblix/tools/migration_tools/obpdiff.exe' C:\NetPoint\AccessServerSDK/backup-Oracle-101430BP10-binary_parameter/include: File exists
backing up 'include/obaccess_api_c.h'
backing up 'include/obaccess_api_mgd.h' C:\NetPoint\AccessServerSDK/backup-Oracle-101430BP10-binary_parameter/oblix: File exists C:\NetPoint\AccessServerSDK/backup-Oracle-101430BP10-binary_parameter/oblix/config: File exists
backing up 'oblix/config/np1014_sdk.txt'
C:\NetPoint\AccessServerSDK/oblix/config/np1014_sdk.txt: Permission denied C:\NetPoint\AccessServerSDK/backup-Oracle-101430BP10-binary_parameter/oblix/lib: File exists
backing up 'oblix/lib/access_api_mgd.lib'
backing up 'oblix/lib/access_flush.dll'
backing up 'oblix/lib/jobaccess.jar'
backing up 'oblix/lib/obaccess.dll'
backing up 'oblix/lib/obaccess.lib'
backing up 'oblix/lib/obaccess_api_mgd.dll'
backing up 'oblix/lib/obnlsrtl.dll'
backing up 'oblix/lib/obxmlengine.dll' C:\NetPoint\AccessServerSDK/backup-Oracle-101430BP10-binary_parameter/oblix/tools: File exists C:\NetPoint\AccessServerSDK/backup-Oracle-101430BP10-binary_parameter/oblix/tools/configureAccessGat e: File exists
backing up 'oblix/tools/configureAccessGate/configureAccessGate.exe' C:\NetPoint\AccessServerSDK/backup-Oracle-101430BP10-binary_parameter/oblix/tools/migration_tools: F
ile exists
backing up 'oblix/tools/migration_tools/obmigratefiles.exe'
backing up 'oblix/tools/migration_tools/obmigratenp.exe'
backing up 'oblix/tools/migration_tools/obpdiff.exe'
Copying files from 'C:\NetPoint\AccessServerSDK/unload-Oracle-10143013-IP09BP13-IP09-2564' to 'C:\Ne tPoint\AccessServerSDK'.
Copy command using is: 'xcopy /S /Y /R /K /F "C:\NetPoint\AccessServerSDK\unload-Oracle-10143013-IP0 9BP13-IP09-2564" "C:\NetPoint\AccessServerSDK"'. C:\NetPoint\AccessServerSDK\unload-Oracle-10143013-IP09BP13-IP09-2564\include\obaccess_api_c.h -> C: \NetPoint\AccessServerSDK\include\obaccess_api_c.h C:\NetPoint\AccessServerSDK\unload-Oracle-10143013-IP09BP13-IP09-2564\include\obaccess_api_mgd.h -> C:\NetPoint\AccessServerSDK\include\obaccess_api_mgd.h C:\NetPoint\AccessServerSDK\unload-Oracle-10143013-IP09BP13-IP09-2564\oblix\config\np1014_sdk.txt ->

C:\NetPoint\AccessServerSDK\oblix\config\np1014_sdk.txt C:\NetPoint\AccessServerSDK\unload-Oracle-10143013-IP09BP13-IP09-2564\oblix\lib\access_api_mgd.lib - > C:\NetPoint\AccessServerSDK\oblix\lib\access_api_mgd.lib C:\NetPoint\AccessServerSDK\unload-Oracle-10143013-IP09BP13-IP09-2564\oblix\lib\access_flush.dll -> C:\NetPoint\AccessServerSDK\oblix\lib\access_flush.dll C:\NetPoint\AccessServerSDK\unload-Oracle-10143013-IP09BP13-IP09-2564\oblix\lib\jobaccess.jar -> C:\ NetPoint\AccessServerSDK\oblix\lib\jobaccess.jar C:\NetPoint\AccessServerSDK\unload-Oracle-10143013-IP09BP13-IP09-2564\oblix\lib\obaccess.dll -> C:\N etPoint\AccessServerSDK\oblix\lib\obaccess.dll C:\NetPoint\AccessServerSDK\unload-Oracle-10143013-IP09BP13-IP09-2564\oblix\lib\obaccess.lib -> C:\N etPoint\AccessServerSDK\oblix\lib\obaccess.lib C:\NetPoint\AccessServerSDK\unload-Oracle-10143013-IP09BP13-IP09-2564\oblix\lib\obaccess_api_mgd.dll
-> C:\NetPoint\AccessServerSDK\oblix\lib\obaccess_api_mgd.dll C:\NetPoint\AccessServerSDK\unload-Oracle-10143013-IP09BP13-IP09-2564\oblix\lib\obnlsrtl.dll -> C:\N etPoint\AccessServerSDK\oblix\lib\obnlsrtl.dll C:\NetPoint\AccessServerSDK\unload-Oracle-10143013-IP09BP13-IP09-2564\oblix\lib\obxmlengine.dll -> C :\NetPoint\AccessServerSDK\oblix\lib\obxmlengine.dll C:\NetPoint\AccessServerSDK\unload-Oracle-10143013-IP09BP13-IP09-2564\oblix\tools\configureAccessGat e\configureAccessGate.exe -> C:\NetPoint\AccessServerSDK\oblix\tools\configureAccessGate\configureAc cessGate.exe C:\NetPoint\AccessServerSDK\unload-Oracle-10143013-IP09BP13-IP09-2564\oblix\tools\migration_tools\ob migratefiles.exe -> C:\NetPoint\AccessServerSDK\oblix\tools\migration_tools\obmigratefiles.exe C:\NetPoint\AccessServerSDK\unload-Oracle-10143013-IP09BP13-IP09-2564\oblix\tools\migration_tools\ob migratenp.exe -> C:\NetPoint\AccessServerSDK\oblix\tools\migration_tools\obmigratenp.exe C:\NetPoint\AccessServerSDK\unload-Oracle-10143013-IP09BP13-IP09-2564\oblix\tools\migration_tools\ob pdiff.exe -> C:\NetPoint\AccessServerSDK\oblix\tools\migration_tools\obpdiff.exe
15 File(s) copied
Error: could not execute the tool 'C:\NetPoint\AccessServerSDK\oblix\tools\migration_tools\obmigrate paramsg.exe' successfully
Starting default Language message patch process ...
--- Oracle Access Manager System install ---
Upgrading Access Server SDK from release 10.1.4.3.0 BP 10 to release 10.1.4.3.0.13-IP09 BP 13-IP09. Unloading files to C:\NetPoint\AccessServerSDK/unload-Oracle-10143013-IP09BP13-IP09-2668. unloading 'oblix/lib/jobaccess.jar'
Backing up old files to C:\NetPoint\AccessServerSDK/backup-Oracle-101430BP10-message_en-us. backing up 'oblix/lib/jobaccess.jar'
backing up 'oblix/lib/jobaccess.jar'
backing up 'oblix/lib/jobaccess.jar'
backing up 'oblix/lib/jobaccess.jar'
Copying files from 'C:\NetPoint\AccessServerSDK/unload-Oracle-10143013-IP09BP13-IP09-2668' to 'C:\Ne tPoint\AccessServerSDK'.
Copy command using is: 'xcopy /S /Y /R /K /F "C:\NetPoint\AccessServerSDK\unload-Oracle-10143013-IP0 9BP13-IP09-2668" "C:\NetPoint\AccessServerSDK"'. C:\NetPoint\AccessServerSDK\unload-Oracle-10143013-IP09BP13-IP09-2668\oblix\lib\jobaccess.jar -> C:\ NetPoint\AccessServerSDK\oblix\lib\jobaccess.jar
1 File(s) copied
Error: could not execute the tool 'C:\NetPoint\AccessServerSDK\oblix\tools\migration_tools\obmigrate paramsg.exe' successfully
Patch complete
Successfully applied default Language message patch!
Patch complete

Note: Ignore the highlighted warning in the patch update log.


  • Check Installed windows updates from control panel

  • Make sure Visual C++ redistributable packs for 2005, 2008 64-bit is installed. 


  • Sample Application code Access_API_Test.cs 


using System;
using System.Reflection;
using System.Collections; 
using Oblix.Access.Server; 
using Oblix.Access.Common; 
class Access_API_Test 
{
public static void Main(string[] args) 
Console.WriteLine("Initialize the configuration directory!");
String resourceString = "//pokuri.demo.com:7777/"; Console.WriteLine("Initialize the configuration directory!"); 
try 
{
String config = "C:/NetPoint/AccessServerSDK";
ObConfigMgd.initialize(config);
catch (ObAccessExceptionMgd ex) 
{
Console.WriteLine("Initialization Exception caught: " + ex.String); 
}
ObDictionary parameters = new ObDictionary();
ObResourceRequestMgd resource = new ObResourceRequestMgd("http",resourceString,"GET",parameters); 
if ( resource.IsProtected == true ) 
{
Console.WriteLine("Resource " + resourceString + " is protected ..." ); 
try 
{
ObAuthenticationSchemeMgd authnScheme = new ObAuthenticationSchemeMgd(resource);
if ( authnScheme.IsForm ) 
{
Console.WriteLine("Authentication is basic" );
ObDictionary credentials = new ObDictionary(); credentials.Add("userid","user.1"); credentials.Add("password","Abcd123");
ObUserSessionMgd user = new ObUserSessionMgd(resource,credentials); ObUserStatusMgd status = user.Status;
if ( !status.IsLoggedIn ) 
{
Console.WriteLine("User is not logged in"); 
}
user.Location = "127.0.0.1";
Console.WriteLine("User: " + user.UserIdentity + " is logged in..."); Console.WriteLine("User location is: " + user.Location);
if ( user.IsAuthorized(resource) ) 
{
Console.WriteLine("User is authorized"); 
else 
{
Console.WriteLine("User is not authorized"); }
else 
{
Console.WriteLine("Authentication is not basic" );
}
catch (ObAccessExceptionMgd ex) 
{
Console.WriteLine("Access Exception caught: " + ex.String);
}
else 
{
Console.WriteLine("Resource is NOT protected ... " );
}

}



  • Environment Variables:
    set CLASSPATH=%CLASSPATH%;.;C:\NetPoint\AccessServerSDK\oblix\lib set PATH=%PATH%;.;C:\NetPoint\AccessServerSDK\oblix\lib
    set OBACCESS_INSTALL_DIR=C:\AccessSDK64\NetPoint\AccessServerSDK 

  • Add obaccess_api_mgd.dll in Global Cache. Use below command.
    C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools\x64>gacutil.exe –l

    C:\NetPoint\AccessServerSDK\oblix\lib\obaccess_api_mgd.dll
    Note: If gacutil.exe is not available in any of the folder, download and install Dot Net SDK for 64 –bit OS
  • Compile the C# code using below command. “access_api_test.exe” file will be generated
C:\Windows\Microsoft.NET\Framework64\v2.0.50727\csc.exe           /reference:C:\NetPoint\AccessServerSDK\oblix\lib\obaccess_api_mgd.dll /out:C:\NetPoint\access_api_test.exe C:\NetPoint\access_api_test.cs


  • Run the code C:\NetPoint>access_api_test.exe

If every thing is good code should run and check if user is authenticated & authorized for protected URL.


Useful Link & Commands
  • http://oracle.developer-works.com/article/4628709/OAM+Access+SDK
  • http://msdn.microsoft.com/en-us/library/ms379563(v=vs.80).aspx
  • http://docs.oracle.com/cd/E11857_01/em.111/e18155/mgmt_console/policy_templates/configuring_orac
    le_amclient_machines.htm
  • Trace Error commands
    C:\Windows\System32>sxstrace.exe Parse -logFile:C:\Test.log -outfile:C:\test2.txt
    C:\Windows\System32>sxstrace.exe Trace -logFile:C:\Test.log
  • How to: View the Contents of the Global Assembly Cache
    C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools\x64>gacutil.exe -l 

Hope this will be useful to some one out there.

-- Siva Pokuri.


Tuesday, November 17, 2015

WATCH: Oracle Access Manager(OAM) 11g R2 PS3 Impersonation Demo

Oracle Access Manager 11g R2 PS3 Impersonation Demo

Pre-requisites:
  1. OAM 11g R2 PS3 environment is up and running with OUD as user store & protected sample resource called “spokuri.html” with LDAPSchema
  2. Enabled Impersonation in OAM & Extend OAM LDAP schema into OUD directory server
  3. Created user “kpokuri”(Impersonatee) with “orclIDXPerson” object class in OUD
  4. Created user “spokuri”(Impersonator) in OUD
  5. Added an attribute “orclImpersonationGrantee” to “kpokuri” and value as “8c69d7465afc406a947669204ad88ecf|20100324163000Z|20180524172000Z”

Description: orclImpersonationGrantee attribute value has 3 parameters separated by pipe “|”.

1.     Impersonator orclguid. In this case, it’s “spokuri” user orclguid.
2.     Impersonation start date
3.     Impersonation end date


Demo Video: 




Test Case:

  1. Access OAM LDAP Schema protected resource http://pokuri.demo.com:7777/spokuri.html
  2. Enter impersonator credentials spokuri/<<password>>
  3. Open a new tab and access http://pokuri.demo.com:14100/oam/server/impersonate/start?userid=kpokuri&success_url=http://pokuri.demo.com:7777/kpokuri.html&failure_url=http://pokuri.demo.com:7777/error.html
  4. When prompted enter impersonator password again
  5. Up on successful impersonation to user “kpokuri” new session will be created in OAM for user “kpokuri”.
  6. Check the “kpokuri” user session in OAM admin console “session management” and notice that impersonation field will be “true”.



Hope this helps some one out there!!

-- Siva Pokuri.

Saturday, October 24, 2015

Fix: OAM 11g R2 PS2 (11.1.2.2.0) Keystore tampered error

Issue:

OAM 11g R2 PS2 (11.1.2.2.0) throwing the following error:

[oam_server1] [ERROR] [] [Coherence] [tid: Logger@1725259747 3.7.1.1] [userId: ] [ecid: 0000Kcfv^DM7ECK6yVuXMG1KXY0q000002,0] [APP: oam_server#11.1.2.0.0] 2015-10-12 03:08:58.358/302741.698 Oracle Coherence GE 3.7.1.1 (thread=Configuration Store Observer, member=n/a): Error while starting cluster: (Wrapped) java.io.IOException: Keystore was tampered with, or password was incorrect.

- Restarting the Oracle Access Manager (OAM) Server fails with the same error.

Reason:

The ".cohstore.jks" keystore file is corrupt and must be restored from backup.

If the password in the ".cohstore.jks" keystore file is corrupt, even though you may be able to get the password using a WLST command, it needs to be restored from backup.

Solution:

1) Start the AdminServer.
2) Connect to the Enterprise Manager.
3) Locate the Domain in the left navigation panel.
4) Right click and select Security -> Credentials.
5) Delete the credential Map key pair (OAM_STORE, coh).
6) Restart the AdminServer. This will re-create the Coherence Bootstrap artifact and reset the required password.

-- Siva Pokuri.

Friday, September 25, 2015

How to integrate OBIEE with OAM

OBIEE Integration with Oracle Access Manager



Demo:

Quick Demo is HERE

Prerequisites

1. Install and Configure Oracle Access Manager. Steps here
2. Install and configure OBIEE. Steps here.
3. Install and configure LDAP. Steps here
4. Install Webserver/Webgate and register webgate with Oracle Access Manager. 

Integration Steps:

1. Configure reverse proxy for OBIEE applications. In my case I am using OHS as proxy server and i have OHS webgate on top of it. 

   
2. Create required OBIEE Groups in LDAP.


3. Login to Weblogic admin console and navigate to Security realm > my realm > providers.
    Create two new providers (LDAP provider and OAM Asserter) as per the below screen shot 









4. Reorder the providers as per the below screen shot. and Restart weblogic Admin server and Managed servers.


5. Login to the http://<hostname>:<port>/em. 
6. Navigate to Weblogic domain> bifoundation_domain> Security> Security provider configuration.
7. Scroll down to Single sign on provider and click on Configure.
8. Configure as per below screen shot.


9. Login to http://<hostname>:<port>/analytics.
10. Navigate to Administration> Manage BI Publisher> Security Configuration.
11. In Authentication section do the changes as per the below screen shot.


12. Login to http://<hostname>:<port>/em
13. Click on coreapplication under Business Inteligence.
14. Perform the changes as per the below screen shot. and click on Apply and click on Activate changes.


15. Login to workspace http://<hostname>:<port>/workspace.
16. Go to Navigate> Administer> Workspace Settings> Server Settings.
17. Modify Log off URL and select Yes in Enable Single Sign on as per the below screen shot.


18. Restart Weblogic Admin server and Managed Servers.
19. Now try to access the application with proxy URL. User will get OAM login page for Authentication.

http://dev.kiran.com:7777/analytics









Hope this is helpful. 

Thanks
Kiran Pokuri

Tuesday, May 19, 2015

How to upgrade OAM 11G R2 PS2 to PS3


Oracle Access Manager 11GR2PS2 Upgrade to PS3

1. Start the executable and follow the steps below for binary installation.  












2. Navigate to <MW_HOME>/oracle_common/bin/ and execute ./psa.
3. Upgrade the Patch set as the below screen shots.











4. Navigate to <MW_HOME>/oracle_common/common/bin/
5. Execute ./wlst.sh  and follow the screen shots below.


















6. Restart both OAM managed server and WLS Admin server.
7. Access the OAM admin console "http://<wls_host>:<wls_port>/oamconsole" 



I hope this is helpful.

Thanks !!!
Kiran Pokuri