Pages

Ads 468x60px

Wednesday, July 25, 2012

Java: Connection with IBM Tivoli Access Manager (ITAM-eb)

This will help you to create connection with IBM Tivoli Access Manager (ITAM-eb) using TAM Java API. Please configure your environment before running this. Your PATH, CLASSPATH, JAVAHOME environmental variables should be set before running this and you have to include PD.jar in your project and classpath. Configuration for TAM-eb should be correct otherwise there will be some problems with it. I have used default values for the connection, so you can modify these according your environment settings. The most important part is the use of com.tivoli.pd.jcfg.SvrSslCfg utility.


import java.util.*;
import java.net.URL;

import com.tivoli.pd.jutil.PDContext;
import com.tivoli.pd.jadmin.*;

// to connect TAM
public class TAMConnection {

// Set up values for TAM Context Initialization
private static PDContext ctxt = null;
private PDMessages msgs = new PDMessages();

// Set up default values for TAM connection and change all values according to your environment
//app.properties will be generated with com.tivoli.pd.jcfg.SvrSslCfg utility
private static String prog           = "TAMConnection";
private static String adminName      = "sec_master";
private static String configURLStr   = "file:///root/Desktop/app.properties";
private static String registrysuffix = "c=us";
private static char[] adminPassword  = {'o','b','j','e','c','t','0','0','\0'};
private Locale locale                = new Locale("ENGLISH", "US");
private URL configURL                = null;

private TAMConnection() {
try {

PDAdmin.initialize(prog, msgs);
configURL = new URL(configURLStr);
ctxt = new PDContext(locale, adminName, adminPassword, configURL);
} catch (Exception ex) {
ex.getMessage();
}
}

// to initialize the TAM context
public static PDContext InitializeContext() {
new TAMConnection();
return ctxt;
}

// to close the TAM context
public static void CloseContext(PDMessages msgs) {
try {
if (ctxt != null) {
ctxt.close();
}

PDAdmin.shutdown(msgs);
} catch (Exception ex) {
ex.getMessage();
}
}
}

2 comments:

  1. Tivoli Access Manager Online Training
    Tivoli Identity Manager Online Training
    http://www.21cssindia.com/courses/tivoli-access-manager-online-training-164.html
    Tivoli Access Manager for e-business Introduction and Overview
    Business Requirements
    Tivoli Access Manager Architecture
    Tivoli Access Manager components
    Authentication Security Policy
    Authorization
    Protecting Resource
    Tivoli Access Manager for e-business Installation
    Call Us +919000444287

    ReplyDelete
  2. Tivoli Access Manager Online Training
    http://www.21cssindia.com/courses/tivoli-access-manager-online-training-164.html
    Tivoli Access Manager for e-business Introduction and Overview
    Business Requirements
    Tivoli Access Manager Architecture
    Tivoli Access Manager components
    Authentication Security Policy
    Authorization
    Protecting Resource
    Tivoli Access Manager for e-business Installation
    21st Century providing Online training and support on All Technologies. If you are seeking training and support you can reach me on 91-9000444287. Online training by real time Experts. Call us 001-309-200-3848 for online training

    ReplyDelete