OAuth 2.0

This part of the iSHARE Scheme is considered normative and is therefore compliant with RFC 2119.


iSHARE uses the OAuth 2.0 protocol for authenticating parties and providing access tokens when requesting access to a service within iSHARE.

On this page a brief description of OAuth is provided. For the most recent version of the OAuth 2.0 specification click on this link

Furthermore this page describes the generic iSHARE Authentication flow.

iSHARE facilitates an ecosystem within which parties can interact with previously unknown parties, pre-registration is therefore not a prerequisite and thus requires alterations to the official standard.

Generic OAuth 2.0 requirements

In addition to the specifications below, for all uses of OAuth 2.0 the following requirements apply:

  • Clients MUST NOT be pre registered. A look-up in the iSHARE adherence registry is sufficient. It is up to the server create a new entry for Clients that perform requests for the first time 1
  • The client_id MUST contain the valid iSHARE identifier of the client
  • For interoperability reasons clients SHALL only make HTTP GET calls to the /oauth2.0/token endpoint. 
  • Servers SHALL NOT issue refresh tokens

Additional rationale

In OAuth 2.0 clients are generally pre-registered. Since in iSHARE servers interact with clients that have been previously unknown this is not a workable requirement. Therefore iSHARE implements a generic client identification and authentication scheme, based on iSHARE whitelisted PKIs.

iSHARE authentication flow


Based on the described standards and specifications in this scheme, the generic iSHARE Authentication flow is described in the following sequence diagram.



Access token specifications in OAuth 2.0

Used to obtain an OAuth access token from a party that exposes an iSHARE API.

Based on the requirements in https://tools.ietf.org/html/rfc6749

OAuth access token API specifications example

Used to obtain an OAuth access token from the Authorisation Registry

ParameterContained inTypeRequiredDescription

grant_type

querystringYes

OAuth 2.0 grant type. MUST contain “authorization_code”

scope

querystringNo

OAuth 2.0 scope. Defaults to "iSHARE", indicating all rights are requested. Other values MAY be specified by the API owner and allow to get tokens that do not include all rights

client_id

querystringYes

OpenID Connect 1.0 client ID. Used in iSHARE for all client identification for OAuth/OpenID Connect. MUST contain a valid iSHARE identifier

client_assertion_type 

querystringYes

OpenID Connect 1.0 client assertion type. Used in iSHARE for all client identification for OAuth/OpenID Connect. MUST contain “urn:ietf:params:oauth:client-assertion-type:jwt-bearer”

client_assertion

querystringYes

OpenID Connect 1.0 client assertion. Used in iSHARE for all client identification for OAuth/OpenID Connect. MUST contain JWT conform iSHARE specifications


Example OAuth token request
https://randomserver.com/authorisation_registry/oauth2.0/token?grant_type=client_credentials&
scope=iSHARE&client_id=EU.EORI.NL000000001&client_assertion_type=urn:ietf:params:oauth:client
-assertion-type:jwt-bearer&client_assertion=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsIng1YyI6WyJNS
UlHQVRDQ0ErbWdBd0lCQWdJQ0VBb3dEUVlKS29aSWh2Y05BUUVMQlFBd2daQXhDekFKQmdOVkJBWVRBazVNTVFzd0NRWU
RWUVFJREFKT1NERVBNQTBHQTFVRUNnd0dhVk5JUVZKRk1SRXdEd1lEVlFRTERBaFRaV04xY21sMGVURW9NQ1lHQTFVRUF
3d2ZhVk5JUVZKRklFNU1JRU5sY25ScFptbGpZWFJsSUVGMWRHaHZjbWwwZVRFbU1DUUdDU3FHU0liM0RRRUpBUllYYVc1
bWIwQnBjMmhoY21VdGNISnZhbVZqZEM1dmNtY3dIaGNOTVRjeE1ERXlNRGd6TXpVNVdoY05NVGd4TURJeU1EZ3pNelU1V
2pDQmxURUxNQWtHQTFVRUJoTUNUa3d4Q3pBSkJnTlZCQWdNQWs1SU1SSXdFQVlEVlFRSERBbEJiWE4wWlhKa1lXMHhEek
FOQmdOVkJBb01CbWxUU0VGU1JURVdNQlFHQTFVRUN3d05SSFZ0YlhrZ1ptOXlJRkJQUXpFVU1CSUdBMVVFQXd3TFRrd3d
NREF3TURBd01ERXhKakFrQmdrcWhraUc5dzBCQ1FFV0YybHVabTlBYVhOb1lYSmxMWEJ5YjJwbFkzUXViM0puTUlJQklq
QU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUF2LzVmdElwdTE0bnl2MG9DUmRydEpsVk9icEV0TmpkT
FNNSSs3SzJOL05GWHlOUGFQM3c0ajB2a29Ma0lVUmJEaTJ3S29oUXNqanJEM21yR1RWN1ZqdWlaSzM1WlZPMGtlczlyZU
hoeTN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ZCI6Ik5MLkVPUkkuTkw4MTI0NTg4MzcifQ.bPOTFBBg8pedWkfoRKMt1
uaa0albfWkgSObePtOSKxV0VOPUb1uencLihV086HWJeqO7DBZ2jx_rn96FfpojJnn2z2aQnBSX06IYPTYYcze543-wb-
8vCor7hM6idGBbDCmeKQvFrIYaYmt34GeU0UjWnNMPGdh90vzbhqgPUlZixtUWfQYn0NxYJf7RGmEhmRybXm2zFl0ooom
1d-zoZzwuTAzfZqa2rM986VG8WikewxN2IUafhKoQ_w42MB6WpPki8a0EJ07xUZozSybSQvFRWyKxN-TCtixp3B5nGo9T
uZvkOf1f0RpL8-zTU2DQOFnhz8p7gwF10srNYYv3Sw
Responses
CodeDescription
200

OK

Example value
{
  "access_token": "string",
  "token_type": "string",
  "expires_in": 3600
}

OAuth 2.0 general description

OAuth is an open standard for authorisation which is used by i.e. Google, Facebook, Microsoft, Twitter etc. to let their users exchange information about their accounts with other applications or websites. OAuth is designed to work with HTTP.

Through OAuth users can authorise third party applications or websites to access their account information on other "master" systems without the need of exchanging with them their credentials to login onto the platform. OAuth provides a "secure delegated access" to resources (email accounts, pictures accounts, etc.) on behalf of the resource owner.

It specifies a method for resource owners to authorise third parties access to their resources without exchanging their credentials (username, password). Authorisation servers (of the platform) issue access tokens to third party clients (applications or websites) with the approval of the resource owner (= end user). The third party client needs the access token to get access to the resources that are stored on the resource server (of the master system).