|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectatg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.nucleus.TimedOperationService
atg.servlet.pipeline.PipelineableServletImpl
atg.userprofiling.AccessControlServlet
public class AccessControlServlet
This pipeline servlet performs access control for a set of request URL paths, based on the Profile object associated with the request. The servlet is configured with a set of URL-to-AccessController mappings; if the URL being accessed is "guarded" by one of the AccessControllers, the request's Profile object is passed to the AccessController, which decides whether or not access should be allowed. If access is allowed, the request is passed on; if access is denied, the user is redirected to a specified deniedAccessURL.
This servlet comes with a list of AccessAllowedListeners and a list of AccessDeniedListeners, to allow logging or other functions to be performed when access is granted or denied.
AccessController
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
static java.lang.String |
NO_ACCESS_CONTROLLER
Indicates the absence of an access controller in the path cache |
Fields inherited from class atg.nucleus.GenericService |
---|
SERVICE_INFO_KEY |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
---|
DEFAULT_LOG_TRACE_STATUS |
Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
Constructor Summary | |
---|---|
AccessControlServlet()
|
Method Summary | |
---|---|
void |
addAccessAllowedListener(AccessAllowedListener pListener)
Adds a listener to the list of "access allowed" listeners. |
void |
addAccessDeniedListener(AccessDeniedListener pListener)
Adds a listener to the list of "access denied" listeners. |
void |
doStartService()
Called after the service has been created, placed into the naming hierarchy, and initialized with its configured property values. |
int |
getAccessAllowedListenerCount()
Returns the number of "access allowed" listeners. |
AccessAllowedListener[] |
getAccessAllowedListeners()
Returns the array of "access allowed" listeners. |
AccessController |
getAccessController(atg.userprofiling.AccessControlServlet.ControllerArrayMember[] pControllerArray,
java.lang.String pRequestPath)
Returns the AccessController which should be used to perform access control for the given path. |
AccessController |
getAccessController(java.lang.String pRequestPath)
Returns the AccessController which should be used to perform access control for the given path. |
ServiceMap |
getAccessControllers()
Returns the AccessControllers used to control access to paths. |
int |
getAccessDeniedListenerCount()
Returns the number of "access denied" listeners. |
AccessDeniedListener[] |
getAccessDeniedListeners()
Returns the array of "access denied" listeners. |
boolean |
getCacheResults()
Do we cache results when looking up AccessControllers? |
java.lang.String |
getDeniedAccessURL()
Returns the default URL to redirect to if access is denied. |
boolean |
getIgnoreCaseInPath()
Returns true if the case should be ignored when the path info is compared to an access controlled path, false otherwise. |
java.lang.String |
getProfilePath()
Gets the Nucleus path of the Profile object. |
atg.servlet.VirtualContextRootService |
getVirtualContextRootService()
Gets the VirtualContextRootService |
boolean |
isEnabled()
Is access control enabled? |
boolean |
isUseContextPath()
Get property UseContextPath |
void |
removeAccessAllowedListener(AccessAllowedListener pListener)
Removes a listener from the list of "access allowed" listeners. |
void |
removeAccessDeniedListener(AccessDeniedListener pListener)
Removes a listener from the list of "access denied" listeners. |
void |
sendAccessAllowedEvent(AccessAllowedEvent pEvent)
Sends an "access allowed" event to all the "access allowed" listeners. |
void |
sendAccessDeniedEvent(AccessDeniedEvent pEvent)
Sends an "access denied" event to all the "access denied" listeners. |
void |
service(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Services a DynamoHttpServletRequest/Response pair. |
void |
setAccessControllers(ServiceMap pAccessControllers)
Sets the AccessControllers used to control access to paths. |
void |
setCacheResults(boolean pCacheResults)
Sets whether to cache results when looking up AccessControllers. |
void |
setDeniedAccessURL(java.lang.String pDeniedAccessURL)
Sets the default URL to redirect to if access is denied. |
void |
setEnabled(boolean pEnabled)
Sets whether or not access control is enabled. |
void |
setIgnoreCaseInPath(boolean pIgnoreCaseInPath)
Sets the flag indicating whether case should be ignored when the path info is compared to an access controlled path. |
void |
setProfilePath(java.lang.String pProfilePath)
Sets the Nucleus path of the Profile object. |
void |
setUseContextPath(boolean pUseContextPath)
Set property UseContextPath |
void |
setVirtualContextRootService(atg.servlet.VirtualContextRootService pVirtualContextRootService)
Sets the VirtualContextRootService |
Methods inherited from class atg.servlet.pipeline.PipelineableServletImpl |
---|
createAdminServlet, destroy, getAdminServlet, getNextServlet, getServletConfig, getServletInfo, init, isUsePathInfo, passRequest, passRequest, service, service, setNextServlet, setServletInfo, setUsePathInfo |
Methods inherited from class atg.nucleus.TimedOperationService |
---|
getAverageRequestHandlingTime, getHandledRequestCount, getRequestStartTime, getTotalRequestHandlingTime, isKeepingStatistics, notifyHandledRequest, resetStatistics, setKeepingStatistics |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
public static final java.lang.String NO_ACCESS_CONTROLLER
Constructor Detail |
---|
public AccessControlServlet()
Method Detail |
---|
public void setUseContextPath(boolean pUseContextPath)
UseContextPath
pUseContextPath
- if true, use the request's context path
as part of the access control path. Default is truepublic boolean isUseContextPath()
UseContextPath
public boolean isEnabled()
public void setEnabled(boolean pEnabled)
public boolean getCacheResults()
public void setCacheResults(boolean pCacheResults)
public java.lang.String getProfilePath()
public void setProfilePath(java.lang.String pProfilePath)
public ServiceMap getAccessControllers()
public void setAccessControllers(ServiceMap pAccessControllers)
public atg.servlet.VirtualContextRootService getVirtualContextRootService()
public void setVirtualContextRootService(atg.servlet.VirtualContextRootService pVirtualContextRootService)
public AccessController getAccessController(java.lang.String pRequestPath)
public AccessController getAccessController(atg.userprofiling.AccessControlServlet.ControllerArrayMember[] pControllerArray, java.lang.String pRequestPath)
pControllerArray
- array of ControllerArrayMemberpRequestPath
- request path
public boolean getIgnoreCaseInPath()
public void setIgnoreCaseInPath(boolean pIgnoreCaseInPath)
public void addAccessAllowedListener(AccessAllowedListener pListener)
public void removeAccessAllowedListener(AccessAllowedListener pListener)
public AccessAllowedListener[] getAccessAllowedListeners()
public int getAccessAllowedListenerCount()
public void sendAccessAllowedEvent(AccessAllowedEvent pEvent)
public void addAccessDeniedListener(AccessDeniedListener pListener)
public void removeAccessDeniedListener(AccessDeniedListener pListener)
public AccessDeniedListener[] getAccessDeniedListeners()
public int getAccessDeniedListenerCount()
public void sendAccessDeniedEvent(AccessDeniedEvent pEvent)
public java.lang.String getDeniedAccessURL()
public void setDeniedAccessURL(java.lang.String pDeniedAccessURL)
public void service(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws java.io.IOException, javax.servlet.ServletException
service
in class PipelineableServletImpl
javax.servlet.ServletException
- if an error occurred while
processing the servlet request
java.io.IOException
- if an error occurred while reading or
writing the servlet requestpublic void doStartService() throws ServiceException
doStartService
in class GenericService
ServiceException
- if the service had a problem
starting up
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |