I have an application that is split in to multiple deployable artefacts, one of which is a REST service, another which is a web interface to that REST interface, and so on. One customer is planning on deploying this in their DMZ and want to make sure that the REST interface can only be accessed by apps on the same box. Since the web app (and others) still need to be accessible, it's obviously not suitable to change the listening interface for JBoss.
I've tried adding virtual servers in jboss-web.xml, but this doesn't seem to be working. Another possibility seems to be using rewrite patterns in the domain.xml, but this doesn't seem very suitable to me, even if I can get it working. Ideally what I'd want is something specific to the deployable artefact that only allows access from localhost for that entire artefact.