IP based white listing

Hi ,

I am trying to create a IP based white listing plugin for ES.
Basically what i want to do is enable insert and delete to ES from only a
single IP.
And all read operations can happen from any IP.

Going through http-auth plugin , i could make out that all requests can be
examined here

public void internalDispatchRequest(final HttpRequest request, final

HttpChannel channel) in HttpServer class.

But then i was not able to see the ip from the object HttpRequest.

Please advice on how to accomplish this.

Thanks
Vineeth

--