public class StaticDecisionForwardingFilter extends AbstractLoggingBean implements ForwardingFilter
ForwardingFilter
implementation that returns the same "static" result for all the queries.TcpForwardingFilter.Type
log
DEFAULT
DEFAULT
DEFAULT
Constructor and Description |
---|
StaticDecisionForwardingFilter(boolean acceptance) |
Modifier and Type | Method and Description |
---|---|
boolean |
canConnect(TcpForwardingFilter.Type type,
SshdSocketAddress address,
Session session)
Determine if the session may create an outbound connection.
|
boolean |
canForwardAgent(Session session,
String requestType)
Determine if the session may arrange for agent forwarding.
|
boolean |
canForwardX11(Session session,
String requestType)
Determine if the session may arrange for X11 forwarding.
|
boolean |
canListen(SshdSocketAddress address,
Session session)
Determine if the session may listen for inbound connections.
|
protected boolean |
checkAcceptance(String request,
Session session,
SshdSocketAddress target) |
boolean |
isAccepted() |
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warn
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
asForwardingFilter
of
of
public StaticDecisionForwardingFilter(boolean acceptance)
acceptance
- The acceptance status for all the queriespublic final boolean isAccepted()
public boolean canForwardAgent(Session session, String requestType)
AgentForwardingFilter
Determine if the session may arrange for agent forwarding.
This server process will open a new listen socket locally and export the address in the
SshAgent.SSH_AUTHSOCKET_ENV_NAME
environment variable.
canForwardAgent
in interface AgentForwardingFilter
session
- The Session
requesting permission to forward the agent.requestType
- The request type string that triggered this callpublic boolean canForwardX11(Session session, String requestType)
X11ForwardingFilter
Determine if the session may arrange for X11 forwarding.
This server process will open a new listen socket locally and export the address in the environment so X11 clients can be tunneled to the user's X11 display server.
canForwardX11
in interface X11ForwardingFilter
session
- The Session
requesting permission to forward X11 connections.requestType
- The request type string that triggered this callpublic boolean canListen(SshdSocketAddress address, Session session)
TcpForwardingFilter
Determine if the session may listen for inbound connections.
This server process will open a new listen socket on the address given by the client (usually 127.0.0.1 but may be any address). Any inbound connections to this socket will be tunneled over the session to the client, which the client will then forward the connection to another host on the client's side of the network.
canListen
in interface TcpForwardingFilter
address
- address the client has requested this server listen for inbound connections on, and relay them
through the client.session
- The Session
requesting permission to listen for connections.public boolean canConnect(TcpForwardingFilter.Type type, SshdSocketAddress address, Session session)
TcpForwardingFilter
Determine if the session may create an outbound connection.
This server process will connect to another server listening on the address specified by the client. Usually this is to another port on the same host (127.0.0.1) but may be to any other system this server can reach on the server's side of the network.
canConnect
in interface TcpForwardingFilter
type
- The TcpForwardingFilter.Type
of requested connection forwardingaddress
- address the client has requested this server listen for inbound connections on, and relay them
through the client.session
- session requesting permission to listen for connections.protected boolean checkAcceptance(String request, Session session, SshdSocketAddress target)
request
- The SSH request that ultimately led to this filter being consultedsession
- The requesting Session
target
- The request target - may be SshdSocketAddress.LOCALHOST_ADDRESS
if no real targetisAccepted()
flagCopyright © 2008–2024 The Apache Software Foundation. All rights reserved.