Showing posts with label TAM. Show all posts
Showing posts with label TAM. Show all posts

Monday, 29 October 2012

WebSEAL External Authentication Interface


External Authentication Interface (EAI)

By Siva R Praturi

External authentication interface extends the functionality of WebSEAL authentication process. It allows third-party systems to supply an authenticated identity to WebSEAL. This technique enables additional functionality beyond what WebSEAL is designed to do.  EAI can be used with applications written in any language including Java.

EAI process flow

EAI is a mechanism to outsource the responsibility for authentication from WebSEAL to a third party product / application. The way it works is shown in the following diagram.



The diagram describes the following process flow: 
1.       The user attempts to connect to protected application on back-end server. Webseal redirects the request to EAI server, which may be on a separate computer from WebSEAL.
2.       WebSEAL allows unauthenticated access to the EAI server. This is necessary, because the user is not authenticated at this point.
3.       The user and the EAI server communicate. This communication can be as long and as involved as necessary.
4.       The user, based on an HTML page from the EAI server, retrieves a trigger URL, which is a URL that is configured in WebSEAL as one that might contain the EAI output.
5.       The EAI server sends back a reply, which has an HTTP header that contains the user identity and possibly additional information.
6.       WebSEAL creates the credential for the user.
7.       WebSEAL allows the user to access a back-end server.
  
Configuring WebSEAL for EAI

Add the authentication mechanism library

The list of libraries used for authentication is in the [authentication-mechanisms] stanza of the WebSEAL configuration file. To enable EAI, add the following line (all on one line):
• ext-auth-interface = /opt/pdwebrte/lib/libeaiauthn.so

The [eai] stanza

The eai-auth stanza entry in the [eai] stanza of the WebSEAL configuration file enables or disables external authentication interface. To use EAI for HTTP(S) connections, use this line to set the eai-auth value:

• eai-auth = http/https/both

You also must specify the name of the HTTP Headers to match those from your application

• eai-pac-header = am-eai-pac
• eai-pac-svc-header = am-eai-pac-svc

The [eai-trigger-urls] stanza

This stanza specifies the trigger URLs. A trigger URL is a URL whose response can include the EAI server’s reply in HTTP headers. Trigger URLs can also be specified using a wildcard pattern.

• trigger = /eailogin/cgi-bin/eai*.pl 

Server junction and access control list
WebSEAL sees the EAI server as another HTTP server. To allow users to access this HTTP server, WebSEAL requires a junction. Use the following pdadmin command to create the junction. Note that the command is all one line.
s t <instance>-webseald-<webseal computer> create -t tcp-h <eai computer> /eailogin
Users are unauthenticated while they are communicating with the EAI server. To allow unauthenticated access, run the following pdadmin commands. Ignore error message HPDAC0757E about ACL permissions when you get it.
acl create eaiacl
acl modify eaiacl set any-other Trx
acl modify eaiacl set unauthenticated Trx
acl attach /WebSEAL/<webseal computer>-<instance>/eailogin eaiacl

Thursday, 25 October 2012

Automating WebSEAL junction management


Automating WebSEAL junction management

By Siva R Praturi

Tivoli Access Manager for e-Business is a Web single sign-on and access management solution. Tivoli Access Manager WebSEAL is the resource manager responsible for protecting Web-based resources. The most common deployment model uses WebSEAL to protect Web applications. WebSEAL junctions are WebSEAL’s link to the back-end resources in the environment. This connection is how WebSEAL knows where the applications are in the environment. Attributes of a junction include the Web server location (hostname, port and protocol) along with a number of other options that control how the Web server is accessed and how its content is processed by WebSEAL.

Content on the Web servers is then accessed via the WebSEAL server hostname, and with an additional path prefix. For example, a WebSEAL junction pointing to a WebSphere Application Server might have been created with the junction name of "/was". A user would then access "http[s]://<webseal-server>/was/" to access the root of the WebSphere Application Server content, rather than "http[s]://<was-server>/".

Management of WebSEAL junctions is performed using the standard IBM Tivoli Access Manager for e-Business administration interfaces, namely:
  • Web Portal Manager: a browser-based application
  • pdadmin: a command line program 
