How Do I know whether the Access Manager runs in realm or legacy mode?

Access Manager provides an interface to determine whenther the given service URL is running in legacy or realm mode. You can access this interface both manully from a web browser or programmatically. If you using the browser

enter the following url in the browser location

http://fqdn.of.the.AM.server:port/deployuri/SMSServlet?method=isRealmEnabled

eg: http://abc.example.com:58080/amserver/SMSServlet?method=isRealmEnabled

this will return

true if server is running in realm mode

false if server is running in legacy mode

 

if you are working on automating certain operations of  Access Manager based on whether it is running on realm or legacy. Here is the script that might be handy to determine the runtime mode quickly. This script depends on wget

this comes with linux and recent solaris releases

 

 IsRealm()
{

        URL="$1/SMSServlet?method=isRealmEnabled"
        wget -q -O - ${URL}
}
#set -x
if [ $# -lt      1 ];
    then
        if [ `uname -p` = "unknown" ];
    then
                IS_BASE=`rpm -q --queryformat  %{INSTALLPREFIX} sun-identit
y-services-6.2-5`
                rpm -q sun-identity-services-6.2-5 > /dev/null 2>&1
                rc=$?
                AM_LIB_DIR=/etc/opt/sun/identity/config/AMConfig.properties
                AMADMIN=$IS_BASE/identity/bin/amadmin
    else
                IS_BASE=`pkgparam  SUNWamsvc BASEDIR`
                pkginfo SUNWamsvc > /dev/null 2>&1
                rc=$?
                AM_LIB_DIR=/etc/opt/SUNWam/config/AMConfig.properties
                AMADMIN=$IS_BASE/SUNWam/bin/amadmin
    fi
        naming_url=`grep com.iplanet.am.naming.url $AM_LIB_DIR| cut -d\\=  -f2|cut -d\\/ -f1-4`
        IsRealm $naming_url
        exit 0
fi

IsRealm "$1"


 

Usage:

 Copy this script to a file called isrealm.sh

 You can just run isrealm.sh without any arguments in a  host where Access Manager is installed(you need to be the runtime user of Access Manager user to run this script)

if you run without arguments then the script will try to locate the Access Manager configuration in the localhost. If you want to find out the remote Access Manager's mdoe then

isrealm.sh  http://abc.example.com:58080/amserver

 

this will return true or false based on the mode.

 

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Indira Thangasamy, I manage the OpenSSO Quality engineering team.

Search

Archives
« April 2014
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
   
       
Today