Package org.zeromq
Class ZAuth
java.lang.Object
org.zeromq.ZAuth
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
A small class for working with ZAP requests and replies. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Allow (whitelist) a single IP address.protected boolean
authenticateGSS
(ZAuth.ZAPRequest request) void
configureGSSAPI
(String domain) void
configurePlain
(String domain, String filename) Configure PLAIN authentication for a given domain.void
Deny (blacklist) a single IP address.void
destroy()
Destructor.void
setVerbose
(boolean verbose) Enable verbose tracing of commands and activity
-
Constructor Details
-
ZAuth
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.
-
-
Method Details
-
setVerbose
public void setVerbose(boolean verbose) Enable verbose tracing of commands and activity- Parameters:
verbose
-
-
allow
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
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
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.- Parameters:
domain
-filename
-
-
destroy
public void destroy()Destructor. -
configureGSSAPI
-
authenticateGSS
-