I would like to configure Apache (2.2)to restrict what domains users can access e.g. if apache FQDN is myapache.myfunnydomain.com then apache will only allow requests to resources in .myfunnydomain.com (or whatever domain I configure as legal) and refuse all other requests (redirect to error page)
Use case is:
- User attempts access to restricted resource
- I use OpenAm / OpenAm policyAgent for authentication (PolicyAgent installs as Apache module that listens to all traffic)
- OpenAm policyAgent module intercepts this and redirects user to login page
- The url for this login page is of the form www.loginpage.com/?goto=originallyrequestedresource.com
- Once user presses login, this POST goes to the parallel OpenAM system
- Once OpenAM authenticates it uses this goto to redirect the user to the value of 'goto' (using 302)
- I want to ensure that a user can never be redirected to a domain other than my allowed domain
e.g. is someone hacks the system and manages to change the value of goto then apache will not allow this request to succeed