# Delegation

{% hint style="info" %}
***This page must be considered part of the iSHARE Framework***

*This page is considered normative and is therefore compliant with RFC 2119.*
{% endhint %}

## Obtains delegation evidence

> Used to obtain delegation evidence from an Authorization Registry. The response is a signed JSON Web Token. Please refer to the models ‘jwt\_header’ and ‘jwt\_payload\_delegation\_evidence\_token’ which indicate what the decoded response will look like.

```json
{"openapi":"3.0.0","info":{"title":"generic iSHARE API specifications","version":"2.1.1"},"tags":[{"name":"Authorisation Registry","description":"Endpoints that form the Authorisation Registry API specification."}],"servers":[{"description":"iSHARE UAT network base domain","url":"https://isharetest.net"},{"description":"iSHARE TEST network base domain","url":"https://test.ishareworks.nl"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"OAuth 2.0 authorization based on bearer token. MUST contain “Bearer “ + access token value. Must be provided if restricted endpoints are needed."}},"schemas":{"DelegationRequestBody":{"description":"The model used for request body in /delegation endpoint, for obtaining delegation evidence.","required":["delegationRequest"],"type":"object","properties":{"delegationRequest":{"required":["policyIssuer","target","policySets"],"type":"object","properties":{"policyIssuer":{"type":"string"},"target":{"required":["accessSubject"],"type":"object","properties":{"accessSubject":{"type":"string"}}},"policySets":{"type":"array","items":{"$ref":"#/components/schemas/PolicySet_evidence_request"}},"delegation_path":{"type":"array","items":{"type":"string"}},"previous_steps":{"type":"array","items":{"type":"string"}}}}}},"PolicySet_evidence_request":{"required":["policies"],"type":"object","properties":{"target":{"type":"object","properties":{"environment":{"type":"object","properties":{"licenses":{"type":"array","items":{"type":"string"}}}}}},"policies":{"type":"array","items":{"$ref":"#/components/schemas/Policy_request_evidence"}}}},"Policy_request_evidence":{"required":["target","rules"],"type":"object","properties":{"target":{"required":["resource","actions"],"type":"object","properties":{"resource":{"required":["type","identifiers","attributes"],"type":"object","properties":{"type":{"type":"string"},"identifiers":{"type":"array","items":{"type":"string"}},"attributes":{"type":"array","items":{"type":"string"}}}},"actions":{"type":"array","items":{"type":"string"}}}},"rules":{"type":"array","items":{"required":["effect"],"type":"object","properties":{"effect":{"type":"string"}}}}}},"DelegationResponse":{"title":"DelegationResponse","type":"object","properties":{"delegation_token":{"type":"string","format":"application/jwt"}}}}},"paths":{"/[v2.1.1]/delegation":{"post":{"requestBody":{"description":"Delegation Mask that defines of which delegation the delegation evidence is requested.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DelegationRequestBody"}}},"required":true},"tags":["Authorisation Registry"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DelegationResponse"}}},"description":""}},"operationId":"/delegation","summary":"Obtains delegation evidence","description":"Used to obtain delegation evidence from an Authorization Registry. The response is a signed JSON Web Token. Please refer to the models ‘jwt_header’ and ‘jwt_payload_delegation_evidence_token’ which indicate what the decoded response will look like."}}}}
```

### Request model

#### Headers

* `Authorization`\
  **String**.\
  OAuth 2.0 authorization based on bearer token. MUST contain “Bearer “ + access token value. How to retrieve the access token can be found at [Access Token Endpoint section](https://dev.ishare.eu/version-2.1.1/all-roles-common-endpoints/access-token-m2m).
* `Content-Type`\
  **String**.\
  Defines request body content type. MUST be equal to *application/json*.

#### Parameters

The body of the request MUST contain a JSON with the following structure.

* `delegationRequest`\
  **Object**. Root level.\
  The request for delegation evidence.
  * `policyIssuer`\
    **String**. Contained in `delegationRequest`.\
    Identifier of the delegator (the delegating entity, usually the Entitled Party).
  * `target`\
    **Object**. Contained in `delegationRequest`.\
    MUST for the root level contain an `accessSubject`. No other elements are allowed.
    * `accessSubject`\
      **String**. Contained in `target`.\
      Identifier of the delegate, also known as the entity that receives the delegated rights (usually the Service Consumer).
  * `policySets`\
    **Array of Objects**. Contained in `delegationRequest`.\
    Container for one or more objects containing policy elements with an indication for further delegation. Note that policySet elements within one delegationRequest MUST not restrict each other, but rather offer a mechanism to express additional rights. They will be evaluated by the Authorization Registry in a *permit-override* manner, allowing a *Permit* if only one of the policySet elements evaluates to *Permit*.
    * `policies`

      **Array of Objects**. Contained in `policySets`.

      Used to express the actual rights for which evidence is being requested. Note that policies within one policySets object MUST not restrict each other, but rather offer a mechanism to express additional rights. They will be evaluated in a *permit-override* manner, allowing a *Permit* if only one of the policy elements evaluates to *Permit*.

      * `target`\
        **Object**. Contained in `policies`.\
        Describes the target, in terms of resource and action, this request applies to. It is also the scope that is permitted through the default rule.
        * `resource`\
          **Object**. Contained in `target`.\
          Contains `type`, `identifiers` and `attributes`.
          * `type`\
            **String**. Contained in `resource`.\
            String which describes the type of the resource for which delegation evidence is requested.
          * `identifiers`\
            **Array of Strings**. Contained in `resource`.\
            Array of strings containing one or more resource identifiers for which the delegation evidence is requested. Use of wildcards (for example "\*") is allowed.
          * `attributes`\
            **Array of Strings**. Contained in `resource`.\
            Array of attributes of the resources for which the delegation evidence is requested. Use of wildcards (for example "\*") is allowed.
        * `actions`\
          **Array of Strings**. Contained in `target`.\
          Array of actions for which delegation evidence is requested.
      * `rules`\
        **Array of Objects**. Contained in `policies`.
        * `effect`\
          **String**. Contained in `rules`.\
          Value must be equal to *Permit* or *Deny*.
* `delegation_path`\
  **Array of Strings**. Root level. *Optional*.\
  Container for one or more iSHARE identifiers values for a situation where multiple delegation policies need to be linked together.
* `previous_steps`\
  **Array of Strings**. Root level. *Optional*.\
  Container for one or more pieces of evidence such that the client has legitimate reason to request delegation evidence. For example:

  * Client\_assertion
  * Delegation\_evidence in a delegation chain
  * Other evidence or information as determined by the data space (could also be verified post-transaction), specification beyond the scope of this framework

  Privacy considerations: to prevent unallowed access to delegation evidence, a data space or participant can decide to require evidence or information in the previous\_steps attribute, depending on the nature of the data that is being shared.

### Response model

The response contains a `delegation_evidence_token`, containing an [ishare-jwt](https://dev.ishare.eu/version-2.1.1/reference/ishare-jwt "mention"). The decoded `delegation_evidence_token` JWT payload is structured as follows.

* `delegationEvidence`\
  **Object**. Root level.\
  The root of any delegation evidence.
  * `notBefore`\
    **Integer**. Contained in `delegationEvidence`.\
    Unix timestamp in UTC indicating the start of validity period of this delegation evidence. SHOULD equal the time of issuing of the evidence unless historic evidence is requested.
  * `notOnOrAfter`\
    **Integer**. Contained in `delegationEvidence`.\
    Unix timestamp in UTC indicating the end of validity period of this delegation evidence. It is up to the issuer off the evidence to set this time. Note that a reasonable amount of time SHOULD be allowed for processing of longer delegation paths. Also note that evidence cannot be revoked, so setting very long validity periods SHOULD be avoided.
  * `policyIssuer`\
    **String**. Contained in `delegationEvidence`.\
    Identifier of the delegator, also know as the delegating entity (usually the Entitled Party).
  * `target`\
    **Object**. Contained in `delegationEvidence`.\
    MUST for the root level contain an accessSubject. No other elements are allowed. It makes the entire delegation evidence applicable only to this accessSubject.
    * `accessSubject`\
      **Object**. Contained in `target`.\
      Party identifier of the delegate, also known as the entity that receives the delegated rights (usually the Service Consumer). It can be anyone of the id's in id or also known as.
  * `policySets`\
    **Array of Objects**. Contained in `delegationEvidence`.\
    Container for one or more objects containing policy elements with an indication for further delegation. Note that policySet elements within one delegationEvidence MUST not restrict each other, but rather offer a mechanism to express additional rights. They MUST be evaluated in a *permit-override* manner, allowing a *Permit* if only one of the policySet elements evaluates to *Permit*.
    * `maxDelegationDepth`\
      **Integer**. Contained in `policySets`. *Optional*.\
      Optional element that, if present, indicates that further delegation of the rights, conveyed in the policy elements that are part of this PolicySet, is allowed. The value indicates the delegation steps that are allowed after this step in order to evaluate the entire delegation path to *Permit*.
    * `target`

      **Object**. Contained in `policySets`.

      Contains `environment`.

      * `environment`

        **Object**. Contained in `target`.

        Contains `licenses`.

        * `licenses`

          **Array of Strings**. Contained in `environment`.

          Array which describes which iSHARE licenses apply to this policySet.
    * `policies`

      **Array of Objects**. Contained in `policySets`.

      Used to express the actual rights for which evidence is being provided. Note that policies within one policySets object MUST not restrict each other, but rather offer a mechanism to express additional rights. They will be evaluated in a *permit-override* manner, allowing a *Permit* if only one of the policy elements evaluates to *Permit*.

      * `target`\
        **Object**. Contained in `policies`.\
        Describes the target, in terms of resource and action, this request applies to. It is also the scope that is permitted through the default rule.
        * `resource`\
          **Object**. Contained in `target`.\
          Contains `type`, `identifiers` and `attributes`.
          * `type`\
            **String**. Contained in `resource`.\
            String which describes the type of resource to which the rules apply.
          * `identifiers`\
            **Array of Strings**. Contained in `resource`.\
            Array of strings containing one or more resource identifiers to which the rules apply.
          * `attributes`\
            **Array of Strings**. Contained in `resource`.\
            Array of attributes of the resources to which the rules apply.
        * `actions`\
          **Array of Strings**. Contained in `target`.\
          Array of actions that apply to this policy.
        * `environment`\
          **Object**. Contained in `target`.\
          Optional field that contains `serviceProviders`.
          * `serviceProviders`\
            **Array of Strings**. Contained in `environment`. *Optional.*\
            Array which lists the party identifier of Service Providers which are allowed to provide services to the accessSubject as described within this policy.
      * `rules`\
        **Array of Objects**. Contained in `policies`.
        * `effect`\
          **String**. Contained in `rules`.\
          Value must be equal to *Permit* or *Deny*.

### Example request

<pre class="language-json"><code class="lang-json">> Authorization: Bearer IIeDIrdnYo2ngwDQYJKoZIhvcNAQELBQAwSDEZMBcGA1UEAwwQaVNIQ

POST /delegation

<strong>{
</strong>  "delegationRequest": {
    "policyIssuer": "did:ishare:EU.NL.NTRNL-10000005",
    "target": {
      "accessSubject": "did:ishare:EU.NL.NTRNL-10000001"
    },
    "policySets": [
      {
        "policies": [
          {
            "target": {
              "resource": {
                "type": "GS1.CONTAINER",
                "identifiers": [
                  "180621.CONTAINER-Z"
                ],
                "attributes": [
                  "GS1.CONTAINER.ATTRIBUTE.ETA",
                  "GS1.CONTAINER.ATTRIBUTE.WEIGHT"
                ]
              },
              "actions": [
                "ISHARE.READ",
                "ISHARE.CREATE",
                "ISHARE.UPDATE",
                "ISHARE.DELETE"
              ],
              "environment": {
                "serviceProviders": [
                  "did:ishare:EU.NL.NTRNL-10000003"
                ]
              }
            },
            "rules": [
              {
                "effect": "Permit"
              }
            ]
          }
        ]
      }
    ]
  },
  "delegation_path": [
    "did:ishare:EU.NL.NTRNL-10000007"
  ],
  "previous_steps": [
    "&#x3C;delegation evidence token>"
  ]
}
</code></pre>

### Example response

The response contains an encoded JWT:

```json
{
  "delegation_evidence_token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LkFUVFJJQlVURS5FVEEiXX0sImVudmlyb25tZW50Ijp7InNlcnZpY2VQcm92aWRlcnMiOlsiZGlkOmlzaGFyZTpFVS5OTC5OVFJOTC0xMDAwMDAwMyJdfSwiYWN0aW9ucyI6WyJJU0hBUkUuUkVBRCJdfSwicnVsZXMiOlt7ImVmZmVjdCI6IlBlcm1pdCJ9XX1dfV19fQ.dNiITX_uHj3CJagOm54W-_MD2PXIsh1snviAtuoRbc7a7nRkQXZShJJDpldpyQOugsqFFhgLedUXM5z8kST0-5a9BNaaxrW5KAZNqyXtDgudRgB8T2vrohcmgLin39pgvD1gydoHHIXolJxPHCOYdxAamMD-8umvTzCFogjdwFaB9RMVWUHMbDuAZGYup-lSewuIK2pkwKJZft5ZRWxfignBBt2mauB4wot5Z92VLPReNA8EH0R9C_GkykP6pRCu2Km7La3c116WNP0szN02l8P87rqVNwDsjLpzhpH1cs17shDvbis8DbKb3KsHnq_LALAG9nx4GOFrupxuAadhGw"
}
```

After decoding, the example content of the JWT looks like this:

```json
{
  "iss": "did:ishare:EU.NL.NTRNL-10000004",
  "sub": "did:ishare:EU.NL.NTRNL-10000004",
  "jti": "7fa1ec39bac34fffa2ca48201e48f03a",
  "iat": 1711466985,
  "exp": 1711467015,
  "aud": "did:ishare:EU.NL.NTRNL-10000001",
  "delegationEvidence": {
    "notBefore": 1541058939,
    "notOnOrAfter": 2147483647,
    "policyIssuer": "did:ishare:EU.NL.NTRNL-10000005",
    "target": {
      "accessSubject": "did:ishare:EU.NL.NTRNL-10000001"
    },
    "policySets": [
      {
        "maxDelegationDepth": 0,
        "target": {
          "environment": {
            "licenses": [
              "ISHARE.0001"
            ]
          }
        },
        "policies": [
          {
            "target": {
              "resource": {
                "type": "GS1.CONTAINER",
                "identifiers": [
                  "180621.ABC1234"
                ],
                "attributes": [
                  "GS1.CONTAINER.ATTRIBUTE.ETA"
                ]
              },
              "environment": {
                "serviceProviders": [
                  "did:ishare:EU.NL.NTRNL-10000003"
                ]
              },
              "actions": [
                "ISHARE.READ"
              ]
            },
            "rules": [
              {
                "effect": "Permit"
              }
            ]
          }
        ]
      }
    ]
  }
}
```
