public class AltProtocolHandler extends Object implements org.apache.coyote.ProtocolHandler, DebugLevel.Debuggable
This protocol handler wrapper allow to capture the passwords that would be sent by the client BEFORE they are processed as Strings ; after capturing, the raw data are replaced with '*'. The captured passwords are wrapped in an encrypted form and are available to the user by the classes of the package ml.alternet.security.web.
The configuration of the wrapped protocol handler remains the same, except for the "protocol" attribute that have to be set to this class name. Additional attributes are "tomcatProtocol" (with the replaced value of the "protocol" attribute), "passwordManager" (by default, it is the strong password manager), and "allowUnsecureTrace" (false by default).
<Connector port="8080"
tomcatProtocol="HTTP/1.1"
protocol="ml.alternet.security.web.tomcat.EnhancedProtocolHandler"
passwordManager="ml.alternet.security.impl.StrongPasswordManager"
allowUnsecureTrace="false"
connectionTimeout="20000"
redirectPort="8443" />
| Constructor and Description |
|---|
AltProtocolHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
org.apache.coyote.Adapter |
getAdapter() |
DebugLevel |
getDebugLevel() |
Executor |
getExecutor() |
PasswordManager |
getPasswordManager()
Get the password manager.
|
void |
init() |
boolean |
isAprRequired() |
boolean |
isCometSupported() |
boolean |
isCometTimeoutSupported() |
boolean |
isSendfileSupported() |
void |
pause() |
void |
resume() |
void |
setAdapter(org.apache.coyote.Adapter adapter) |
void |
setAllowUnsecureTrace(String value)
Allow unsecure trace (
false by default). |
void |
setPasswordManager(String passwordManager)
Set a password manager from its class name.
|
boolean |
setProperty(String name,
String value)
Set a configured property.
|
void |
start() |
void |
stop() |
public DebugLevel getDebugLevel()
getDebugLevel in interface DebugLevel.Debuggablepublic void setPasswordManager(String passwordManager)
passwordManager - The name of the password manager.PasswordManagerpublic PasswordManager getPasswordManager()
public void setAllowUnsecureTrace(String value)
false by default).
DO NOT ALLOW UNSECURE TRACE IN PRODUCTION ENVIRONMENT.value - true to allow unsecure trace,
false to disallow unsecure trace.public boolean setProperty(String name, String value)
name - The name of the property.value - The value of the property.true the more often.public void setAdapter(org.apache.coyote.Adapter adapter)
setAdapter in interface org.apache.coyote.ProtocolHandlerpublic org.apache.coyote.Adapter getAdapter()
getAdapter in interface org.apache.coyote.ProtocolHandlerpublic Executor getExecutor()
getExecutor in interface org.apache.coyote.ProtocolHandlerpublic void init()
throws Exception
init in interface org.apache.coyote.ProtocolHandlerExceptionpublic void start()
throws Exception
start in interface org.apache.coyote.ProtocolHandlerExceptionpublic void pause()
throws Exception
pause in interface org.apache.coyote.ProtocolHandlerExceptionpublic void resume()
throws Exception
resume in interface org.apache.coyote.ProtocolHandlerExceptionpublic void stop()
throws Exception
stop in interface org.apache.coyote.ProtocolHandlerExceptionpublic void destroy()
throws Exception
destroy in interface org.apache.coyote.ProtocolHandlerExceptionpublic boolean isAprRequired()
isAprRequired in interface org.apache.coyote.ProtocolHandlerpublic boolean isCometSupported()
isCometSupported in interface org.apache.coyote.ProtocolHandlerpublic boolean isCometTimeoutSupported()
isCometTimeoutSupported in interface org.apache.coyote.ProtocolHandlerpublic boolean isSendfileSupported()
isSendfileSupported in interface org.apache.coyote.ProtocolHandlerCopyright © 2018 Alternet. All rights reserved.