How can I restrict access to an application that I do not control only via another referrer application?
there are different approaches here:
1. using firewall setup access to B http{s} port only from A IP address.
2. set Directory restriction in httpd.conf for aps B directory like:
<Directory "/var/www/B"> AllowOverride None Order allow,deny Allow from <IP of A></Directory>
in APS A create link (http://ip_A/accesstoB/somepath/script.php
) that will Proxied to B using .htaccess rule like:
RewriteRule ^accesstoB/(.*)$ http://<ip_B>/$1 [P]
in this example: customer accessing http://ip_A/accesstoB/somepath/script.php
link will be proxied to http://ip_B/somepath/script.php
- You begin with restricting access to B Applications by using web server conf files or with firewall restrictions based on ip.
- Then you redirect all these requests to new wrapper app you will develop.
- With this wrapper app you do whatever authentication you like, then your wrapper app does the http/https request(via libcurl or etc.) and echoes the response.