Creating a single junction is a simple task, but WebSEAL clusters, Configuration migration, Disaster recovery etc factors in a real IBM Tivoli Access Manager for e-Business environment complicate the larger management picture. So it is worth considering the following in any Tivoli Access Manager solution.

  • Manage junction definitions across a range of environments, for example, development, system test, and production.
  • Provide a mechanism to simplify the administration of WebSEAL junction definitions.
In my view, Automating WebSEAL junction management using pdadmin server task commands with windows batch / shell scripting is a good option to consider in any type of deployments. This approach has below advantages. 
  • A supported method for junction management is used.
  • Changes are immediate and do not require that the WebSEAL server be restarted.
  • Familiar commands are easy for experienced IBM Tivoli Access Manager for e-Business administrators to read.
  • Configuration errors are detected when the commands are processed.
I am sure all of you agree that, it is not a difficult task to automate webseal junction management using scripting support when we know related pdadmin server task command and its options. Below are some thumb rules which you can follow to make deployments across environments easier.

  1. Define a properties file for every webseal junction with all required values (e.g. userid, password, webseal instance name, host, port etc)
  2. Create deploy-junctions script which reads properties file and invokes webseal-junction-create script.
  3. Create destroy-junctions script which reads properties file and invokes webseal-junction-delete script. 
You can also think of automating ‘Objectspaces’, ‘ACLs’  etc on similar lines after creating junctions. I have done this exercise and it saves ample amount of time during deployment. 

Thursday, 16 August 2012

Tivoli Access Manager Tracing


Tivoli Access Manager Tracing

By Siva Praturi

IBM Tivoli Access Manager provides configurable tracing capabilities that can aid in problem determination. Tracing can be activated either through a routing file, or through pdadmin server task trace command.  Trace files are required to assist support personnel in diagnosing problems occurring with the functioning of the Tivoli Access Manager software.

Using routing files

A routing file can be used for enabling and disabling trace. The routing file is a file that can be used to define the name, location, and logging behaviour of certain message log and trace log files. The Tivoli Access Manager Base and WebSEAL components each have their own routing (or routing.template) files defined within their respective etc directories.

The contents of a routing file are fairly self-descriptive. When using a routing file to affect trace logging or message logging, you must stop and restart Tivoli Access Manager Component for the routing file change to take effect.

Using pdadmin trace utility

The pdadmin server task trace command can be used to dynamically control trace operations for the Tivoli Access Manager authorization server, WebSEAL, and the Tivoli Access Manager Plug-in for Web Servers. Trace utility allows you to capture information about error conditions and program control flow in Tivoli Access Manager Components. This information is stored in a file and used for debugging purposes.

Tracing for the Tivoli Access Manager policy server cannot be controlled dynamically with the pdadmin server task trace command. You must use the routing file to enable tracing for the policy server. The policy server must be restarted for any routing file modifications to take effect.

Let’s take a look at the tracing system in Tivoli Access Manager and some of the less complex WebSEAL and WebPI trace points in detail.

Trace elements

There are two elements within the trace system used to control the activation of trace statements. These are the trace component and the trace level.

Trace component: The trace within Tivoli Access Manager is organized into trace components. It is important to select the appropriate trace component to troubleshoot the problem area. The trace components themselves are organized in a hierarchical fashion. If trace is activated for a parent trace component, it will automatically be activated for all children trace components.

Trace level: The amount of detail that is produced for a particular trace component is governed by the trace level that is selected. The trace level is a single integer within the range of 1-9, with 9 reporting the most amount of detail and 1 reporting the least amount of detail.

Trace output generally consists of A time stamp for the trace entry, ID of the thread, Name of the trace component, Name of the product source file and
Trace text

Below figure illustrates the process flow for pdadmin server task trace command



Listing trace components

To list all of the trace components offered by a server, issue the trace list command:

server task <server-name> trace list

Adjusting the trace level of a component

To change the level and destination for a specific trace point, use the following command:

server task <server-name> trace set <component> <level> [file path=file|other-log-agent-config]

Where component is the name of trace component as shown by the list command. The level will control the amount of detail to be gathered, in the range of 1 to 9. The optional file path parameter specifies the location for trace output. If this parameter is not supplied the trace output will be sent to the stdout stream of the server.

Retrieving the current trace level of a component

To show the names and levels for all enabled trace components use the following command:

server task <server-name> trace show [component]

If the component parameter is omitted the output will list the name and level of all of the enabled trace components.

Generally used Trace Components with WebSEAL & WebPI


