views:

360

answers:

1

We have a moss internet facing publishing site, we need to restrict access to this web site to people who have come from another specific web site (using the http header referrer property).

This has to be an automatic process (the user should not have to click ‘login’ or anything like that).

How to do this? Any advice greatly appreciated.

I don’t really want to attempt to write a custom membership provider; that seems like a huge amount of work.

+1  A: 

I don't think HTTP-REFERRER is reliabile enough to use as the basis for security. It is very possible/easy to modify or fake the HTTP-REFERRER server variable. Some browsers don't even send it.

If you wanted to do this all in SharePoint, I think the best best bet would be too install a server control on the master page that inspects determines the origin of the request (to your satisfaction) and redirects if the visitor is from the offending location.

Another approach mayb be to implement an ISAPI filter or HTTP module to verify the request origin. You can have this module run before the MOSS filters and modules. This would have 0 impact on SharePoint.

Basically, I think the first thing to do is verify that HTTP-REFERRER is strong enough for your security needs. I prefer the latter option, but I think the former will be easier to implement.

Jason
thanks for the comments, I see you point. What other options are there to determine the origin if the referrer is not reliable.
Rob
well, unfortuantely, it looks like there is no alternative (http://www.webmasterworld.com/forum47/3367.htm). i originally thought that you were interested in the requesting client's location, not from where they visited this site. I think google may be your best friend in figuring this out.
Jason
HTTP-REFERRER aside, I stand by the methods I presented.
Jason