Class IpMatcher
java.lang.Object
org.exoplatform.addons.saml.extensions.IpMatcher
Matches a client IP address against a list of IPv4/IPv6 addresses, CIDR
blocks and ranges. Entries are separated by comma, semicolon or whitespace:
10.1.2.3: a single address10.0.0.0/8or2001:db8::/32: a CIDR block192.168.1.10-192.168.1.50: an inclusive range
- and the / are accepted. Only literal
addresses are accepted, host names are never resolved. An invalid entry is
ignored and reported at error level: it enforces nothing.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisClientAddress(String address) booleanisEmpty()boolean
-
Constructor Details
-
IpMatcher
-
-
Method Details
-
isEmpty
public boolean isEmpty() -
getEntries
-
matches
- Parameters:
address- the remote address of a request- Returns:
- true when the address is in one of the configured entries
-
isClientAddress
- Parameters:
address- the remote address of a request- Returns:
- true when the address is an IPv4 or IPv6 literal, once a port, the brackets of an IPv6 address or a zone are removed. A reverse proxy may put them in the X-Forwarded-For value that Tomcat copies
-