pd.ivc.ira
 The pd.ivc.ira component is used to trace the Tivoli Access Manager interaction with the LDAP server. As such, it is a trace component that can be used with WebSEAL or PDWebPI. The trace is useful in determining problems that occur during authentication.
pdweb.debug
 The pdweb.debug component is used to trace the HTTP headers sent between the client and WebSEAL. This includes the headers contained within the request, as well as the response.
pdweb.snoop.client
 The pdweb.snoop.client component is used trace the HTTP packets which are transmitted between WebSEAL and the client.
pdweb.snoop.jct
 The pdweb.snoop.jct component is used trace the HTTP packets that are transmitted between WebSEAL and the junctioned back-end Web server.
pdweb.wan.azn
 The pdweb.wan.azn component is used to trace the authorization decision for all transactions. This includes details related to the credential upon which the authorization decision is made, the resource that is being accessed, as well as the result of the authorization decision.
pdweb.wns.authn
 The pdweb.wns.authn component is used to trace details concerning the authentication process applied by WebSEAL. This includes information such as the authentication mechanism, the details used during the authentication process, and the result of the authentication.
pdwebpi.azn
 The pdwebpi.azn component is used to trace the authorization decision for all transactions.
pdwebpi.proxy-cmd
 The pdwebpi.proxy-cmd trace component can be used to examine these commands, and from this an administrator can derive what the proxy component is instructing the Web server to do with each request.
pdwebpi.request
 The pdwebpi.request component is used to trace the HTTP requests that are received by the system.
pdwebpi.session
 The pdwebpi.session component is used to trace details pertaining to a user's session. In particular, it will trace the contents of the user's session along with session expiration details and any changes that might be made to a user's session.


Note: Use trace with caution. It is intended as a tool to use under the direction of technical support personnel. Messages from trace are sometimes cryptic, are not translated, and can severely degrade system performance.

Tuesday, 20 March 2012

Backup, Extract and Restore Tivoli Access Manager data

Backup, Extract and Restore Tivoli Access Manager data


By Siva Praturi

pdbackup


pdbackup utility is used to backup, extract and restore Tivoli Access Manager data

<TAM_Install_Dir>\etc\pdbackup.lst file contains Tivoli Access Manager data
<TAM_Install_Dir>\etc\pdinfo.lst file contains Tivoli Access Manager service information

It is good practice to backup using both options.

How to bakup Tivoli Access Manager data?

Use following commands to bakup Tivoli Access Manager data

pdbackup.exe -action backup -list "D:\APPS\IBM\Tivoli\Policy Director\etc\pdbackup.lst" -file pdbackup.lst_xxxx -path D:\temp

pdbackup.exe -action backup -list "D:\APPS\IBM\Tivoli\Policy Director\etc\pdinfo.lst" -file pdinfo.lst_xxxx -path D:\temp

If the command is run without any errors, it creates pdbackup.lst_xxxx.dar and pdinfo.lst_xxxx.dar files in D:\temp directory.

How to extract Tivoli Access Manager data?

Use following commands to extract Tivoli Access Manager data. This is to ensure the files are created properly before performing restore operation.

pdbackup.exe -action extract  -file D:\temp\pdinfo.lst_xxxx.dar -path D:\temp\pdinfo

pdbackup.exe -action extract  -file D:\temp\pdbackup.lst_xxxx.dar -path D:\temp\pdbackup

If the command is run without any errors, it extracts files to  D:\temp\pdinfo and  D:\temp\pdbackup  directory.
  
How to restore Tivoli Access Manager data?

Use following commands to restore Tivoli Access Manager data.

pdbackup.exe -action restore -file D:\temp\pdinfo.lst_xxxx.dar

pdbackup.exe -action restore -file D:\temp\pdbackup.lst_xxxx.dar

If the command is run without any errors, it restores files to <TAM_Install_Dir> from archive file.

Note:-

  • Use current date / timestamp for xxxx. It will avoid overwriting of bakup files created.
  • msg__pdbackup file will contain verbose output of ‘pdbakup’ commands. Review this file after executing the commands. Generally this file will be created in local\temp folder.
  • ‘pdbakup’ with restore option will try to overwrite files in <TAM_Install_Dir> and it prompts for ‘yes/no/all’ options. In win 2008, there is a bug and this will not be visible in command prompt. So open msg__pdbackup file and enter your option.
  • Stop TAM policy server service before restore operation.