Package org.zeromq
Class ZAuth
- java.lang.Object
-
- org.zeromq.ZAuth
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ZAuth.ZAPRequest
A small class for working with ZAP requests and replies.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
allow(String address)
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(String address)
Deny (blacklist) a single IP address.void
destroy()
Destructor.void
setVerbose(boolean verbose)
Enable verbose tracing of commands and activity
-
-
-
Constructor Detail
-
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.
-
-
Method Detail
-
setVerbose
public void setVerbose(boolean verbose)
Enable verbose tracing of commands and activity- Parameters:
verbose
-
-
allow
public void allow(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(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(String domain, 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.- Parameters:
domain
-filename
-
-
destroy
public void destroy()
Destructor.
-
configureGSSAPI
public void configureGSSAPI(String domain)
-
authenticateGSS
protected boolean authenticateGSS(ZAuth.ZAPRequest request)
-
-