Package org.zeromq

# Class ZAuth

java.lang.Object
org.zeromq.ZAuth

public class ZAuth extends 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

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static class`
`ZAuth.ZAPRequest`
A small class for working with ZAP requests and replies.

## Constructor Summary

Constructors
Constructor
Description
`ZAuth(ZContext ctx)`
Install authentication for the specified context.

## Method Summary

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

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### 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 Details

### 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)