Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I recently built a RESTful service using Jersey and is currently used by 3 other systems internal to the network (not people).

  1. How can I make sure the requests to the service are honored only based on hostname/IP address.
  2. The service is local to the network and so Im not using HTTPS
  3. Any opensource ideas/example code would be of great help.


share|improve this question
Maybe a firewall on the server itself? –  smcg Jun 26 '12 at 17:18

1 Answer 1

You could just write a simple Servlet Filter that extracts IP address from the request and accepts it or denies and terminates any further processing.

See an example - https://community.jboss.org/wiki/LimitAccessToCertainClients?_sscc=t

However i think that such kind of authentication should be done before the application - by an application server or a firewall.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.