|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mortbay.component.AbstractLifeCycle org.mortbay.jetty.AbstractBuffers org.mortbay.jetty.AbstractConnector org.mortbay.jetty.nio.AbstractNIOConnector org.mortbay.jetty.nio.SelectChannelConnector gate.cow.jetty.SecureProxyConnector
public class SecureProxyConnector
Simple custom Jetty connector that speaks the normal HTTP protocol but
pretends to be secure. It returns true from isConfidential(org.mortbay.jetty.Request)
and
isIntegral(org.mortbay.jetty.Request)
and customizes the request to believe it is an HTTPS
request. This connector is useful when you are running CoW behind an Apache
proxy that handles HTTPS requests and thus don't want to have to handle
encryption within CoW, but you still want to be able to use the web.xml
security-constraint mechanism to redirect requests to the secure port where
necessary.
For such a scenario your Apache server would need to be set up to ProxyPass
HTTP requests to the normal Grails port and HTTPS requests to the port on
which this SecureProxyConnector is listening. The server.port.https system
property should be set to the port on which the Apache HTTPS server
is listening (typically 443), not the port on which this
SecureProxyConnector is listening.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.mortbay.jetty.nio.SelectChannelConnector |
---|
org.mortbay.jetty.nio.SelectChannelConnector.ConnectorEndPoint, org.mortbay.jetty.nio.SelectChannelConnector.RetryContinuation |
Nested classes/interfaces inherited from interface org.mortbay.component.LifeCycle |
---|
org.mortbay.component.LifeCycle.Listener |
Field Summary |
---|
Fields inherited from class org.mortbay.jetty.AbstractConnector |
---|
_lowResourceMaxIdleTime, _maxIdleTime, _soLingerTime |
Fields inherited from class org.mortbay.jetty.AbstractBuffers |
---|
_loss |
Fields inherited from class org.mortbay.component.AbstractLifeCycle |
---|
_listeners |
Constructor Summary | |
---|---|
SecureProxyConnector(int port)
Create a SecureProxyConnector listening on the given port. |
Method Summary | |
---|---|
void |
customize(org.mortbay.io.EndPoint ep,
org.mortbay.jetty.Request r)
Tell the request that it is being served over https. |
boolean |
isConfidential(org.mortbay.jetty.Request r)
We are confidential. |
boolean |
isIntegral(org.mortbay.jetty.Request r)
We are integral. |
Methods inherited from class org.mortbay.jetty.nio.SelectChannelConnector |
---|
accept, close, doStart, doStop, getConnection, getDelaySelectKeyUpdate, getLocalPort, getLowResourcesConnections, getLowResourcesMaxIdleTime, newConnection, newContinuation, newEndPoint, open, persist, setDelaySelectKeyUpdate, setLowResourceMaxIdleTime, setLowResourcesConnections, setLowResourcesMaxIdleTime, setMaxIdleTime |
Methods inherited from class org.mortbay.jetty.nio.AbstractNIOConnector |
---|
getUseDirectBuffers, newBuffer, setUseDirectBuffers |
Methods inherited from class org.mortbay.jetty.AbstractConnector |
---|
checkForwardedHeaders, configure, connectionClosed, connectionOpened, getAcceptorPriorityOffset, getAcceptors, getAcceptQueueSize, getConfidentialPort, getConfidentialScheme, getConnections, getConnectionsDurationAve, getConnectionsDurationMax, getConnectionsDurationMin, getConnectionsDurationTotal, getConnectionsOpen, getConnectionsOpenMax, getConnectionsOpenMin, getConnectionsRequestsAve, getConnectionsRequestsMax, getConnectionsRequestsMin, getForwardedForHeader, getForwardedHostHeader, getForwardedServerHeader, getHost, getHostHeader, getIntegralPort, getIntegralScheme, getLeftMostValue, getLowResourceMaxIdleTime, getMaxIdleTime, getName, getPort, getRequests, getResolveNames, getReuseAddress, getServer, getSoLingerTime, getStatsOn, getStatsOnMs, getThreadPool, isForwarded, join, setAcceptorPriorityOffset, setAcceptors, setAcceptQueueSize, setConfidentialPort, setConfidentialScheme, setForwarded, setForwardedForHeader, setForwardedHostHeader, setForwardedServerHeader, setHost, setHostHeader, setIntegralPort, setIntegralScheme, setName, setPort, setResolveNames, setReuseAddress, setServer, setSoLingerTime, setStatsOn, setThreadPool, statsReset, stopAccept, toString |
Methods inherited from class org.mortbay.jetty.AbstractBuffers |
---|
getBuffer, getHeaderBufferSize, getRequestBufferSize, getResponseBufferSize, returnBuffer, setHeaderBufferSize, setRequestBufferSize, setResponseBufferSize |
Methods inherited from class org.mortbay.component.AbstractLifeCycle |
---|
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.mortbay.jetty.Connector |
---|
getHeaderBufferSize, getRequestBufferSize, getResponseBufferSize, setHeaderBufferSize, setRequestBufferSize, setResponseBufferSize |
Methods inherited from interface org.mortbay.component.LifeCycle |
---|
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop |
Methods inherited from interface org.mortbay.io.Buffers |
---|
getBuffer, returnBuffer |
Constructor Detail |
---|
public SecureProxyConnector(int port)
Method Detail |
---|
public void customize(org.mortbay.io.EndPoint ep, org.mortbay.jetty.Request r) throws IOException
customize
in interface org.mortbay.jetty.Connector
customize
in class org.mortbay.jetty.nio.SelectChannelConnector
IOException
public boolean isConfidential(org.mortbay.jetty.Request r)
isConfidential
in interface org.mortbay.jetty.Connector
isConfidential
in class org.mortbay.jetty.AbstractConnector
public boolean isIntegral(org.mortbay.jetty.Request r)
isIntegral
in interface org.mortbay.jetty.Connector
isIntegral
in class org.mortbay.jetty.AbstractConnector
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |