Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup EndpointProperty inconsistencies and specify authType #218

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 8 additions & 3 deletions transfer/message/example/transfer-request-message.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,21 @@
"@type": "dspace:TransferRequestMessage",
"dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833",
"dspace:agreementId": "urn:uuid:e8dc8655-44c2-46ef-b701-4cffdc2faa44",
"dct:format": "dspace:S3_AWS_PUSH",
"dct:format": "example:HTTP_PUSH",
"dspace:dataAddress": {
"@type": "dspace:DataAddress",
"dspace:endpointType": "https://w3id.org/idsa/v4.1/HTTP",
"dspace:endpoint": "http://example.com",
"dspace:endpointProperties": [
{
"@type": "dspace:EndpointProperty",
"dspace:name": "Authorization",
"dspace:value": "Bearer TOKEN-ABCDEFG"
"dspace:name": "authorization",
"dspace:value": "TOKEN-ABCDEFG"
},
{
"@type": "dspace:EndpointProperty",
"dspace:name": "authType",
"dspace:value": "bearer"
}
]
},
Expand Down
9 changes: 7 additions & 2 deletions transfer/message/example/transfer-start-message.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@
"dspace:endpointProperties": [
{
"@type": "dspace:EndpointProperty",
"dspace:name": "Authorization",
"dspace:value": "Bearer TOKEN-ABCDEFG"
"dspace:name": "authorization",
"dspace:value": "TOKEN-ABCDEFG"
},
{
"@type": "dspace:EndpointProperty",
"dspace:name": "authType",
"dspace:value": "bearer"
}
]
}
Expand Down
29 changes: 22 additions & 7 deletions transfer/transfer.process.binding.https.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,21 @@ Authorization: ...
"@type": "dspace:TransferRequestMessage",
"dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833",
"dspace:agreementId": "urn:uuid:e8dc8655-44c2-46ef-b701-4cffdc2faa44",
"dct:format": "dspace:S3_AWS_PUSH",
"dct:format": "example:HTTP_PUSH",
"dspace:dataAddress": {
"@type": "dspace:DataAddress",
"dspace:endpointType": "https://w3id.org/idsa/v4.1/HTTP",
"dspace:endpoint": "http://example.com",
"dspace:endpointProperties": [
{
"@type": "dspace:EndpointProperty",
"dspace:name": "Authorization",
"dspace:value": "Bearer TOKEN-ABCDEFG"
"dspace:name": "authorization",
"dspace:value": "TOKEN-ABCDEFG"
},
{
"@type": "dspace:EndpointProperty",
"dspace:name": "authType",
"dspace:value": "bearer"
}
]
},
Expand Down Expand Up @@ -170,8 +175,13 @@ Authorization: ...
"dspace:endpointProperties": [
{
"@type": "dspace:EndpointProperty",
"dspace:name": "Authorization",
"dspace:value": "Bearer TOKEN-ABCDEFG"
"dspace:name": "authorization",
"dspace:value": "TOKEN-ABCDEFG"
},
{
"@type": "dspace:EndpointProperty",
"dspace:name": "authType",
"dspace:value": "bearer"
}
]
}
Expand Down Expand Up @@ -303,8 +313,13 @@ Authorization: ...
"dspace:endpointProperties": [
{
"@type": "dspace:EndpointProperty",
"dspace:name": "Authorization",
"dspace:value": "Bearer TOKEN-ABCDEFG"
"dspace:name": "authorization",
"dspace:value": "TOKEN-ABCDEFG"
},
{
"@type": "dspace:EndpointProperty",
"dspace:name": "authType",
"dspace:value": "bearer"
}
]
}
Expand Down
9 changes: 8 additions & 1 deletion transfer/transfer.process.protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ The Transfer Request Message is sent by a [Consumer](../model/terminology.md#con
- The `dataAddress` contains a transport-specific endpoint address for pushing the data. It may include a temporary authorization via the `endpointProperties` property.
- `callbackAddress` is a URI indicating where messages to the [Consumer](../model/terminology.md#consumer) should be sent. If the address is not understood, the [Provider](../model/terminology.md#provider) MUST return an UNRECOVERABLE error.

- The `endpointProperties` may contain the following optional values:
- `authorization` - An opaque authorization token that clients must present when accessing the transport-specific endpoint address.
- `authType` - The auth token type. For example, the value may be `bearer`. If present, this value may be used in conjunction with transport rules to define how the client must present an authorization token.

Note that [Providers](../model/terminology.md#provider) should implement idempotent behavior for [Transfer Request Messages](#21-transfer-request-message) based on the value of `consumerPid`. [Providers](../model/terminology.md#provider) may choose to implement idempotent behavior for a certain period of time. For example, until a TP has completed and been archived after an implementation-specific expiration period, repeated sending of [Transfer Request Messages](#21-transfer-request-message) does not change the state of the TP. If a request for the given `consumerPid` has already been received *and* the same [Consumer](../model/terminology.md#consumer) sent the original message again, the [Provider](../model/terminology.md#provider) should respond with an appropriate [Transfer Start Message](#22-transfer-start-message).

- Once a TP has been created, all associated callback messages must include a `consumerPid` and `providerPid`.
Expand All @@ -114,6 +118,9 @@ Note that [Providers](../model/terminology.md#provider) should implement idempot
The Transfer Start Message is sent by the [Provider](../model/terminology.md#provider) to indicate the data transfer has been initiated.

- The `dataAddress` is only provided if the current transfer is a pull transfer and contains a transport-specific endpoint address for obtaining the data. It may include a temporary authorization via the `endpointProperties` property.
- The `endpointProperties` may contain the following optional values:
- `authorization` - An opaque authorization token that clients must present when accessing the transport-specific endpoint address.
- `authType` - The auth token type. For example, the value may be `bearer`. If present, this value may be used in conjunction with transport rules to define how the client must present an authorization token.

### 2.3 Transfer Suspension Message

Expand Down Expand Up @@ -185,4 +192,4 @@ The Transfer Error is an object returned by a [Consumer](../model/terminology.md
| `consumerPid` | UUID | The TF unique id on [Consumer](../model/terminology.md#consumer) side. |
| `providerPid` | UUID | The TF unique id on [Provider](../model/terminology.md#provider) side. |
| `code` | string | An optional implementation-specific error code. |
| `reasons` | Array[object] | An optional array of implementation-specific error objects. |
| `reasons` | Array[object] | An optional array of implementation-specific error objects. |