Difference between revisions of "User:Infinity Linden/OGP Test Cases"

From Second Life Wiki
Jump to navigation Jump to search
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''note: this is a brief note for informational purposes. it's eventually going to be "cleaned up" and moved to a more appropriate place on this wiki.'''
* '''note: this is a brief note for informational purposes. it's eventually going to be "cleaned up" and moved to a more appropriate place on this wiki.'''
 
* '''note: this is a branch from the original "OGP" Test Case page. PyOGP Test Cases are defined at [[User:Saijanai_Kuhn/OGP_Test_Cases]]'''
= Introduction =
= Introduction =


Line 13: Line 13:
Well... that's how it's supposed to be... In the real world, "running code" trumps written specifications, and probably will continue to do so. And that's one of the reasons we have the interop tests; properly written test cases succinctly communicate abstractions introduced in written specifications. So rather than viewing the SLGOGP spec and these tests as separate, think of them as being two sections of the same document.
Well... that's how it's supposed to be... In the real world, "running code" trumps written specifications, and probably will continue to do so. And that's one of the reasons we have the interop tests; properly written test cases succinctly communicate abstractions introduced in written specifications. So rather than viewing the SLGOGP spec and these tests as separate, think of them as being two sections of the same document.


= Test Fixtures =
= Base Tests ( Test 0.* ) =


== Login Test Fixtures ==
Many OGP messages take the form of an LLSD message serialized to XML and POSTed to an URL somewhere via HTTP (or HTTPS.) In the ideal world, HTTP would be free from error. But as it turns out there are many ways in which a HTTP request could fail, especially if your implementation of OGP uses proxies, load balancers, n-tier service architectures, etc. These tests are intended to ensure your client library properly communicates HTTP errors, assuming your client library has a standard technique for handling and recovering from such errors.


