|
||||||||||
PREV CLASS NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.catalina.authenticator.SingleSignOn
org.jboss.web.tomcat.tc5.sso.ClusteredSingleSignOn
A Valve that supports a "single sign on" user experience, where the security identity of a user who successfully authenticates to one web application is propogated to other web applications in the same security domain. For successful use, the following requirements must be met:
Host
).Realm
that contains the shared user and role
information must be configured on the same Container (or a higher
one), and not overridden at the web application level.org.apache.catalina.authenticator
package.
Constructor Summary | |
ClusteredSingleSignOn()
|
Method Summary | |
protected void |
associate(java.lang.String ssoId,
Session session)
Associate the specified single sign on identifier with the specified Session. |
protected void |
deregister(java.lang.String ssoId)
Deregister the specified single sign on identifier, and invalidate any associated sessions. |
protected void |
deregister(java.lang.String ssoId,
Session session)
Deregister the specified session. |
SSOClusterManager (src) |
getClusterManager()
Gets the object that provides SSO support across a cluster. |
java.lang.String |
getClusterManagerClass()
Gets the name of the class that will be used to provide SSO support across a cluster. |
protected org.jboss.web.tomcat.tc5.sso.SingleSignOnEntry |
getSingleSignOnEntry(java.lang.String ssoId)
Look up and return the cached SingleSignOn entry associated with this sso id value, if there is one; otherwise return null . |
java.lang.String |
getTreeCacheName()
Object name of the tree cache used by SSOClusterManager. |
void |
invoke(Request request,
Response response)
Perform single-sign-on support processing for this request. |
protected void |
logout(java.lang.String ssoId)
Deregister the given SSO, invalidating any associated sessions, then notify any cluster of the logout. |
protected boolean |
reauthenticate(java.lang.String ssoId,
Realm realm,
Request request)
Attempts reauthentication to the given Realm using
the credentials associated with the single sign-on session
identified by argument ssoId . |
protected void |
register(java.lang.String ssoId,
java.security.Principal principal,
java.lang.String authType,
java.lang.String username,
java.lang.String password)
Register the specified Principal as being associated with the specified value for the single sign on identifier. |
protected void |
removeSession(java.lang.String ssoId,
Session session)
Remove a single Session from a SingleSignOn. |
void |
sessionEvent(SessionEvent event)
Updates the state of a single sign on session to reflect the destruction of a standard HTTP session. |
void |
setClusterManager(SSOClusterManager (src) clusterManager)
Sets the object that provides SSO support across a cluster. |
void |
setClusterManagerClass(java.lang.String managerClass)
Sets the name of the class that will be used to provide SSO support across a cluster. |
void |
setTreeCacheName(java.lang.String cacheName)
Sets the object name of the tree cache used by SSOClusterManager. |
void |
start()
Prepare for the beginning of active use of the public methods of this component. |
void |
stop()
Gracefully terminate the active use of the public methods of this component. |
protected void |
update(java.lang.String ssoId,
java.security.Principal principal,
java.lang.String authType,
java.lang.String username,
java.lang.String password)
Updates any SingleSignOnEntry found under key
ssoId with the given authentication data. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ClusteredSingleSignOn()
Method Detail |
public SSOClusterManager (src) getClusterManager()
null
if
no such object has been configured.public void setClusterManager(SSOClusterManager (src) clusterManager)
clusterManager
- the object that provides SSO support.
java.lang.IllegalStateException
- if this method is invoked after this valve
has been started.public java.lang.String getClusterManagerClass()
SSOClusterManager
(src)
that is being used to manage SSOs across a cluster.
May return null
(the default) if clustered
SSO support is not configured.public void setClusterManagerClass(java.lang.String managerClass)
NOTE: If this Valve has already started, and no SSOClusterManager has been configured for it, calling this method will
managerClass
- Fully qualified name of a class implementing
SSOClusterManager
(src)
that will be used to manage SSOs across a cluster.
Class must declare a public no-arguments
constructor. null
is allowed.public java.lang.String getTreeCacheName()
public void setTreeCacheName(java.lang.String cacheName) throws java.lang.Exception
java.lang.Exception
public void start() throws LifecycleException
configure()
,
and before any of the public methods of the component are utilized.
LifecycleException
- if this component detects a fatal error
that prevents this component from being usedpublic void stop() throws LifecycleException
LifecycleException
- if this component detects a fatal error
that needs to be reportedpublic void sessionEvent(SessionEvent event)
Session destroyed event
, checks whether the session was destroyed due
to timeout or user action (i.e. logout). If due to timeout, disassociates
the Session from the single sign on session. If due to logout, invokes
the logout(java.lang.String)
method.
event
- SessionEvent that has occurredpublic void invoke(Request request, Response response) throws java.io.IOException, ServletException
Principal
object associated with it
on this node.
request
- The servlet request we are processingresponse
- The servlet response we are creating
java.io.IOException
- if an input/output error occurs
ServletException
- if a servlet error occursprotected void associate(java.lang.String ssoId, Session session)
ssoId
- Single sign on identifiersession
- Session to be associatedprotected void deregister(java.lang.String ssoId, Session session)
ssoId
- Single sign on identifiersession
- Session to be deregisteredprotected void deregister(java.lang.String ssoId)
ssoId
- Single sign on identifier to deregisterprotected void logout(java.lang.String ssoId)
ssoId
- the id of the SSO sessionprotected org.jboss.web.tomcat.tc5.sso.SingleSignOnEntry getSingleSignOnEntry(java.lang.String ssoId)
null
.
ssoId
- Single sign on identifier to look upprotected boolean reauthenticate(java.lang.String ssoId, Realm realm, Request request)
Realm
using
the credentials associated with the single sign-on session
identified by argument ssoId
.
If reauthentication is successful, the Principal
and
authorization type associated with the SSO session will be bound
to the given HttpRequest
object via calls to
HttpRequest.setAuthType()
and
HttpRequest.setUserPrincipal()
ssoId
- identifier of SingleSignOn session with which the
caller is associatedrealm
- Realm implementation against which the caller is to
be authenticatedrequest
- the request that needs to be authenticated
true
if reauthentication was successful,
false
otherwise.protected void register(java.lang.String ssoId, java.security.Principal principal, java.lang.String authType, java.lang.String username, java.lang.String password)
ssoId
- Single sign on identifier to registerprincipal
- Associated user principal that is identifiedauthType
- Authentication type used to authenticate this
user principalusername
- Username used to authenticate this userpassword
- Password used to authenticate this userprotected void removeSession(java.lang.String ssoId, Session session)
ssoId
- Single sign on identifier from which to remove the session.session
- the session to be removed.protected void update(java.lang.String ssoId, java.security.Principal principal, java.lang.String authType, java.lang.String username, java.lang.String password)
SingleSignOnEntry
found under key
ssoId
with the given authentication data.
The purpose of this method is to allow an SSO entry that was
established without a username/password combination (i.e. established
following DIGEST or CLIENT-CERT authentication) to be updated with
a username and password if one becomes available through a subsequent
BASIC or FORM authentication. The SSO entry will then be usable for
reauthentication.
NOTE: Only updates the SSO entry if a call to
SingleSignOnEntry.getCanReauthenticate()
returns
false
; otherwise, it is assumed that the SSO entry already
has sufficient information to allow reauthentication and that no update
is needed.
Differs from the superclass version in that it notifies the cluster
of any update.
ssoId
- identifier of Single sign to be updatedprincipal
- the Principal
returned by the latest
call to Realm.authenticate
.authType
- the type of authenticator used (BASIC, CLIENT-CERT,
DIGEST or FORM)username
- the username (if any) used for the authenticationpassword
- the password (if any) used for the authentication
|
||||||||||
PREV CLASS NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |