Package org.apache.catalina.security
Class SecurityListener
- java.lang.Object
- 
- org.apache.catalina.security.SecurityListener
 
- 
- All Implemented Interfaces:
- LifecycleListener
 
 public class SecurityListener extends java.lang.Object implements LifecycleListener This listener must only be nested withinServerelements.
- 
- 
Constructor SummaryConstructors Constructor Description SecurityListener()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckOsUser()protected voidcheckUmask()protected voiddoChecks()Execute the security checks.java.lang.StringgetCheckedOsUsers()Returns the current list of operating system users not permitted to run Tomcat.java.lang.StringgetMinimumUmask()Get the minimum umask that must be configured before Tomcat will start.voidlifecycleEvent(LifecycleEvent event)Acknowledge the occurrence of the specified event.voidsetCheckedOsUsers(java.lang.String userNameList)Set the list of operating system users not permitted to run Tomcat.voidsetMinimumUmask(java.lang.String umask)Set the minimum umask that must be configured before Tomcat will start.
 
- 
- 
- 
Method Detail- 
lifecycleEventpublic void lifecycleEvent(LifecycleEvent event) Description copied from interface:LifecycleListenerAcknowledge the occurrence of the specified event.- Specified by:
- lifecycleEventin interface- LifecycleListener
- Parameters:
- event- LifecycleEvent that has occurred
 
 - 
setCheckedOsUserspublic void setCheckedOsUsers(java.lang.String userNameList) Set the list of operating system users not permitted to run Tomcat. By default, only root is prevented from running Tomcat. Calling this method with null or the empty string will clear the list of users and effectively disables this check. User names will always be checked in a case insensitive manner using the system default Locale.- Parameters:
- userNameList- A comma separated list of operating system users not permitted to run Tomcat
 
 - 
getCheckedOsUserspublic java.lang.String getCheckedOsUsers() Returns the current list of operating system users not permitted to run Tomcat.- Returns:
- A comma separated list of operating system user names.
 
 - 
setMinimumUmaskpublic void setMinimumUmask(java.lang.String umask) Set the minimum umask that must be configured before Tomcat will start.- Parameters:
- umask- The 4-digit umask as returned by the OS command umask
 
 - 
getMinimumUmaskpublic java.lang.String getMinimumUmask() Get the minimum umask that must be configured before Tomcat will start.- Returns:
- The 4-digit umask as used by the OS command umask
 
 - 
doChecksprotected void doChecks() Execute the security checks. Each check should be in a separate method.
 - 
checkOsUserprotected void checkOsUser() 
 - 
checkUmaskprotected void checkUmask() 
 
- 
 
-