{|style="background:white" width="100%" cellpadding="5"
It is entirely possible that ''your'' client library does not handle such errors cleanly. This is not a failure, per se, but we strongly encourage implementers to expose an interface to client applications allowing exceptional events to be communicated through the client library and to the application.


|- style="background:lightgrey;"
== Base Test 0.0 - Return an Exception when Accessing a Non-Existent Resource ==
| valign="top" colspan="9"| '''0. login host fixtures'''
|- style="background:lightgrey;"
| valign="top" colspan="9"| This is the "stock" login host for initial OGP beta roll-out. This is the host which receives authentication requests.


|- style="background:lightgrey;"
This test simply posts a properly formatted login request to an URL that does not exist. We anticipate a HTTP 404 result code, or at least that's what ''we'' would return if you sent a request to an undefined URL. In an ideal world we would test a resource from each resource class to ensure client library code handling each message properly propagates the "Not Found" exception. However, in the interests of alacrity we're only describing this test in terms of the agent_login resource class.
| valign="top" width="10%" |
| valign="top" colspan="8" | 0. login.aditi.lindenlab.com


|- style="background:lightgrey;"
So, test 0.0 is considered "successful" if after attempting to access the agent_login resource defined for fixture 1.0 (Arthur Crimthande) at the agent domain described in fixture 0.404 (the canonical undefined agent domain), the client library produces a "HTTP Not Found" exception.
| valign="top" colspan="9"| '''1. agent domain fixtures'''
|- style="background:lightgrey;"
| valign="top" colspan="9"| This is the "stock" agent domain host for initial OGP beta roll-out. This machine hosts capabilities granted after successful authentication.


|- style="background:lightgrey;"
== Base Test 0.1 - Return an Exception when Accessing a "Broken" Resource ==
| valign="top" width="10%" |
| valign="top" colspan="8" | 0. agent0.aditi.lindenlab.com


|- style="background:lightgrey;"
This test posts a properly formatted login request to an URL that has been preconfigured to return a HTTP 500 result code.
| valign="top" colspan="9"| '''2. region fixtures'''
|- style="background:lightgrey;"
| valign="top" colspan="9"| These are two "well defined regions" within Linden Lab's beta test grid. Note there are no "well defined regions" outside Linden Lab's administrative domain. Anyone want to add themselves to the list? OSGrid? Bueller?


|- style="background:lightgrey;"
So, test 0.1 is considered "successful" if after attempting to access the agent_login resource defined for fixture 1.0 (Arthur Crimthande) at the agent domain described in fixture 0.500 (the canonical broken agent domain), the client library produces a "HTTP Internal Server Error" exception.
| valign="top" width="10%" |
| valign="top" colspan="8" | 0. sim1.vaak.lindenlab.com:13000


|- style="background:lightgrey;"
== Base Test 0.2 - Return an Exception when Accessing an "Unavailable" Resource ==
| valign="top" width="10%" |
| valign="top" colspan="8" | 1. sim1.vaak.lindenlab.com:13001


|- style="background:lightgrey;"
This test posts a properly formatted login request to an URL that has been preconfigured to return a HTTP 503 result code.
| valign="top" colspan="9"| '''3. agents'''
|- style="background:lightgrey;"
| valign="top" colspan="9"| There are currently 32 "standard" agents for testing. The agents represent all combinations of the five factors: accepted TOS, read critical messages, high or low god level, suspended and disabled.


|- style="background:lightgrey;"
So, test 0.2 is considered "successful" if after attempting to access the agent_login resource defined for fixture 1.0 (Arthur Crimthande) at the agent domain described in fixture 0.503 (the canonical unavailable agent domain), the client library produces a "HTTP Service Not Available" exception.
| valign  ="top" width="10%" |
| valign="top" | '''fixture'''
| valign="top" | '''first name'''
| valign="top" | '''last name'''
| valign="top" | '''accepted TOS'''
| valign="top" | '''read critical messages'''
| valign="top" | '''god level'''
| valign="top" | '''suspended'''
| valign="top" | '''disabled'''


|- style="background:lightgrey;"
= LLSD Tests ( Test 1.* ) =
| valign="top" width="10%" |
| valign="top" width="12%" | 0.
| valign="top" width="11%" | Arthur
| valign="top" width="11%" | Crimthande
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | 150
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | True


|- style="background:lightgrey;"
These tests exercise concepts introduced in the "LLSD" section of the OGP spec.
| valign="top" width="10%" |
| valign="top" width="12%" | 1.
| valign="top" width="11%" | Bertha
| valign="top" width="11%" | Crimthande
| align="center" valign="top" width="11%" | False
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | 150
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | True


|- style="background:lightgrey;"
== LLSD Test 1.0 - Return an Exception when Accessing a Resource with the Wrong HTTP Method ==
| valign="top" width="10%" |
| valign="top" width="12%" | 2.
| valign="top" width="11%" | Cristobal
| valign="top" width="11%" | Crimthande
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | False
| align="center" valign="top" width="11%" | 150
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | True


|- style="background:lightgrey;"
If an agent domain, region domain or region receives a resource request using an unsupported HTTP method, the resource
| valign="top" width="10%" |
SHOULD respond with a HTTP 405 result code.
| valign="top" width="12%" | 3.
| valign="top" width="11%" | Dolly
| valign="top" width="11%" | Crimthande
| align="center" valign="top" width="11%" | False
| align="center" valign="top" width="11%" | False
| align="center" valign="top" width="11%" | 150
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | True


|- style="background:lightgrey;"
Test 1.0 is considered "successful" if, after attempting sending a HTTP GET to the authentication URL defined in fixture 0.200 (a working agent domain), the client library produces a "LLSD Method Not Allowed" exception.
| valign="top" width="10%" |
| valign="top" width="12%" | 4.
| valign="top" width="11%" | Edouard
| valign="top" width="11%" | Crimthande
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | 0
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | True


|- style="background:lightgrey;"
== LLSD Test 1.1 - Return an Exception when Accessing a Resource via GET with an Improper Media Type in Accept ==
| valign="top" width="10%" |
| valign="top" width="12%" | 5.
| valign="top" width="11%" | Fay
| valign="top" width="11%" | Crimthande
| align="center" valign="top" width="11%" | False
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | 0
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | True


|- style="background:lightgrey;"
If an agent domain, region domain or region receives a resource request via a HTTP GET, and the requester uses the 'Accept:' header to specify the media type it will accept, and that media type is not supported by the resource, the resource SHOULD respond with a HTTP 415 result code.
| valign="top" width="10%" |
| valign="top" width="12%" | 6.
| valign="top" width="11%" | Gustav
| valign="top" width="11%" | Crimthande
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | False
| align="center" valign="top" width="11%" | 0
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | True


|- style="background:lightgrey;"
''hmm... need to define a canonical resource that accepts GET.''
| valign="top" width="10%" |
| valign="top" width="12%" | 7.
| valign="top" width="11%" | Hanna
| valign="top" width="11%" | Crimthande
| align="center" valign="top" width="11%" | False
| align="center" valign="top" width="11%" | False
| align="center" valign="top" width="11%" | 0
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | True


|- style="background:lightgrey;"
== LLSD Test 1.2 - Return an Exception when Accessing a Resource via POST with an Improper Media Type in Accept Header ==
| valign="top" width="10%" |
| valign="top" width="12%" | 8.
| valign="top" width="11%" | Ana
| valign="top" width="11%" | Crimthande
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | 150
| align="center" valign="top" width="11%" | False
| align="center" valign="top" width="11%" | True


|- style="background:lightgrey;"
If an agent domain, region domain or region receives a resource request via a HTTP POST, and the requester uses the 'Accept:' header to specify the media type it will accept, and that media type is not supported by the resource, the resource SHOULD respond with a HTTP 415 result code.
| valign="top" width="10%" |
| valign="top" width="12%" | 9.
| valign="top" width="11%" | Bill
| valign="top" width="11%" | Crimthande
| align="center" valign="top" width="11%" | False
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | 150
| align="center" valign="top" width="11%" | False
| align="center" valign="top" width="11%" | True


|- style="background:lightgrey;"
Test 1.2 is considered "successful" if, after POSTing the following message body to the authentication URL defined in fixture 0.200 (a working agent domain) with the 'Content-Type:' header set to 'application/llsd+xml' and the 'Accept:' header is set to 'application/llsd+foo', the client library produces a "LLSD Unsupported Media Type" exception.
| valign="top" width="10%" |
| valign="top" width="12%" | 10.
| valign="top" width="11%" | Claudette
| valign="top" width="11%" | Crimthande
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | False
| align="center" valign="top" width="11%" | 150
| align="center" valign="top" width="11%" | False
| align="center" valign="top" width="11%" | True


|- style="background:lightgrey;"
<pre>
| valign="top" width="10%" |
<?xml version="1.0"?>
| valign="top" width="12%" | 11.
<llsd>
| valign="top" width="11%" | Danny
  <key>agent_login</key>
| valign="top" width="11%" | Crimthande
  <map>
| align="center" valign="top" width="11%" | False
    <key>credential</key>
| align="center" valign="top" width="11%" | False
    <map>
| align="center" valign="top" width="11%" | 150
      <key>identifier</key>
| align="center" valign="top" width="11%" | False
      <map>
| align="center" valign="top" width="11%" | True
        <key>type</key>
        <string>agent</string>
        <key>first_name</key>
        <string>Arthur</string>
        <key>last_name</key>
        <string>Crimthande</string>
      </map>
      <key>authenticator</key>
      <map>
        <key>type</key>
        <string>hash</string>
        <key>algorithm</key>
        <string>md5</string>
        <key>secret</key>
        <binary encoding="base16">c169c172e7a5dafc74f69c476c0a4869</binary>
      </map>
    </map>
  </map>
</llsd>
</pre>


|- style="background:lightgrey;"
== LLSD Test 1.3 - Return an Exception when Accessing a Resource via POST with an Improper Media Type in Content-Type Header ==
| valign="top" width="10%" |
| valign="top" width="12%" | 12.
| valign="top" width="11%" | Erika
| valign="top" width="11%" | Crimthande
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | 0
| align="center" valign="top" width="11%" | False
| align="center" valign="top" width="11%" | True


|- style="background:lightgrey;"
If an agent domain, region domain or region receives a resource request via a HTTP POST, and the requester uses the 'Content-Type:' header to identify the media type of the the request body, and that media type is not supported by the resource, the resource SHOULD respond with a HTTP 415 result code.
| valign="top" width="10%" |
| valign="top" width="12%" | 13.
| valign="top" width="11%" | Fred
| valign="top" width="11%" | Crimthande
| align="center" valign="top" width="11%" | False
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | 0
| align="center" valign="top" width="11%" | False
| align="center" valign="top" width="11%" | True


|- style="background:lightgrey;"
Test 1.3 is considered "successful" if, after POSTing the following message body to the authentication URL defined in fixture 0.200 (a working agent domain) with the 'Content-Type:' header set to 'application/llsd+foo', the client library produces a "LLSD Unsupported Media Type" exception.
| valign="top" width="10%" |
| valign="top" width="12%" | 14.
| valign="top" width="11%" | Grace
| valign="top" width="11%" | Crimthande
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | False
| align="center" valign="top" width="11%" | 0
| align="center" valign="top" width="11%" | False
| align="center" valign="top" width="11%" | True


|- style="background:lightgrey;"
<pre>
| valign="top" width="10%" |
<?xml version="1.0"?>
| valign="top" width="12%" | 15.
<llsd>
| valign="top" width="11%" | Henri
  <key>agent_login</key>
| valign="top" width="11%" | Crimthande
  <map>
| align="center" valign="top" width="11%" | False
    <key>credential</key>
| align="center" valign="top" width="11%" | False
    <map>
| align="center" valign="top" width="11%" | 0
      <key>identifier</key>
| align="center" valign="top" width="11%" | False
      <map>
| align="center" valign="top" width="11%" | True
        <key>type</key>
        <string>agent</string>
        <key>first_name</key>
        <string>Arthur</string>
        <key>last_name</key>
        <string>Crimthande</string>
      </map>
      <key>authenticator</key>
      <map>
        <key>type</key>
        <string>hash</string>
        <key>algorithm</key>
        <string>md5</string>
        <key>secret</key>
        <binary encoding="base16">c169c172e7a5dafc74f69c476c0a4869</binary>
      </map>
    </map>
  </map>
</llsd>
</pre>


|- style="background:lightgrey;"
== LLSD Test 1.4 - Return an Exception when POSTing bad XML to a Resource ==
| valign="top" width="10%" |
| valign="top" width="12%" | 16.
| valign="top" width="11%" | Alex
| valign="top" width="11%" | Crimthande
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | 150
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | False


|- style="background:lightgrey;"
If an agent domain, region domain or region receives a resource request via a HTTP POST, and Content-Type header of the request describes the body of the request as being a 'application/llsd+xml' media type, and the body is improperly formed XML, the resource SHOULD respond with a HTTP 400 result code.
| valign="top" width="10%" |
| valign="top" width="12%" | 17.
| valign="top" width="11%" | Bonnie
| valign="top" width="11%" | Crimthande
| align="center" valign="top" width="11%" | False
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | 150
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | False


|- style="background:lightgrey;"
Test 1.4 is considered "successful" if, after POSTing the following message body to the authentication URL defined in fixture 0.200 (a working agent domain) with the 'Content-Type:' header set to 'application/llsd+xml', the client library produces a "LLSD Bad Request" exception.
| valign="top" width="10%" |
| valign="top" width="12%" | 18.
| valign="top" width="11%" | Colin
| valign="top" width="11%" | Crimthande
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | False
| align="center" valign="top" width="11%" | 150
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | False
 
|- style="background:lightgrey;"
| valign="top" width="10%" |
| valign="top" width="12%" | 19.
| valign="top" width="11%" | Danielle
| valign="top" width="11%" | Crimthande
| align="center" valign="top" width="11%" | False
| align="center" valign="top" width="11%" | False
| align="center" valign="top" width="11%" | 150
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | False
 
|- style="background:lightgrey;"
| valign="top" width="10%" |
| valign="top" width="12%" | 20.
| valign="top" width="11%" | Earl
| valign="top" width="11%" | Crimthande
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | 0
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | False
 
|- style="background:lightgrey;"
| valign="top" width="10%" |
| valign="top" width="12%" | 21.
| valign="top" width="11%" | Fiona
| valign="top" width="11%" | Crimthande
| align="center" valign="top" width="11%" | False
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | 0
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | False
 
|- style="background:lightgrey;"
| valign="top" width="10%" |
| valign="top" width="12%" | 22.
| valign="top" width="11%" | Gaston
| valign="top" width="11%" | Crimthande
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | False
| align="center" valign="top" width="11%" | 0
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | False
 
|- style="background:lightgrey;"
| valign="top" width="10%" |
| valign="top" width="12%" | 23.
| valign="top" width="11%" | Hermine
| valign="top" width="11%" | Crimthande
| align="center" valign="top" width="11%" | False
| align="center" valign="top" width="11%" | False
| align="center" valign="top" width="11%" | 0
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | False
 
|- style="background:lightgrey;"
| valign="top" width="10%" |
| valign="top" width="12%" | 24.
| valign="top" width="11%" | Arlene
| valign="top" width="11%" | Crimthande
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | 150
| align="center" valign="top" width="11%" | False
| align="center" valign="top" width="11%" | False
 
|- style="background:lightgrey;"
| valign="top" width="10%" |
| valign="top" width="12%" | 25.
| valign="top" width="11%" | Bret
| valign="top" width="11%" | Crimthande
| align="center" valign="top" width="11%" | False
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | 150
| align="center" valign="top" width="11%" | False
| align="center" valign="top" width="11%" | False
 
|- style="background:lightgrey;"
| valign="top" width="10%" |
| valign="top" width="12%" | 26.
| valign="top" width="11%" | Cindy
| valign="top" width="11%" | Crimthande
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | False
| align="center" valign="top" width="11%" | 150
| align="center" valign="top" width="11%" | False
| align="center" valign="top" width="11%" | False
 
|- style="background:lightgrey;"
| valign="top" width="10%" |
| valign="top" width="12%" | 27.
| valign="top" width="11%" | Don
| valign="top" width="11%" | Crimthande
| align="center" valign="top" width="11%" | False
| align="center" valign="top" width="11%" | False
| align="center" valign="top" width="11%" | 150
| align="center" valign="top" width="11%" | False
| align="center" valign="top" width="11%" | False
 
|- style="background:lightgrey;"
| valign="top" width="10%" |
| valign="top" width="12%" | 28.
| valign="top" width="11%" | Emily
| valign="top" width="11%" | Crimthande
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | 0
| align="center" valign="top" width="11%" | False
| align="center" valign="top" width="11%" | False
 
|- style="background:lightgrey;"
| valign="top" width="10%" |
| valign="top" width="12%" | 29.
| valign="top" width="11%" | Franklin
| valign="top" width="11%" | Crimthande
| align="center" valign="top" width="11%" | False
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | 0
| align="center" valign="top" width="11%" | False
| align="center" valign="top" width="11%" | False
 
|- style="background:lightgrey;"
| valign="top" width="10%" |
| valign="top" width="12%" | 30.
| valign="top" width="11%" | Gert
| valign="top" width="11%" | Crimthande
| align="center" valign="top" width="11%" | True
| align="center" valign="top" width="11%" | False
| align="center" valign="top" width="11%" | 0
| align="center" valign="top" width="11%" | False
| align="center" valign="top" width="11%" | False
 
|- style="background:lightgrey;"
| valign="top" width="10%" |
| valign="top" width="12%" | 31.
| valign="top" width="11%" | Harvey
| valign="top" width="11%" | Crimthande
| align="center" valign="top" width="11%" | False
| align="center" valign="top" width="11%" | False
| align="center" valign="top" width="11%" | 0
| align="center" valign="top" width="11%" | False
| align="center" valign="top" width="11%" | False
 
 
 
 
|- style="background:lightgrey;"
| valign="top" colspan="9"| '''4. accounts'''
|- style="background:lightgrey;"
| valign="top" colspan="9"| The SLGOGP specification describes the concept of an "account" as distinct from an "agent". Accounts may have distinct names and login credentials. Additionally, users may use the account credentials to authenticate themselves to the agent domain in the login process. At the current time, this functionality is not deployed to the Aditi grid.
 
|- style="background:lightgrey;"
| valign="top" colspan="9" | '''5. faux machines'''
|- style="background:lightgrey;"
| valign="top" colspan="9" | These are used to test machines blacklisted by mac address or id0
 
|- style="background:lightgrey;"
| valign  ="top" width="10%" |
| valign="top" colspan="8" | 0.  machine whose mac address and id0 are not blacklisted
|- style="background:lightgrey;"
| valign  ="top" width="10%" |
| valign="top" colspan="8" | 1.  machine whose mac address is blacklisted and id0 is not blacklisted
|- style="background:lightgrey;"
| valign  ="top" width="10%" |
| valign="top" colspan="8" | 2.  machine whose mac address is not blacklisted and id0 is blacklisted
|- style="background:lightgrey;"
| valign  ="top" width="10%" |
| valign="top" colspan="8" | 3.  machine whose mac address and id0 are blacklisted
 
|- style="background:lightgrey;"
| valign="top" colspan="9" | '''6. blacklisted id0s'''
|- style="background:lightgrey;"
| valign="top" colspan="9" | These are the id0s the agent domain under test should consider as being blacklisted
 
|- style="background:lightgrey;"
| valign  ="top" width="10%" |
| valign="top" colspan="8" | 0. 4EahsGwT/GYg9uBSQeKcNA==
 
|- style="background:lightgrey;"
| valign  ="top" width="10%" |
| valign="top" colspan="8" | 1. 07BzhNET7exJ6qYjitX/AA==
 
|- style="background:lightgrey;"
| valign="top" colspan="9" | '''7. blacklisted mac addresses'''
|- style="background:lightgrey;"
| valign="top" colspan="9" | These are the mac addresses the agent domain under test should consider as being blacklisted
 
|- style="background:lightgrey;"
| valign  ="top" width="10%" |
| valign="top" colspan="8" | 0. 01:80:C2:00:00:01
 
|- style="background:lightgrey;"
| valign  ="top" width="10%" |
| valign="top" colspan="8" | 1. 01:80:C2:00:00:03
 
|}
 
