10.02.2013 Views

IBM Tivoli Access Manager for e-business: WebSEAL Administration ...

IBM Tivoli Access Manager for e-business: WebSEAL Administration ...

IBM Tivoli Access Manager for e-business: WebSEAL Administration ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Creating<br />

custom<br />

protocol<br />

plug-ins<br />

Overview<br />

The<br />

attribute<br />

retrieval<br />

service<br />

uses<br />

a<br />

special<br />

XML<br />

construct,<br />

known<br />

as<br />

a<br />

container,<br />

to<br />

retrieve<br />

and<br />

convey<br />

authorization<br />

decision<br />

in<strong>for</strong>mation.<br />

An<br />

ADI<br />

request<br />

is<br />

always<br />

made<br />

in<br />

the<br />

<strong>for</strong>m<br />

of<br />

a<br />

container<br />

name.<br />

When<br />

a<br />

request<br />

<strong>for</strong><br />

ADI<br />

(as<br />

a<br />

container<br />

name)<br />

is<br />

received<br />

by<br />

the<br />

attribute<br />

retrieval<br />

service,<br />

the<br />

container<br />

name<br />

is<br />

compared<br />

against<br />

all<br />

container<br />

names<br />

described<br />

in<br />

the<br />

Container<br />

Descriptor<br />

Table<br />

(ContainerDescriptorTable.xml).<br />

If<br />

a<br />

match<br />

is<br />

found,<br />

the<br />

process<br />

of<br />

retrieving<br />

the<br />

ADI<br />

can<br />

continue.<br />

In<strong>for</strong>mation<br />

in<br />

the<br />

container<br />

description<br />

reveals<br />

what<br />

ADI<br />

is<br />

required,<br />

where<br />

the<br />

ADI<br />

can<br />

be<br />

found,<br />

and<br />

what<br />

protocol<br />

must<br />

be<br />

used<br />

to<br />

communicate<br />

with<br />

the<br />

external<br />

provider<br />

of<br />

the<br />

ADI.<br />

The<br />

ADI,<br />

enclosed<br />

within<br />

opening<br />

and<br />

closing<br />

container<br />

name<br />

XML<br />

tags,<br />

is<br />

known<br />

as<br />

a<br />

container.<br />

The<br />

attribute<br />

retrieval<br />

service<br />

generates<br />

a<br />

client<br />

that<br />

uses<br />

the<br />

necessary<br />

protocol<br />

to<br />

retrieve<br />

the<br />

ADI<br />

from<br />

the<br />

external<br />

provider.<br />

If<br />

the<br />

ADI<br />

must<br />

be<br />

retrieved<br />

using<br />

a<br />

protocol<br />

that<br />

is<br />

not<br />

provided<br />

by<br />

the<br />

current<br />

release<br />

of<br />

the<br />

attribute<br />

retrieval<br />

service<br />

(included<br />

with<br />

<strong>Tivoli</strong><br />

<strong>Access</strong><br />

<strong>Manager</strong><br />

<strong>WebSEAL</strong>),<br />

then<br />

a<br />

custom<br />

protocol<br />

plug-in<br />

must<br />

be<br />

created.<br />

Creating<br />

the<br />

protocol<br />

plug-in<br />

Custom<br />

protocols<br />

are<br />

written<br />

as<br />

Java<br />

classes<br />

that<br />

extend<br />

the<br />

public<br />

class<br />

FixedProviderProtocol,<br />

and<br />

must<br />

implement<br />

the<br />

following<br />

three<br />

abstract<br />

methods:<br />

v<br />

public<br />

ProtocolInitStatus<br />

initialize()<br />

v<br />

public<br />

ProtocolRunStatus<br />

run()<br />

v<br />

public<br />

ProtocolShutdownStatus<br />

shutdown()<br />

The<br />

initialize()<br />

method<br />

is<br />

called<br />

once,<br />

to<br />

initialize<br />

the<br />

protocol<br />

during<br />

the<br />

execution<br />

of<br />

the<br />

″initialize″<br />

method<br />

of<br />

the<br />

attribute<br />

retrieval<br />

service.<br />

For<br />

example,<br />

this<br />

method<br />

can<br />

be<br />

responsible<br />

<strong>for</strong><br />

establishing<br />

a<br />

connection<br />

to<br />

a<br />

remote<br />

database<br />

or<br />

profiling<br />

service.<br />

The<br />

run()<br />

method<br />

is<br />

called<br />

(by<br />

the<br />

″getEntitlement″<br />

method<br />

of<br />

the<br />

attribute<br />

retrieval<br />

service)<br />

each<br />

time<br />

a<br />

request<br />

is<br />

made<br />

<strong>for</strong><br />

a<br />

container<br />

that<br />

must<br />

be<br />

retrieved<br />

by<br />

this<br />

protocol.<br />

This<br />

method<br />

must<br />

retrieve<br />

the<br />

requested<br />

container<br />

(or<br />

containers)<br />

specified<br />

by<br />

the<br />

_container_descriptors<br />

member<br />

variable<br />

of<br />

the<br />

client<br />

class’<br />

HashMap.<br />

This<br />

container<br />

can<br />

be<br />

obtained<br />

using<br />

the<br />

elements()<br />

method<br />

of<br />

the<br />

client<br />

class.<br />

The<br />

client<br />

class’<br />

addContainer()<br />

method<br />

is<br />

then<br />

used<br />

to<br />

add<br />

the<br />

retrieved<br />

container<br />

(or<br />

containers)<br />

to<br />

the<br />

client<br />

class’<br />

_session.<br />

How,<br />

and<br />

from<br />

where,<br />

the<br />

protocol<br />

acquires<br />

the<br />

container<br />

is<br />

specific<br />

to<br />

the<br />

individual<br />

protocol.<br />

The<br />

shutdown()<br />

method<br />

is<br />

called<br />

once<br />

to<br />

shutdown<br />

the<br />

protocol<br />

during<br />

the<br />

execution<br />

of<br />

the<br />

″shutdown″<br />

method<br />

of<br />

the<br />

attribute<br />

retrieval<br />

service.<br />

For<br />

example,<br />

this<br />

method<br />

can<br />

be<br />

responsible<br />

<strong>for</strong><br />

closing<br />

the<br />

connections<br />

to<br />

remote<br />

databases<br />

or<br />

profiling<br />

services<br />

that<br />

were<br />

opened<br />

during<br />

the<br />

″initialize″<br />

method<br />

.<br />

The<br />

following<br />

resources<br />

are<br />

available<br />

to<br />

assist<br />

in<br />

creating<br />

a<br />

custom<br />

protocol<br />

plug-in:<br />

v<br />

Attribute<br />

retrieval<br />

service<br />

class<br />

documentation<br />

/opt/pdwebars/amwebars_class_doc.zip<br />

v<br />

Example<br />

protocol<br />

plug-in<br />

modules<br />

(Java)<br />

Chapter<br />

14.<br />

Attribute<br />

retrieval<br />

service<br />

reference<br />

375

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!