0
votes

We have a web application : C# + SQL 2k5

Different companies send us information, we parse, them, do different things, and come up with a simple list for each of our customers. The list will look the same, but will have different information based on the customer.

They should not have access to each other's data.

We would like to create a page which would be embedded on their own site. I was thinking about using something like an iFrame.

Basically customer ABC would embed on his own abc.com an iframe with a URL (we will give them the parameters needed) and his clients will see our data on his site.

The other customer, lets call him xyz, has an other website xyz.com, will do the same thing, but in the url I should make a difference between them.

I would like to know how is the best, safest way to proceed. How should I start to build up this page that is going to be embedded.

How should I make a difference between the 2 customers? The only way to get info from them is the parameters they send me, and eventually, I could get the 'parent' of my embedded iFrame, so that might help me restrict xyz to embed using url parameter info to get data from abc. See my dilemma? Probably a unique identifier for each customer (like a GUID?) will be needed, and they woul dnot know each other's ID ... Or is there a more secure way to do things like this?

Any help would be appreciated.

Thanks

2

2 Answers

1
votes

Embed a publically visible unique id in the URL and process this to extract the client id. e.g.

<IFRAME src="http://example.com/1122334455667788aabbcc">

You could check the Request.UrlReferrer to ensure that the request see this answer

However the only safe way of doing this is to provide an authenticated API that the site uses server side to process via a services API (e.g. WCF), or at the very least an authenticated HttpWebRequest; any other way leaves your data only as secure as a publically visible unique id.

0
votes

Take a look at how one of the credit card processing portals do this (eg WorldPay or Paypal). There are several ways.

At the very least you need provide each customer with a unique ID that they send you.