This is an automated email from the ASF dual-hosted git repository.
shuber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/unomi.git
The following commit(s) were added to refs/heads/master by this push:
new 0e81668 UNOMI-226 Document how to use the IP addresses ranges and
subnet support.
0e81668 is described below
commit 0e81668a06ac4b0746e8f4849f78013f9f8e17e7
Author: Serge Huber <[email protected]>
AuthorDate: Tue Apr 30 11:56:42 2019 +0200
UNOMI-226 Document how to use the IP addresses ranges and subnet support.
Signed-off-by: Serge Huber <[email protected]>
---
manual/src/main/asciidoc/configuration.adoc | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/manual/src/main/asciidoc/configuration.adoc
b/manual/src/main/asciidoc/configuration.adoc
index fac9e0d..81a04d0 100644
--- a/manual/src/main/asciidoc/configuration.adoc
+++ b/manual/src/main/asciidoc/configuration.adoc
@@ -105,6 +105,31 @@ address, and if the secret-key is passed in the
X-Unomi-Peer HTTP request header
attempt to read an environment variable by that name, and if it's not found it
will default to the value after the ":-"
marker.
+It is now also possible to use IP address ranges instead of having to list all
valid IP addresses for event sources. This
+is very useful when working in cluster deployments where servers may be added
or removed dynamically. In order to support
+this Apache Unomi uses a library called
https://seancfoley.github.io/IPAddress/#_Toc525135541[IPAddress] that supports
+IP ranges and subnets. Here is an example of how to setup a range:
+
+
org.apache.unomi.thirdparty.provider1.ipAddresses=${env:UNOMI_THIRDPARTY_PROVIDER1_IPADDRESSES:-192.168.1.1-100,::1}
+
+The above configuration will allow a range of IP addresses between 192.168.1.1
and 192.168.1.100 as well as the IPv6
+loopback.
+
+Here's another example using the subnet format:
+
+
org.apache.unomi.thirdparty.provider1.ipAddresses=${env:UNOMI_THIRDPARTY_PROVIDER1_IPADDRESSES:-1.2.0.0/16,::1}
+
+The above configuration will allow all addresses starting with 1.2 as well as
the IPv6 loopback address.
+
+Wildcards may also be used:
+
+
org.apache.unomi.thirdparty.provider1.ipAddresses=${env:UNOMI_THIRDPARTY_PROVIDER1_IPADDRESSES:-1.2.*.*,::1}
+
+The above configuration is exactly the same as the previous one.
+
+More advanced ranges and subnets can be used as well, please refer to the
https://seancfoley.github.io/IPAddress[IPAddress] library documentation for
details on
+how to format them.
+
If you want to add another provider you will need to add them manually in the
following file (and make sure you maintain
the changes when upgrading) :