User:Haravikk Mistral/RegionVerification

= Overview =

Problem
When receiving an HTTP request from a scripted object within an Open Simulator region, there is currently no means of verifying whether the request came from a legitimate source. For Second Life this is possible with a reverse DNS lookup on the IP address, if it has a valid simXXXX. .lindenlab.com address you can confirm that the request came from a legitimate source, but such a technique is not possible with Open Simulator based grids.

Proposed Solution
This proposal is to provide a call-back mechanism with which a web-service, knowing the source grid, region name and simulator IP address, can query the source grid to verify whether the IP address and region name are valid, i.e- asking the grid to confirm that it has a simulator with a given IP address, hosting the given region name.

= Detailed Design =

The Callback Service
Essentially what this feature boils down to is a callback service, implemented in much the same way as the GridInfo protocol. The proposed protocol would take the form:

http://example.org:9000/verify_region?name=Some%20Region&ip=123.123.123.123

To which the server would respond simply 'OK' if there exists a region named "Some Region", hosted by a simulator with IP address 123.123.123.123, or else 'NO' if there exists no region by that name assigned to that IP. Thus a web service knows either that the combo exists (OK), doesn't exist (NO) or that the grid cannot or will not verify it (any other response).

Example
The following example assumes the presence of the X-OpenSim-Location as proposed here:

Alternatives Considered
An alternative protocol for the verification would be to have the grid return some information about a region in an XML format. For example, a request for "Some Region" could return details such as its map location and IP, with the web-service extracting the IP itself to confirm. However, this raises the question of how much data should be revealed, and whether the ability to scrape by region name is desirable or not.

The proposed system above, while limited in the information it returns, requires the web-service to posses a valid region name and IP address, and can do nothing more than confirm that they are valid; if the IP address is incorrect then no data is returned (or some error, anything other than OK is considered to mean the combo was invalid or the operation is unsupported).

A DDOS attack against the grid servie is a very real possibility. A solution needs to include ratelimiting