== Transporting Fixtures ==
 
So it might not be the best idea to publish a standard list of usernames and passwords that are used for testing in live systems. We therefore expect the actual values for the test fixtures (or at least the passwords) to be confidential. To facilitate the exchange of known fixtures, we have the following XML DTD which defines the values of fixtures, so multiple parties can communicate test data easily.
 
'''note : the values of the test fixtures below are non-normative.''' Fixture data is loaded from an XML file and referenced in the tests by it's id attribute.
 
=== Fixture Transport DTD ===


<pre>
<pre>
<!DOCTYPE fixtures [
<?xml version="1.0"?>
<llsd>
  <key>agent_login</key>
  <map
    <key>credential</key>
    <map>
      <key>identifier</key>
      <map>
        <key>type</key>
        <string>agent</string>
        <key>first_name</key>
        <string>Arthur</string>
        <key>last_name</key>
        <string>Crimthande</string>
      </map>
      <key>authenticator</key>
      <map>
        <key>type</key>
        <string>hash</string>
        <key>algorithm</key>
        <string>md5</string>
        <key>secret</key>
        <binary encoding="base16">c169c172e7a5dafc74f69c476c0a4869</binary>
      </map>
    </map>
  </map>
</llsd>
</pre>


<!ELEMENT fixtures (agentdomains,regions,accounts,agents,urls,fauxmachines,id0blacklist,macblacklist)>
== LLSD Test 1.5 - Return an Exception when POSTing a misshaped request to a Resource ==
<!ELEMENT agentdomains (agent+)>
<!ELEMENT agent (#CDATA)>
<!ATTLIST agent id CDATA #REQUIRED>
<!ELEMENT regions (region+)>
<!ELEMENT region (host,port)>
<!ATTLIST region id CDATA #REQUIRED>
<!ELEMENT host (#CDATA)>
<!ELEMENT port (#CDATA)>
<!ELEMENT accounts (account+)>
<!ELEMENT account (name,password,agentrefs+)>
<!ATTLIST account id CDATA #REQURED>
<!ELEMENT name (#CDATA)>
<!ELEMENT password (#CDATA)>
<!ELEMENT agentrefs (agentref+)>
<!ELEMENT agentref (#EMPTY)>
<!ATTLIST agentref ref CDATA #REQUIRED>
<!ELEMENT agents (agent+)>
<!ELEMENT agent (firstname,lastname,password)>
<!ATTLIST agent id CDATA #REQUIRED>
<!ELEMENT firstname (#CDATA)>
<!ELEMENT lastname (#CDATA)>
<!ELEMENT password (#CDATA)>
<!ELEMENT urls (url+)>
<!ELEMENT url (#CDATA)>
<!ATTLIST url id CDATA #REQUIRED>
<!ELEMENT fauxmachines (fauxmachine+)>
<!ELEMENT fauxmachine (mac,id0)>
<!ATTLIST fauxmachine id CDATA #REQUIRED>
<!ELEMENT mac (#CDATA)>
<!ELEMENT id0 (#CDATA)>
<!ELEMENT id0blacklist (id0+)>
<!ELEMENT macblacklist (mac+)>


]>
If an agent domain, region domain or region receives a resource request via a HTTP POST, and the requester uses the 'Content-Type:' header to identify the media type of the the request body, and request is "mis-shaped" with respect to the LLIDL definition of the resource, it (the resource) SHOULD respond with a HTTP 400 result code.
</pre>


=== An Example of Fixture Data ===
Test 1.5 is considered "successful" if, after POSTing the following message body to the authentication URL defined in fixture 0.200 (a working agent domain) with the 'Content-Type:' header set to 'application/llsd+xml', the client library produces a "LLSD Bad Request" exception.


<pre>
<pre>
<?xml version="1.0"?>
<?xml version="1.0"?>
<fixtures>
<llsd>
 
   <key>agent_login</key>
   <loginhosts>
   <map>
    <loginhost id="0_0">login.aditi.lindenlab.com</agent>
     <key>identifier</key>
  </loginhosts>
     <string>agent</string>
 
   <agentdomains>
     <agentdomain id="1_0">agent0.aditi.lindenlab.com</agentdomain>
  </agentdomain>
 
  <regions>
  <region id="2_0">
      <host>sim1.vaak.lindenlab.com</host>
      <port>13000</port>
    <region>
  <region id="2_1">
      <host>sim1.vaak.lindenlab.com</host>
      <port>13001</port>
     <region>
  </regions>
 
  <agents>
    <agent id="3_0">
      <firstname>Arthur</firstname>
      <lastname>Crimthande</lastname>
      <password>changeme</password>
    </agent>
 
    <agent id="3_1">
      <firstname>Bertha</firstname>
      <lastname>Crimthande</lastname>
      <password>changeme</password>
    </agent>


     <agent id="3_2">
     <key>first_name</key>
      <firstname>Cristobal</firstname>
    <string>Arthur</string>
      <lastname>Crimthande</lastname>
      <password>changeme</password>
    </agent>


     <agent id="3_3">
     <key>last_name</key>
      <firstname>Dolly</firstname>
    <string>Crimthande</string>
      <lastname>Crimthande</lastname>
      <password>changeme</password>
    </agent>


     <agent id="3_4">
     <key>authenticator</key>
      <firstname>Edouard</firstname>
    <string>hash</string>
      <lastname>Crimthande</lastname>
      <password>changeme</password>
    </agent>


     <agent id="3_5">
     <key>algorithm</key>
      <firstname>Fay</firstname>
    <string>md5</string>
      <lastname>Crimthande</lastname>
      <password>changeme</password>
    </agent>


     <agent id="3_6">
     <key>secret</key>
      <firstname>Gustav</firstname>
     <binary encoding="base16">c169c172e7a5dafc74f69c476c0a4869</binary>
      <lastname>Crimthande</lastname>
   </map>
      <password>changeme</password>
</llsd>
    </agent>
 
    <agent id="3_7">
      <firstname>Hanna</firstname>
      <lastname>Crimthande</lastname>
      <password>changeme</password>
    </agent>
 
    <agent id="3_8">
      <firstname>Ana</firstname>
      <lastname>Crimthande</lastname>
      <password>changeme</password>
    </agent>
 
    <agent id="3_9">
      <firstname>Bill</firstname>
      <lastname>Crimthande</lastname>
      <password>changeme</password>
    </agent>
 
    <agent id="3_10">
      <firstname>Claudette</firstname>
      <lastname>Crimthande</lastname>
      <password>changeme</password>
    </agent>
 
    <agent id="3_11">
      <firstname>Danny</firstname>
      <lastname>Crimthande</lastname>
      <password>changeme</password>
    </agent>
 
    <agent id="3_12">
      <firstname>Erika</firstname>
      <lastname>Crimthande</lastname>
      <password>changeme</password>
    </agent>
 
    <agent id="3_13">
      <firstname>Fred</firstname>
      <lastname>Crimthande</lastname>
      <password>changeme</password>
    </agent>
 
    <agent id="3_14">
      <firstname>Grace</firstname>
      <lastname>Crimthande</lastname>
      <password>changeme</password>
    </agent>
 
    <agent id="3_15">
      <firstname>Henri</firstname>
      <lastname>Crimthande</lastname>
      <password>changeme</password>
    </agent>
 
    <agent id="3_16">
      <firstname>Alex</firstname>
      <lastname>Crimthande</lastname>
      <password>changeme</password>
    </agent>
 
    <agent id="3_17">
      <firstname>Bonnie</firstname>
      <lastname>Crimthande</lastname>
      <password>changeme</password>
    </agent>
 
    <agent id="3_18">
      <firstname>Colin</firstname>
      <lastname>Crimthande</lastname>
      <password>changeme</password>
    </agent>
 
    <agent id="3_19">
      <firstname>Danielle</firstname>
      <lastname>Crimthande</lastname>
      <password>changeme</password>
    </agent>
 
    <agent id="3_20">
      <firstname>Earl</firstname>
      <lastname>Crimthande</lastname>
      <password>changeme</password>
    </agent>
 
    <agent id="3_21">
      <firstname>Fiona</firstname>
      <lastname>Crimthande</lastname>
      <password>changeme</password>
    </agent>
 
    <agent id="3_22">
      <firstname>Gaston</firstname>
      <lastname>Crimthande</lastname>
      <password>changeme</password>
    </agent>
 
    <agent id="3_23">
      <firstname>Hermine</firstname>
      <lastname>Crimthande</lastname>
      <password>changeme</password>
    </agent>
 
    <agent id="3_24">
      <firstname>Arlene</firstname>
      <lastname>Crimthande</lastname>
      <password>changeme</password>
    </agent>
 
    <agent id="3_25">
      <firstname>Bret</firstname>
      <lastname>Crimthande</lastname>
      <password>changeme</password>
    </agent>
 
    <agent id="3_26">
      <firstname>Cindy</firstname>
      <lastname>Crimthande</lastname>
      <password>changeme</password>
    </agent>
 
    <agent id="3_27">
      <firstname>Don</firstname>
      <lastname>Crimthande</lastname>
      <password>changeme</password>
    </agent>
 
    <agent id="3_28">
      <firstname>Emily</firstname>
      <lastname>Crimthande</lastname>
      <password>changeme</password>
    </agent>
 
    <agent id="3_29">
      <firstname>Franklin</firstname>
      <lastname>Crimthande</lastname>
      <password>changeme</password>
    </agent>
 
    <agent id="3_30">
      <firstname>Gert</firstname>
      <lastname>Crimthande</lastname>
      <password>changeme</password>
    </agent>
 
    <agent id="3_31">
      <firstname>Harvey</firstname>
      <lastname>Crimthande</lastname>
      <password>changeme</password>
    </agent>
  </agents>
 
  <accounts/>
 
  <machines>
    <machine id="5_0">
      <mac>01:80:C2:00:00:00</mac>
      <id0>3fPkIs1eG0doeDj8uscIZQ==</id0>
    </machine>
    <machine id="5_1">
      <mac>01:80:C2:00:00:01</mac>
      <id0>wVenkDHhxA+FkxgpvF/FUg==</id0>
    </machine>
    <machine id="5_2">
      <mac>01:80:C2:00:00:02</mac>
      <id0>4EahsGwT/GYg9uBSQeKcNA==</id0>
    </machine>
    <machine id="5_3">
      <mac>01:80:C2:00:00:03</mac>
      <id0>07BzhNET7exJ6qYjitX/AA==</id0>
    </machine>
  </machines>
  <id0blacklist>
    <id0 id="6_0">4EahsGwT/GYg9uBSQeKcNA==</id0>
    <id0 id="6_1">07BzhNET7exJ6qYjitX/AA==</id0>
  </id0blacklist>
  <macblaclist>
    <mac id="7_0">01:80:C2:00:00:01</mac>
     <mac id="7_1">01:80:C2:00:00:03</mac>
   </macblacklist>
</fixtures>
</pre>
</pre>


= Base Tests =
== REST Tests ==
== LLSD (Linden Lab Structured Data) ==
== Event Queue ==
== Capabilities ==
= Resource Tests =
== Agent Credential ==
== Account Credential ==
= Login Tests =
Authentication is the process of associating a viewer with an agent domain, then placing the user's avatar in a region managed by a (potentially separate) region domain. The spec describes logging in as the sequence:
# The viewer authenticates to an agent domain for the authorized control of a particular agent.
# The viewer directs the agent domain to to place the agent in a region.
# The agent domain contacts the region domain for the region, and negotiates placement of the agent.
# The region grants access to the agent domain, which in turn passes some of that granted access on to the viewer.


Testing the login process means logging each of these steps, in order. We should also test that executing them out of order leads to an error.
= Authentication Tests ( Test 2.* ) =


We assume the code providing underlying services (such as the event queue, LLSD serialization / deserialization, MD5 Hash production, etc.) is reliable and has been tested.
== Authentication Test 2.0 - Successful Authentication of an Agent Identifier and a Hashed Authenticator ==


== Authentication From Client to Agent Domain ==
Test 2.0 is considered "successful" if after requesting the agent_login resource defined in fixture 0.200 (a working agent domain) with the agent defined in fixture 1.0 (Arthur Crimthande) using a 'hash' type authenticator and an 'agent' type identifier, a 'success' condition response is returned and the agent_seed_capability URI is subordinate to the seed root defined in fixture 0.200 (a working agent domain).


The authentication suite verifies that the agent domain "does the right thing" in the face of a number of common circumstances.
== Authentication Test 2.1 - Unsuccessful Authentication of an Agent Identifier and a Hashed Authenticator ==


{|style="background:white" width="100%" cellpadding="5"
Test 2.1 is considered "successful" if after requesting the agent_login resource defined in fixture 0.200 (a working agent domain) with the agent defined in fixture 1.1 (Bertha Crimthande) using a 'hash' type authenticator and an 'agent' type identifier, a 'key' condition response is returned with the salt, count and duration items undefined.


|- style="background:lightgrey;"
| valign="top" colspan="3"| '''0. positive agent authentication'''
|- style="background:lightgrey;"
| valign="top" colspan="3"| The positive agent authentication test suite checks whether or not we can successfully log in.


|- style="background:lightgrey;"
== Authentication Test 2.2 - Successful Authentication of an Account Identifier with a Single Agent and a Hashed Authenticator ==
| valign="top" width="10%" |
| valign="top" colspan="2" | 0. attempt to authenticate as agent 3_24


|- style="background:lightgrey;"
Test 2.2 is considered "successful" if after requesting the agent_login resource defined in fixture 0.200 (a working agent domain) with the account defined in fixture 2.0 (cristobal@example.com) using a 'hash' type authenticator and an 'account' type identifier, a 'success' condition response is returned and the agent_seed_capability URI is subordinate to the seed root defined in fixture 0.200 (a working agent domain).
| valign="top" width="10%" |
| valign="top" width="10%" |
| valign="top" | expect seed cap in return


|- style="background:lightgrey;"
== Authentication Test 2.3 - Unsuccessful Authentication of an Account Identifier with a Single Agent and a Hashed Authenticator ==
| valign="top" width="10%" |
| valign="top" colspan="2" | 0. attempt to authenticate as agent 3_28


|- style="background:lightgrey;"
Test 2.3 is considered "successful" if after requesting the agent_login resource defined in fixture 0.200 (a working agent domain) with the account defined in fixture 2.1 (dolly@example.com) using a 'hash' type authenticator and an 'account' type identifier, a 'key' condition response is returned with the salt, count and duration items undefined.
| valign="top" width="10%" |
| valign="top" width="10%" |
| valign="top" | if grid is in "admin only mode," expect failure with reason code set to "insufficient admin rights"


|- style="background:lightgrey;"
== Authentication Test 2.4 - Successful Authentication of an Account Identifier with a Multiple Agents with the Selected Agent in the Request and a Hashed Authenticator ==
| valign="top" width="10%" |
| valign="top" width="10%" |
| valign="top" | if grid is not in "admin only mode," expect seed cap


|}
Test 2.4 is considered "successful" if after requesting the agent_login resource defined in fixture 0.200 (a working agent domain) with the account defined in fixture 2.2 (edouard@example.com) using a 'hash' type authenticator and an 'account' type identifier, with the agent defined in fixture 1.4 (Edouard Crimthande) a 'success' condition response is returned and the agent_seed_capability URI is subordinate to the seed root defined in fixture 0.200 (a working agent domain).


= Teleport Tests =
== Authentication Test 2.5 - Unsuccessful Authentication of an Account Identifier with a Multiple Agents with the Selected Agent in the Request and a Hashed Authenticator ==


"Teleporting" is the process of moving from one region to another by means other than "walking across" a region boundary. Teleport does not assume that regions are adjacent.
Test 2.5 is considered "successful" if after requesting the agent_login resource defined in fixture 0.200 (a working agent domain) with the account defined in fixture 2.3 (gustav@example.com) using a 'hash' type authenticator and an 'account' type identifier, with the agent defined in fixture 1.6 (Gustav Crimthande) a 'success' condition response is returned and the agent_seed_capability URI is subordinate to the seed root defined in fixture 0.200 (a working agent domain).


== Authentication Test 2.6 - Select Failure of an Account Identifier with a Multiple Agents and a Hashed Authenticator ==


Test 2.6 is considered "successful" if after requesting the agent_login resource defined in fixture 0.200 (a working agent domain) with the account defined in fixture 2.4 (ana@example.com) using a 'hash' type authenticator and an 'account' type identifier, without an agent selected in the response, a 'select' condition response is returned with the 'agents' list set to: [ 'Ana', 'Crimthande', 'Bil', 'Crimthande' ].


[[Category: Pyogp]]
[[Category: Pyogp]]
[[Category:Pyogp_Kitchen_Sink]]
[[Category:AW Groupies]]
[[Category:Grid Interoperability]]
[[Category:AW Groupies User Pages]]

Latest revision as of 15:44, 18 January 2009

  • note: this is a brief note for informational purposes. it's eventually going to be "cleaned up" and moved to a more appropriate place on this wiki.
  • note: this is a branch from the original "OGP" Test Case page. PyOGP Test Cases are defined at User:Saijanai_Kuhn/OGP_Test_Cases

Introduction

What is This?

In the development of the Open Grid Protocol and the PyOGP project, it became obvious that there were no canonical lists of use cases and things to test. This page is the first effort to remediate this omission. While we don't go as far as providing use cases here, we do list common functionality and interoperability tests.

About the OGP Test Cases

The objective of the Open Grid Protocol is to specify syntax and semantics of SL Grid messages to the degree that interoperable viewers, agent domains, region domains and regions may be coded without resort to close examination of open source code from Linden Lab or peeking into the interaction between running clients and servers. The Second Life Grid has been developed sufficiently, the reasoning goes, that it should be possible to shine the bright light of inquiry on the process and document the living heck out of how the system works. Moving forward we should see advantages as software developers code to documented requirements and standards. The "OGP Test Cases" are a catalog of tests that demonstrate compatibility with the written spec.

Well... that's how it's supposed to be... In the real world, "running code" trumps written specifications, and probably will continue to do so. And that's one of the reasons we have the interop tests; properly written test cases succinctly communicate abstractions introduced in written specifications. So rather than viewing the SLGOGP spec and these tests as separate, think of them as being two sections of the same document.

Base Tests ( Test 0.* )

Many OGP messages take the form of an LLSD message serialized to XML and POSTed to an URL somewhere via HTTP (or HTTPS.) In the ideal world, HTTP would be free from error. But as it turns out there are many ways in which a HTTP request could fail, especially if your implementation of OGP uses proxies, load balancers, n-tier service architectures, etc. These tests are intended to ensure your client library properly communicates HTTP errors, assuming your client library has a standard technique for handling and recovering from such errors.

It is entirely possible that your client library does not handle such errors cleanly. This is not a failure, per se, but we strongly encourage implementers to expose an interface to client applications allowing exceptional events to be communicated through the client library and to the application.

Base Test 0.0 - Return an Exception when Accessing a Non-Existent Resource

This test simply posts a properly formatted login request to an URL that does not exist. We anticipate a HTTP 404 result code, or at least that's what we would return if you sent a request to an undefined URL. In an ideal world we would test a resource from each resource class to ensure client library code handling each message properly propagates the "Not Found" exception. However, in the interests of alacrity we're only describing this test in terms of the agent_login resource class.

So, test 0.0 is considered "successful" if after attempting to access the agent_login resource defined for fixture 1.0 (Arthur Crimthande) at the agent domain described in fixture 0.404 (the canonical undefined agent domain), the client library produces a "HTTP Not Found" exception.

Base Test 0.1 - Return an Exception when Accessing a "Broken" Resource

This test posts a properly formatted login request to an URL that has been preconfigured to return a HTTP 500 result code.

So, test 0.1 is considered "successful" if after attempting to access the agent_login resource defined for fixture 1.0 (Arthur Crimthande) at the agent domain described in fixture 0.500 (the canonical broken agent domain), the client library produces a "HTTP Internal Server Error" exception.

Base Test 0.2 - Return an Exception when Accessing an "Unavailable" Resource

This test posts a properly formatted login request to an URL that has been preconfigured to return a HTTP 503 result code.

So, test 0.2 is considered "successful" if after attempting to access the agent_login resource defined for fixture 1.0 (Arthur Crimthande) at the agent domain described in fixture 0.503 (the canonical unavailable agent domain), the client library produces a "HTTP Service Not Available" exception.

LLSD Tests ( Test 1.* )

These tests exercise concepts introduced in the "LLSD" section of the OGP spec.

LLSD Test 1.0 - Return an Exception when Accessing a Resource with the Wrong HTTP Method

If an agent domain, region domain or region receives a resource request using an unsupported HTTP method, the resource SHOULD respond with a HTTP 405 result code.

Test 1.0 is considered "successful" if, after attempting sending a HTTP GET to the authentication URL defined in fixture 0.200 (a working agent domain), the client library produces a "LLSD Method Not Allowed" exception.

LLSD Test 1.1 - Return an Exception when Accessing a Resource via GET with an Improper Media Type in Accept

If an agent domain, region domain or region receives a resource request via a HTTP GET, and the requester uses the 'Accept:' header to specify the media type it will accept, and that media type is not supported by the resource, the resource SHOULD respond with a HTTP 415 result code.

hmm... need to define a canonical resource that accepts GET.

LLSD Test 1.2 - Return an Exception when Accessing a Resource via POST with an Improper Media Type in Accept Header

If an agent domain, region domain or region receives a resource request via a HTTP POST, and the requester uses the 'Accept:' header to specify the media type it will accept, and that media type is not supported by the resource, the resource SHOULD respond with a HTTP 415 result code.

Test 1.2 is considered "successful" if, after POSTing the following message body to the authentication URL defined in fixture 0.200 (a working agent domain) with the 'Content-Type:' header set to 'application/llsd+xml' and the 'Accept:' header is set to 'application/llsd+foo', the client library produces a "LLSD Unsupported Media Type" exception.

<?xml version="1.0"?>
<llsd>
  <key>agent_login</key>
  <map>
    <key>credential</key>
    <map>
      <key>identifier</key>
      <map>
        <key>type</key>
        <string>agent</string>
        <key>first_name</key>
        <string>Arthur</string>
        <key>last_name</key>
        <string>Crimthande</string>
      </map>
      <key>authenticator</key>
      <map>
        <key>type</key>
        <string>hash</string>
        <key>algorithm</key>
        <string>md5</string>
        <key>secret</key>
        <binary encoding="base16">c169c172e7a5dafc74f69c476c0a4869</binary>
      </map>
    </map>
  </map>
</llsd>

LLSD Test 1.3 - Return an Exception when Accessing a Resource via POST with an Improper Media Type in Content-Type Header

If an agent domain, region domain or region receives a resource request via a HTTP POST, and the requester uses the 'Content-Type:' header to identify the media type of the the request body, and that media type is not supported by the resource, the resource SHOULD respond with a HTTP 415 result code.

Test 1.3 is considered "successful" if, after POSTing the following message body to the authentication URL defined in fixture 0.200 (a working agent domain) with the 'Content-Type:' header set to 'application/llsd+foo', the client library produces a "LLSD Unsupported Media Type" exception.

<?xml version="1.0"?>
<llsd>
  <key>agent_login</key>
  <map>
    <key>credential</key>
    <map>
      <key>identifier</key>
      <map>
        <key>type</key>
        <string>agent</string>
        <key>first_name</key>
        <string>Arthur</string>
        <key>last_name</key>
        <string>Crimthande</string>
      </map>
      <key>authenticator</key>
      <map>
        <key>type</key>
        <string>hash</string>
        <key>algorithm</key>
        <string>md5</string>
        <key>secret</key>
        <binary encoding="base16">c169c172e7a5dafc74f69c476c0a4869</binary>
      </map>
    </map>
  </map>
</llsd>

LLSD Test 1.4 - Return an Exception when POSTing bad XML to a Resource

If an agent domain, region domain or region receives a resource request via a HTTP POST, and Content-Type header of the request describes the body of the request as being a 'application/llsd+xml' media type, and the body is improperly formed XML, the resource SHOULD respond with a HTTP 400 result code.

Test 1.4 is considered "successful" if, after POSTing the following message body to the authentication URL defined in fixture 0.200 (a working agent domain) with the 'Content-Type:' header set to 'application/llsd+xml', the client library produces a "LLSD Bad Request" exception.

<?xml version="1.0"?>
<llsd>
  <key>agent_login</key>
  <map
    <key>credential</key>
    <map>
      <key>identifier</key>
      <map>
        <key>type</key>
        <string>agent</string>
        <key>first_name</key>
        <string>Arthur</string>
        <key>last_name</key>
        <string>Crimthande</string>
      </map>
      <key>authenticator</key>
      <map>
        <key>type</key>
        <string>hash</string>
        <key>algorithm</key>
        <string>md5</string>
        <key>secret</key>
        <binary encoding="base16">c169c172e7a5dafc74f69c476c0a4869</binary>
      </map>
    </map>
  </map>
</llsd>

LLSD Test 1.5 - Return an Exception when POSTing a misshaped request to a Resource

If an agent domain, region domain or region receives a resource request via a HTTP POST, and the requester uses the 'Content-Type:' header to identify the media type of the the request body, and request is "mis-shaped" with respect to the LLIDL definition of the resource, it (the resource) SHOULD respond with a HTTP 400 result code.

Test 1.5 is considered "successful" if, after POSTing the following message body to the authentication URL defined in fixture 0.200 (a working agent domain) with the 'Content-Type:' header set to 'application/llsd+xml', the client library produces a "LLSD Bad Request" exception.

<?xml version="1.0"?>
<llsd>
  <key>agent_login</key>
  <map>
    <key>identifier</key>
    <string>agent</string>

    <key>first_name</key>
    <string>Arthur</string>

    <key>last_name</key>
    <string>Crimthande</string>

    <key>authenticator</key>
    <string>hash</string>

    <key>algorithm</key>
    <string>md5</string>

    <key>secret</key>
    <binary encoding="base16">c169c172e7a5dafc74f69c476c0a4869</binary>
  </map>
</llsd>


Authentication Tests ( Test 2.* )

Authentication Test 2.0 - Successful Authentication of an Agent Identifier and a Hashed Authenticator

Test 2.0 is considered "successful" if after requesting the agent_login resource defined in fixture 0.200 (a working agent domain) with the agent defined in fixture 1.0 (Arthur Crimthande) using a 'hash' type authenticator and an 'agent' type identifier, a 'success' condition response is returned and the agent_seed_capability URI is subordinate to the seed root defined in fixture 0.200 (a working agent domain).

Authentication Test 2.1 - Unsuccessful Authentication of an Agent Identifier and a Hashed Authenticator

Test 2.1 is considered "successful" if after requesting the agent_login resource defined in fixture 0.200 (a working agent domain) with the agent defined in fixture 1.1 (Bertha Crimthande) using a 'hash' type authenticator and an 'agent' type identifier, a 'key' condition response is returned with the salt, count and duration items undefined.


Authentication Test 2.2 - Successful Authentication of an Account Identifier with a Single Agent and a Hashed Authenticator

Test 2.2 is considered "successful" if after requesting the agent_login resource defined in fixture 0.200 (a working agent domain) with the account defined in fixture 2.0 (cristobal@example.com) using a 'hash' type authenticator and an 'account' type identifier, a 'success' condition response is returned and the agent_seed_capability URI is subordinate to the seed root defined in fixture 0.200 (a working agent domain).

Authentication Test 2.3 - Unsuccessful Authentication of an Account Identifier with a Single Agent and a Hashed Authenticator

Test 2.3 is considered "successful" if after requesting the agent_login resource defined in fixture 0.200 (a working agent domain) with the account defined in fixture 2.1 (dolly@example.com) using a 'hash' type authenticator and an 'account' type identifier, a 'key' condition response is returned with the salt, count and duration items undefined.

Authentication Test 2.4 - Successful Authentication of an Account Identifier with a Multiple Agents with the Selected Agent in the Request and a Hashed Authenticator

Test 2.4 is considered "successful" if after requesting the agent_login resource defined in fixture 0.200 (a working agent domain) with the account defined in fixture 2.2 (edouard@example.com) using a 'hash' type authenticator and an 'account' type identifier, with the agent defined in fixture 1.4 (Edouard Crimthande) a 'success' condition response is returned and the agent_seed_capability URI is subordinate to the seed root defined in fixture 0.200 (a working agent domain).

Authentication Test 2.5 - Unsuccessful Authentication of an Account Identifier with a Multiple Agents with the Selected Agent in the Request and a Hashed Authenticator

Test 2.5 is considered "successful" if after requesting the agent_login resource defined in fixture 0.200 (a working agent domain) with the account defined in fixture 2.3 (gustav@example.com) using a 'hash' type authenticator and an 'account' type identifier, with the agent defined in fixture 1.6 (Gustav Crimthande) a 'success' condition response is returned and the agent_seed_capability URI is subordinate to the seed root defined in fixture 0.200 (a working agent domain).

Authentication Test 2.6 - Select Failure of an Account Identifier with a Multiple Agents and a Hashed Authenticator

Test 2.6 is considered "successful" if after requesting the agent_login resource defined in fixture 0.200 (a working agent domain) with the account defined in fixture 2.4 (ana@example.com) using a 'hash' type authenticator and an 'account' type identifier, without an agent selected in the response, a 'select' condition response is returned with the 'agents' list set to: [ 'Ana', 'Crimthande', 'Bil', 'Crimthande' ].