Determines if the given host is a synonym for any of the hosts that our auth server runs on. The rules are:
-
If the system property org.hawkular.accounts.auth.host.synonyms is specified, then the host is matched
against this list. This list should include all IPs and hostnames that are considered synonyms.
-
If the system property is not set, we assume that the auth server is running on the same
application server instance as Hawkular. We then build a list of local IPs. If the parameter
is an IP address, it's matched with this list. If it's a host, then the host is resolved
to an IP, which is then matched with the list. The list of IPs is derived from the property
jboss.bind.address as follows:
- If it's not defined, then 127.0.0.1 is assumed (based on Wildfly's defaults)
- If it's 0.0.0.0, then all available NICs are queried and its IPs are added to a cache
- If it's not an IP, then the hostname is resolved into an IP
- If it's an IP, it's added as the single entry to the list.