Showing posts with label Oracle OAM. Show all posts
Showing posts with label Oracle OAM. Show all posts

Thursday 11 December 2014

Configuring DCC Webgate 11g with IIS7.5 on Windows 2008 R2

 Pre-requisites:

  1. IIS Server Role is already added: In case not follow Configure IIS Server Role
  2. IIS Site is created: 
    1. IIS Site Global Configuration IIS
    2. New Site Creation
  3. IIS R2PS2 Webgate is installed & configured with the IIS Sites: Configure IIS R2PS2 Webgate 11g

Let's start the process:

  • Open OAM Console : http://host:port/oamconsole
  •  Create Webgate Agent Profile:
    • We need to create 2 profiles: One is the resource webgate profile & other is DCC webgate profile.
  •  Create Resource Webgate Profile: rwg-9090
Note: I have configured my OAM Server in Simple Mode, that's why security mode is chosen as 'simple'.
  • Create DCC Webgate Profile: dcc-9091
Note: Once you have created  the profile, to make it DCC we need to tick the detached credential collector flag.
    • Once done the change, click apply to reflect the changes.
  •  Now we need to add resources to with the DCC profile just created:
    • We need to add a few excluded resources, so that no authentication/authorization is made for them.
    •  Select the dcc-9091 profile:
    •  Let's create excluded resource:

    •  We have created following excluded resources:
      • /favicon.ico
      • /oamsso-bin/login.pl
      • /oamsso/** - Note this is an additional resource to be excluded as for IIS this needs to be excluded. Other wise for other servers it is not required.
  •  Now we need to create a DCC Authentication Scheme: This scheme will be used by resource webgate & dcc webgate both.



  • Now we need to attach the both created authn scheme with the profiles:





  •  You can see that i have created 2 IIS sites & webgate is already configured with both of them.
  • Now copy the artifacts to the webgate instance directory in the respective resource & dcc webgate sites.
    • In our setup: we have rwg-9090 for resource webgate & dcc-9091 for dcc webgate.
  • Once done, restart the IIS Server: using the command 'iisreset'. 
  • Now access the protected resource webgate url:
          http://host:9090/welcome.html
    • Did you noticed you get this login page, having url as http://host:9091/oamsso-bin/login.pl
    • This is the challenge url that we have mentioned in the dcc authn scheme.
    • With DCC webgate in picture, the oam server ip port is mot visible to the end user, that's why it is a detached credential collector. It has detached the credential collection process from the OAM Server.
    • Now it is the DCC which creates OAP/NAP connections with OAM Server.


This end's the DCC Webgate Configuration with IIS 7.5/8.5 on Windows 2008 R2.

Enjoy :-)

Thursday 4 December 2014

Webgate Caches: Understanding the Webgate Caching

We will be discussing the following:


  1. When WebGate do the caching? At what time?
  2. Why it is required to cache?
  3. How it uses this cache?
  4. How to tune this cache?
  5. Webgate Caching Demo



1) When WebGate do the caching? At what time?

      Basically Webgate caches the information: 

    • At the time of Authentication & 
    • Authorization.

2) Why it is required to cache?

It is important to do the caching when we don't want the OAM Server to get overloaded.
And what does this means actually?

It means that if the webgate starts sending every similar request to the server, it is actually not adding any value. We are just asking the server to do the repetitive task.

But what if we can make these request a screening at webgate. What if webgate first looks to the request if found it has already served it than webgate takes the decision. As webgate already has the answer cached. And in case webgate doesn't have any info about the user request than it will make a trip to server asking for the same & hence caching it for future use.


3) So does it means that webgate caches the request for lifetime?

No, absolutely not. It do cache, but certainly it too have a life. And its life is depends on the configuration that we do while creating the Webgate Profile.


4) What all parameters do take care of caching in OAM?

    As discussed there are 2 types of caches:

    • Authentication &
    • Authorization
Parameters:
  1. Authentication Cache Configurable Parameters:
    1. Maximum Cache Elements
    2. Cache Timeout
  2. Authorization User Defined Parameters:
    1. maxAuthorizationResultCacheElems
    2. authorizationResultCacheTimeout  

5) Now the question comes that how these caches comes into picture? As in how webgate actually uses it?


Basically when user request comes to the webgate (obviously via a server where webgate is integrated), at that time a lookup is made to the cache. Now first look up is made to authentication cache for the required parameters & than look up is made to authorization cache.

Now the interesting point here is that in case cache miss hit occurs than a NAP/OAP call is made to the server, & the response is actually cached. So that next tym if the same request comes to the webgate before cache timeout than webgate has the capability to respond & do look up.

6) Tuning the webgate cache parameters:


As discussed at point (4), the parameters defined can be configured:
  • Max cache elements: If we configure this parameter as -1, than webgate will not cache the elements.
  • Cache Timeout: It tells after how much time will the cache drains out. If Max Cache Elements is configured as -1, than this parameter has no significance.
  • maxAuthorizationResultCacheElems - This user defined parameter will set the max number of authorization cache elements that can be cached. 
  • authorizationResultCacheTimeout - this is same a cache timeout but this is specifically for authorization cache. It has no impact on authentication cache. Default value is 15 seconds.
    • If authorizationResultCacheTimeout is set to 0, Authorization Cache is disabled.

Reference Docs: http://docs.oracle.com/cd/E27559_01/doc.1112/e28552/oam.htm#ASPER490



Enjoy :-)



    Monday 1 December 2014

    [OAM]: Configuring pre authentication Advance Rules

    Configuring pre authentication Advance Rules:

    Pre-Requisites:
    • OAM Managed & Admin Server are up & running.
    • You have already created the 'Webgate Profile' & the artifacts are placed in the webgate instance directory. 

    1) Log in to OAM Console: http://<host:port>/oamconsole



    2) Go to 'Application Domain' & select the webgate profile that you have created. Like in our case i am using 'dcc-7778'.



    3) Select 'Authentication Policies' tab:



    • Open 'Protected Resources':

    4) Now we need to select the 'Advanced Rules' tab: 


    • Let's create a pre-authenticate rule: Click the '+' sign
    • Fill the fields:
      • Rule Name - Provide the rule name.
      • Condition - This will be a condition which needs to be configured using Jython Script style.
      • Switch Authentication Scheme - If condition is true, than we will switch the Authentication Scheme.
      • Deny Access - If this flag is true, than no need to configure 'Switch Authentication Scheme'.
      • Click 'Add' to add the rule.
      • Apply the changes.

    5) The rule that we have created above states that if User IP Address starts with '10.' than switch the configured Authentication Scheme from the one we have configured to 'Basic Scheme'.

    6) Now we are good to test the changes done. Let's hit the request, it should ask for credentials but as per 'Basic Scheme'

    http://<host:port>/index.html


    Note: The Client IP Address here starts with '10.' 

    Reference: https://docs.oracle.com/cd/E52734_01/oam/AIAAG/GUID-1E9A2B43-140C-4A85-8DEA-521CE3F57B12.htm#AIAAG88930

    Hurray.... we are done... congrats... :-)

    Enjoy :-)

    Sunday 30 November 2014

    Installing & Configuring Apache 2.2 (64bit) on Solaris x86-64 Box

    This post is divided into 3 sections: Installation, Configuration & Verification. 



    So let's start the process.........


    Installing Apache22-64bit-

    1. To install apache22, we need the source code & than need to build it. This will generate the binaries.
    2. Download the source code from http://httpd.apache.org/download.cgi#apache22 to your Solaris Sparc box.
    3. Now we need to 'export' some settings, i.e. per-requisites before we start the build process:
      1. export LD_LIBRARY_PATH=/usr/sfw/lib/amd64:/usr/local/lib/amd64
      2. export PATH=/usr/sfw/bin:/usr/ccs/bin:/usr/local/ccs/bin:/usr/local/bin:$PATH
      3. # if you want it 64 bits:
        1. export CFLAGS=”-m64″
      4. # if you want it 32 bits:
        1. # export CFLAGS=”-m32″
      5. export LDFLAGS=”-L/usr/sfw/lib/amd64″
      6.  
          4.  Unzip the downloaded apache22 source code.
          5.  Change the directory, move to the unzipped folder.
          6.  Now we need to configure the environment for building the source code, for this it is 
               required to execute the 'configure' script present in the directory.

               For eg: /scratch/ckukreja/apache22 is the directory where you have unzipped the 
                           source code
                           
                           bash$>ls -ltr configure

          7.  Execute the 'configure'  script.
               ./configure --with-included-apr --enable-so --prefix=/scratch/ckukreja/apache64



          8. Now we need to build & install the binaries. Do the following:
      • make



      • make install

         9. Now go to the directory where you have install apache22
      • Move to bin folder and execute the 'file' command on httpd executable file.
                     bash$> cd /home/ckukreja/apache22/bin 
                     bash$> file httpd
      • 'file httpd' - It's output will show you the type of file is it. Here it should show 64bit, if not than the binaries are of 32bit. Check the steps again.
        


    Configure Apache22 on Solaris Sparc Box:

     As you have installed the apache22 on your Solaris Machine. Now it is required to configure it before we start the server.
    1. Go to the apache22 installation directory. Move to conf folder.
             bash$> cd /home/ckukreja/apache22/conf  
         2. Open httpd.conf file to edit it. 

              bash$> vi httpd.conf
      • Change the port from '80' to the one you want. Like we use '8080'.
      • By default username & group are configured as 'daemon'. Change them to the one you are logged in with.
      • Save the changes & close the file.

          3. Now come out of the conf folder & change your directory to bin folder.
              
             bash$>cd /scratch/ckukreja/apache64/bin

          4. Execute the apachectl executable. It will start the httpd server process.
      • ./apachectl -k  start

    Verify the installation & configuration steps:

    Try to access the default resource present on apache22 server like index.html.
    Syntax: http://<hostname>:<port>/index.html
    Eg: http://hostname:8080/index.html

    It will display the "It Works!!!"



    So guys you are done with the Installation & Configuration of Apache22-64bit on your Solaris x86-64 Machine..........!!!!!!!!!!!!!! :-)


    Enjoy :-)

    Saturday 29 November 2014

    Creating User in Oracle Internet Directory(OID)


    Follow below steps to create a new user in OID:


    1) Log in to weblogic console & check whether ODSM (Oracle Directory Server Management) console is up & running:

        http://<host:port>/console


        Note: The console for ODSM is 'wls_ods1' in my setup & running on port 7005.

    2) Now log in to the ODSM Console - http://<host:7005>/ODSM


         Note: This setup is a freshly created, so we need to create a connection first.


    3) Create a User Connection:




    • Provide the details such as hostname, password etc.



    4) New connection is created:




    5) Choose Data Browser Option:



    •  Expand the tree dc=com


    •  Double Click the user cn=orcladmin



    6) Now we need to create a user: Here i have selected the option 'Create a new entry like this one'




    7) Complete the process for new user creation:


    • Choose 'Next' on first page:


    •  Provide 'cn' entry name & choose the relative distinguished name as 'cn'


    •  On Optional Properties page, i have provided the new user password. Although this is a non-mandatory field.


    •  Choose 'Finish' to complete the process.


    •  New user is created.... Hurrahhhhh !!!!!!



    Enjoy :-)