elasticfence / elasticsearch-http-user-auth

HTTP Basic Authentication and IP ACL plugin for Elasticsearch :key: (UNMAINTAINED)
http://qxip.net
148 stars 32 forks source link

Add wildcard for IP blacklist #46

Closed ryanlutgen closed 7 years ago

ryanlutgen commented 7 years ago

A use case came up in how I am using Elasticsearch where it might be desired to block all IPs that are not present on the whitelist.

This PR adds functionality to specify the blacklist as ["*"], which will show the "Forbidden IP" message for any request coming from an IP Address that is not on the whitelist.

There is no checking for if there are other IPs in the blacklist with the '', for example ["1.2.3.4", ""], but I figure a check like that would add complexity that would add nothing of value.

I also added a change log, just to specify activities related specifically to this plugin.