com.maverick.sshd
Class ForwardingPolicy

java.lang.Object
  extended by com.maverick.sshd.Permissions
      extended by com.maverick.sshd.ForwardingPolicy

public class ForwardingPolicy
extends Permissions


Field Summary
static int ALLOW_FORWARDING
           
static int GATEWAY_FORWARDING
           
 
Fields inherited from class com.maverick.sshd.Permissions
permissions
 
Constructor Summary
ForwardingPolicy()
           
 
Method Summary
 void allowGatewayForwarding()
           
 boolean checkHostPermitted(String host, int port)
          Check the host of the forwarding is permitted under this policy.
 boolean checkInterfacePermitted(String originHost, int originPort)
          Check that the source of the forwarding is permitted under this policy.
 void denyGatewayForwarding()
           
 void grantForwarding(String host)
          Grant access to a specific host.
 void revokeForwarding(String host)
          Revoke access from a specific host.
 
Methods inherited from class com.maverick.sshd.Permissions
add, check, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALLOW_FORWARDING

public static final int ALLOW_FORWARDING
See Also:
Constant Field Values

GATEWAY_FORWARDING

public static final int GATEWAY_FORWARDING
See Also:
Constant Field Values
Constructor Detail

ForwardingPolicy

public ForwardingPolicy()
Method Detail

allowGatewayForwarding

public void allowGatewayForwarding()

denyGatewayForwarding

public void denyGatewayForwarding()

grantForwarding

public void grantForwarding(String host)
Grant access to a specific host.

Parameters:
host -
port -

revokeForwarding

public void revokeForwarding(String host)
Revoke access from a specific host.

Parameters:
host -

checkInterfacePermitted

public boolean checkInterfacePermitted(String originHost,
                                       int originPort)
Check that the source of the forwarding is permitted under this policy. For remote forwarding the source is the network interface on the server that is listening for connections. For local forwarding it is the original source of the forward on the client's network.

Parameters:
originHost -
originPort -
Returns:

checkHostPermitted

public boolean checkHostPermitted(String host,
                                  int port)
Check the host of the forwarding is permitted under this policy. For remote forwarding the host is the original source of the forwarding request on the local network. For local forwarding the host is the destination of the forwarding on the local network.

Parameters:
host -
port -
Returns:


Copyright © 2012. All Rights Reserved.