org.zeromq
类 ZAuth

java.lang.Object
  继承者 org.zeromq.ZAuth

public class ZAuth
extends java.lang.Object

ZAuth takes over authentication for all incoming connections in its context. Note that libzmq provides four levels of security: default NULL (which zauth does not see), and authenticated NULL, PLAIN, and CURVE, which zauth can see. Based on zauth.c in czmq


嵌套类摘要
static class ZAuth.ZAPRequest
          A small class for working with ZAP requests and replies.
 
构造方法摘要
ZAuth(ZContext ctx)
          Install authentication for the specified context.
 
方法摘要
 void allow(java.lang.String address)
          Allow (whitelist) a single IP address.
protected  boolean authenticateGSS(ZAuth.ZAPRequest request)
           
 void configureGSSAPI(java.lang.String domain)
           
 void configurePlain(java.lang.String domain, java.lang.String filename)
          Configure PLAIN authentication for a given domain.
 void deny(java.lang.String address)
          Deny (blacklist) a single IP address.
 void destroy()
          Destructor.
 void setVerbose(boolean verbose)
          Enable verbose tracing of commands and activity
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

ZAuth

public ZAuth(ZContext ctx)
Install authentication for the specified context. Note that until you add policies, all incoming NULL connections are allowed (classic ZeroMQ behaviour), and all PLAIN and CURVE connections are denied.

方法详细信息

setVerbose

public void setVerbose(boolean verbose)
Enable verbose tracing of commands and activity

参数:
verbose -

allow

public void allow(java.lang.String address)
Allow (whitelist) a single IP address. For NULL, all clients from this address will be accepted. For PLAIN and CURVE, they will be allowed to continue with authentication. You can call this method multiple times to whitelist multiple IP addresses. If you whitelist a single address, any non-whitelisted addresses are treated as blacklisted.


deny

public void deny(java.lang.String address)
Deny (blacklist) a single IP address. For all security mechanisms, this rejects the connection without any further authentication. Use either a whitelist, or a blacklist, not not both. If you define both a whitelist and a blacklist, only the whitelist takes effect.


configurePlain

public void configurePlain(java.lang.String domain,
                           java.lang.String filename)
Configure PLAIN authentication for a given domain. PLAIN authentication uses a plain-text password file. To cover all domains, use "*". You can modify the password file at any time; it is reloaded automatically.

参数:
domain -
filename -

destroy

public void destroy()
Destructor.


configureGSSAPI

public void configureGSSAPI(java.lang.String domain)

authenticateGSS

protected boolean authenticateGSS(ZAuth.ZAPRequest request)