| 21 | Each service and call are accessed by appending servicename/operation to the base URL of the API server. On DETERlab the base URL will be https://api.isi.deterlabnet:52323/axis2/service. For example, one can access the getVersion operation below at https://api.isi.deterlabnet:52323/axis2/service/ApiInfo/getVersion |
| 22 | |
| 23 | Each operation returns useful parameters on success and throws a fault, called a DeterFault, on an error. Faults are standard SOAP faults with a detail section that includes the following fields: |
| 24 | |
| 25 | * ErrorCode - a 32-bit integer encoding the type of error. Constants are available in the [http://www.isi.edu/~faber/tmp/doc/net/deterlab/testbed/api/DeterFault.html javadoc for DeterFault]. Values are: |
| 26 | * access - access denied |
| 27 | * request - bad request |
| 28 | * internal - internal server error |
| 29 | * ErrorString - a string describing the broad error |
| 30 | * DetailString - a string describing the details that caused the error |
| 31 | |
| 32 | The {{{ErrorString}}} and {{{ErrorCode}}} are equivalent, but the information in the {{{DetailString}}} is generally more informative about the specifics. Request or access errors are generally correctable on the client side while internal errors are not. |
| 33 | |
| 34 | [http://www.isi.edu/~faber/tmp/doc/net/deterlab/testbed/api/DeterFault.html javadoc for DeterFault] |
| 35 | |
| 57 | [http://www.isi.edu/~faber/tmp/doc/net/deterlab/testbed/api/Users.html javadoc for Users] |
| 58 | |
| 59 | A user can authenticate to the testbed and receive a short-lived client x.509 certificate by requesting a challenge using the {{{requestChallenge}}} operation and responding to the challenge via the {{{challengeResponse}}} operation. |
| 60 | |
| 61 | Currently only one challenge type is defined. The challenge is an array of bytes and the response is return an SHA1 HMAC of that string keyed by the user's password. |
| 62 | |
| 63 | * '''Service:''' Users |
| 64 | * '''Operation:''' requestChallenge |
| 65 | * '''Input Parameters:''' |
| 66 | * userid - the identity to authenticate |
| 67 | * '''Return Values:''' |
| 68 | * Type - the kind of challenge |
| 69 | * Data - the data needed for the challenge |
| 70 | * Validity - number of seconds the challenge may be responded to |
| 71 | * ChallengeID - a 64-bit identifier that allows the server to validate the reply |
| 72 | |
| 73 | * '''Service:''' Users |
| 74 | * '''Operation:''' challengeResponse |
| 75 | * '''Input Parameters:''' |
| 76 | * ResponseData - a binary string, the response to the challenge |
| 77 | * ChallengeID - The 64-bit identifier of the challenge being responded to |
| 78 | * '''Return Values''': |
| 79 | * Certificate - a binary string containing a PEM-encoded X.509 certificate and private key. (Passed down the encrypted connection) |
| 80 | |
| 81 | |
| 82 | |
| 83 | |