com.taggercat.security
Interface SecurityProvider

All Known Implementing Classes:
DefaultSecurityProvider

public interface SecurityProvider

This is the interface that Tagger Cat Security providers must implement. A SecurityProvider provides a mechanism to authenticate users into the system and provides the list of groups the user is a member of.

The DefaultSecurityProvider reads this information from the Application's SQL system tables.

If you need to provide your own security mechanism, you must implement this interface, and register your ContextListener implementation in the application's deployment descriptor. See the administration documentation for more details.

 

Method Summary
 void authenticate(LoginInfo loginInfo, org.hibernate.Session session)
          Authenticates a user by looking up their user ID and password in some directory.
 void close()
          Called when the reporting server is shutting down, this is your opportunity to close any resource you have open.
 void init(javax.servlet.ServletContext servletContext)
          Initializes your object with servlet context.
 void setGroupMembershipNames(LoginInfo loginInfo, java.lang.String metadataCatalog, org.hibernate.Session session)
          Set a comma separated string of the group names this user belongs to.
 

Method Detail

authenticate

void authenticate(LoginInfo loginInfo,
                  org.hibernate.Session session)
                  throws java.lang.Exception
Authenticates a user by looking up their user ID and password in some directory. When this method is called, the loginInfo class will have the user's loginName, password, and host fields populated. If authentication is successful, set the login.authenticated = true otherwise, set the login.deniedReason string to something meaningful.

Throws:
java.lang.Exception
Parameters:
loginInfo - the user's login information

close

void close()
Called when the reporting server is shutting down, this is your opportunity to close any resource you have open.


init

void init(javax.servlet.ServletContext servletContext)
          throws java.lang.SecurityException
Initializes your object with servlet context. If you fail to initialize your server connection, then throw a SecurityException and the Reporting Server will not be started.

Throws:
java.lang.SecurityException
Parameters:
servletContext - the servlet context

setGroupMembershipNames

void setGroupMembershipNames(LoginInfo loginInfo,
                             java.lang.String metadataCatalog,
                             org.hibernate.Session session)
Set a comma separated string of the group names this user belongs to. The group names returned from the directory server should correspond to the names in the Application's USER_GROUPS_V view

Parameters:
loginInfo - User information
metadataCatalog - the name of the database catalog for the meta data
session - the hibernate session to use