The ACL file is reloaded whenever a modification to it is detected. If you copy in a file with an older file date, you will need to touch it.
The public runtime method is permitAccess(). The public setup method is the constructor.
Each non-comment line in the ACL file must be a rule of the format:
{allow|deny} <ip_address>[/significant-bits]
For example
allow ahostname
deny ahost.domain.com
allow 127.0.0.1
allow 2001:db8::/32
In order to detect bit specification mistakes, we require that non-significant bits be zero in the values. An undesirable consequence of this is, you can't use a specification like the following to mean "all of the hosts on the same network as x.admc.com":
allow x.admc.com/24
ServerAcl(File), permitAccess
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| public static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private List | |
| private File | |
| pack-priv static final byte[] | |
| pack-priv static final byte[] | |
| private long | |
| private static ServerAcl. | |
| private static ServerAcl. | |
| private PrintWriter |
| Modifier and Type | Method and Description |
|---|---|
| public static String | |
| public static String | |
| pack-priv synchronized void | |
| pack-priv List | |
| public static void | |
| public boolean | Returns: booleanString s)Uses system network libraries to resolve the given String to an IP addr, then determine whether this address is permitted or denied. |
| public boolean | permitAccess(byte[]
byte[] addr)Returns: true if access for the candidate address should be permitted, false if access should be denied. |
| private void | |
| public void | |
| public String |
| aclEntries | back to summary |
|---|---|
| private List<ServerAcl. | |
| aclFile | back to summary |
|---|---|
| private File aclFile | |
| ALL_SET_16BYTES | back to summary |
|---|---|
| pack-priv static final byte[] ALL_SET_16BYTES | |
| ALL_SET_4BYTES | back to summary |
|---|---|
| pack-priv static final byte[] ALL_SET_4BYTES | |
| lastLoadTime | back to summary |
|---|---|
| private long lastLoadTime | |
| PROHIBIT_ALL_IPV4 | back to summary |
|---|---|
| private static ServerAcl. | |
| PROHIBIT_ALL_IPV6 | back to summary |
|---|---|
| private static ServerAcl. | |
| pw | back to summary |
|---|---|
| private PrintWriter pw | |
| ServerAcl | back to summary |
|---|---|
| public ServerAcl(File aclFile) throws IOException, AclFormatException | |
| colonNotation | back to summary |
|---|---|
public static String colonNotation(byte[] uba)
| |
| dottedNotation | back to summary |
|---|---|
public static String dottedNotation(byte[] uba)
| |
| ensureAclsUptodate | back to summary |
|---|---|
| pack-priv synchronized void ensureAclsUptodate() | |
| load | back to summary |
|---|---|
| pack-priv List | |
| main | back to summary |
|---|---|
| public static void main(String[] sa) throws AclFormatException, IOException Utility method that allows interactive testing of individual ACL records, as well as the net effect of the ACL record list. Run "java -cp path/to/hsqldb.jar org.hsqldb.server.ServerAcl --help" for Syntax help.
| |
| permitAccess | back to summary |
|---|---|
| public boolean permitAccess(String s) Uses system network libraries to resolve the given String to an IP addr, then determine whether this address is permitted or denied. Specified name may be a numerical-based String like "1.2.3.4", a constant known to the networking libraries, or a host name to be resolved by the systems name resolution system. If the given String can't be resolved to an IP addr, false is returned.
| |
| permitAccess | back to summary |
|---|---|
public boolean permitAccess(byte[] addr)
| |
| println | back to summary |
|---|---|
| private void println(String s) | |
| setPrintWriter | back to summary |
|---|---|
| public void setPrintWriter(PrintWriter pw) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| Modifier and Type | Field and Description |
|---|---|
| public boolean | |
| private int | |
| private byte[] | |
| private byte[] |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public String | |
| public void |
| allow | back to summary |
|---|---|
| public boolean allow | |
| bitBlockSize | back to summary |
|---|---|
| private int bitBlockSize | |
| mask | back to summary |
|---|---|
| private byte[] mask | |
| value | back to summary |
|---|---|
| private byte[] value | |
| AclEntry | back to summary |
|---|---|
| public AclEntry(byte[] value, int bitBlockSize, boolean allow) throws AclFormatException | |
| matches | back to summary |
|---|---|
| public boolean matches(byte[] candidate) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| validateMask | back to summary |
|---|---|
| public void validateMask() throws AclFormatException | |
| Access | Constructor and Description |
|---|---|
| public |
| AclFormatException | back to summary |
|---|---|
| public AclFormatException(String s) | |
| Access | Constructor and Description |
|---|---|
| private |
| InternalException | back to summary |
|---|---|
| private InternalException() | |