kool_samule — 2010-11-05T06:38:39-04:00 — #1
I have a PHP Application, hosted on IIS 7 Server.
The Application needs to be secure for a customer (based in Germany).
The problem I face is that the only security I have used is cookies.
Their solution would be to use some sort of IP Address based security, where only access from certain IP Addresses would be permitted.
The problem I see with this is that the customer has numerous different 'sites' across Germany, which would have their own servers and therefore different IP Addresses and in some cases, no server at all.
So my questions are:
- Is IP Address security a viable option?
- Would the customer's request be a valid concern?
- What would be the best practice of implementing the request?
coastweb — 2010-11-05T08:41:55-04:00 — #2
Why cant you just use username/password authentication using sessions?
aleksejs — 2010-11-05T08:43:57-04:00 — #3
1) It is viable addditional option, but I don't think you would be able to do without cookies (essentially all web-session mechanisms rely on them)
3) I think you should reiterate negotiation of what exactly they want.
kool_samule — 2010-11-05T10:10:30-04:00 — #4
OK, some of their divisions, might delete cookies on closing their browser, or each time they login to their PC, and they don't want to login each time, IP Address check would be preferable.
aleksejs — 2010-11-05T11:14:18-04:00 — #5
They are "the boss" of course, but I would not recommend that. If someone makes mess in system - who would be held responsible? To your application whole division might look like single IP address.
Anyhow... if they insist on this solution - you have several options:
1) Specify allowed addresses at firewall level (that would however provide all or nothing access, meaning, that no part of site would be accessible from non approved IP address)
2) Specify allowed addresses at web-server level (in case of httpd using mod_access and .htaccess file you can specify which addresses would be able to open which url)
3) Specify allowed addresses at application level (in PHP that would mean using $SERVER['REMOTEADDR'] - this gives you most flexibility, but also requires most expertise on your part)
doug_g — 2010-11-07T00:54:37-04:00 — #6
IP address validation is very unreliable. The client IP can be blocked from the web server by various proxy servers and some firewalls. If you want to restrict access to only certain computers maybe a VPN would be a more bulletproof solution.