Apache Tomcat 7.0.37

org.apache.catalina.security
Class SecurityListener

java.lang.Object
  extended by org.apache.catalina.security.SecurityListener
All Implemented Interfaces:
LifecycleListener

public class SecurityListener
extends Object
implements LifecycleListener


Constructor Summary
SecurityListener()
           
 
Method Summary
protected  void checkOsUser()
           
protected  void checkUmask()
           
protected  void doChecks()
          Execute the security checks.
 String getCheckedOsUsers()
          Returns the current list of operating system users not permitted to run Tomcat.
 String getMinimumUmask()
          Get the minimum umask that must be configured before Tomcat will start.
 void lifecycleEvent(LifecycleEvent event)
          Acknowledge the occurrence of the specified event.
 void setCheckedOsUsers(String userNameList)
          Set the list of operating system users not permitted to run Tomcat.
 void setMinimumUmask(String umask)
          Set the minimum umask that must be configured before Tomcat will start.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecurityListener

public SecurityListener()
Method Detail

lifecycleEvent

public void lifecycleEvent(LifecycleEvent event)
Description copied from interface: LifecycleListener
Acknowledge the occurrence of the specified event.

Specified by:
lifecycleEvent in interface LifecycleListener
Parameters:
event - LifecycleEvent that has occurred

setCheckedOsUsers

public void setCheckedOsUsers(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.

Parameters:
userNameList - A comma separated list of operating system users not permitted to run Tomcat

getCheckedOsUsers

public String getCheckedOsUsers()
Returns the current list of operating system users not permitted to run Tomcat.

Returns:
A comma separated list of operating sytem user names.

setMinimumUmask

public void setMinimumUmask(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

getMinimumUmask

public 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

doChecks

protected void doChecks()
Execute the security checks. Each check should be in a separate method.


checkOsUser

protected void checkOsUser()

checkUmask

protected void checkUmask()

Apache Tomcat 7.0.37

Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.