|
![]() |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sampleApplications.CSSSampleAlgoImplementation
This class demonstrates the implementation of the algorithm for authenticating a user using the security platform in an environment where the resources are protected by a Security Agent.
The Security Agent could be Netegrity SiteMinder.
The algorithm is detailed below (in pseudo code):
Variable Definitions: 1. HeadersThatHoldTheLoginName[] => this is an array containing the names of the headers - one entry of which should be present in the HTTP request in order to extract its value (the login name). The login name is then used to perform single sign-on from a Security Agent into a Hyperion Application. The Hyperion Application must have an HTTP interface in order for single sign-on to succeed. Each entry in the array contains the name of the header that could carry the the login name. The reason for having more than one header is to account for the differences in representing HTTP Request headers in Web servers. For instance: a header HTTP_HYPERION_ABC_DEF in IIS would appear as hyperion-abc-def in Tomcat. 2. LoginNameFromHeader => holds the value of the login name from the header whose name is specified by an entry in "HeaderThatHoldsTheLoginName" 3. HTTPRequest => this specifies the wrapper for the HTTP Request object. This holds the HTTP request headers. 4. CSSToken => holds the token that has been passed to the Hyperion Application for single sign-on. This is per the token-passing specifications. 5. CSSAPI => the reference to the security platform API. 6. Context => the Map argument containing name-value pairs for the authenticate method. 7. LoginName => the login name of the user that is entered on the login page. 8. Password => the password entered by the user on the login page. begin() { HeadersThatHoldTheLoginName[] = null; LoginNameFromHeader = null; // Gets the HTTP Request from the container. HTTPRequest = getHTTPRequest(); CSSToken = null; CSSAPI = null; Context = null; CSSAPI = getCSSAPI(); Context = createContext(locale); CSSAPI.initialize(context); if (CSSAPI.isSecurityAgentEnabled() ) { // get the array of entries where each entry specifies a header name // that is used by the Security Agent to populate the login name of the user. HeadersThatHoldTheLoginName = CSSAPI.getHeaderNamesFromSecurityAgent(context); // get the login name from the header in the HTTP Request LoginNameFromHeader = getFromHTTPHeaders(HTTPRequest, HeadersThatHoldTheLoginName); if (LoginNameFromHeader != null) addToContext(Context, "SECURITY_AGENT_LOGIN_NAME", LoginNameFromHeader); } if (LoginNameFromHeader == null) { // this implies that the security platform is not configured for Web Security Agent or // that the security platform is configured but the header is not present. CSSToken = getTokenFromHTTPRequest(); if (CSSToken == null) { popUpDialog(LoginName, Password); AddToContext(Context, "LOGIN_NAME", LoginName); AddToContext(Context, "PASSSORD", password) } else { // the token is added to the context. AddToContext(Context, "TOKEN", CSSToken) } } CSSUser = CSSAPI.authenticate(Context); }
This algorithm specifies the integration with a Security Agent.
CSSSampleAlgoImplementation is a sample implementation of the algorithm that is implemented in the web-tier by security platform clients. Please note that this is a sample implementation intended only to help you understand the implementation of the algorithm. It is not intended to be used as commercial-quality code.
Constructor Summary | |
CSSSampleAlgoImplementation()
|
Method Summary | |
static void |
main(java.lang.String[] args)
Main part of the program. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CSSSampleAlgoImplementation()
Method Detail |
public static void main(java.lang.String[] args)
|
Copyright 2004 Hyperion Solutions Corporation. All rights reserved. |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |