Access Control
This page details how to obtain the authorisation to access EBSI APIs.
The Authorisation Service is a core EBSI service responsible for managing access to protected EBSI services. To receive a short-lived access token with a two-hour lifespan, a legal entity must present a valid Verifiable Authorisation or Verifiable Accreditation in the form of a Verifiable Presentation (VP). The access token's scope is limited and corresponds to the specific authorisations of the legal entity.
Consult the Authorisation Service page for API instructions on how to obtain an access token.
Users obtain access tokens by presenting a valid EBSI Verifiable Credential and proving ownership over their DID.
During the onboarding process, when a user does not yet have ownership of a DID,
presenting a VerifiableAuthorisationToOnboard is sufficient.
The Authorisation Service utilises the following capabilities:
- Authorisation Server discovery via the /.well-known/openid-configuration
- OpenID for Verifiable Presentations capabilities (1.0 final, DCQL)
- OIDC capabilities (v1.0)
The Authorisation Service implements the OpenID4VP 1.0 (final) grant, which uses a
DCQL query. The legacy OpenID4VP draft 14 grant (Presentation Exchange, with a
Presentation Definition and a presentation_submission) is no longer supported: the
/auth/presentation-definitions endpoint has been removed, and a compact-JWS vp_token is
rejected with invalid_request. See the migration guide.
The EBSI Platform differentiates between identified and anonymous users, each with a unique set of intents.
- Identified users are legal entities that utilise the trusted registries - the DID Registry and Issuers Registry.
- Anonymous users only have access to read public information, allowing them to call all the REST endpoints, but not the Ledger Service's JSON-RPC endpoint when the invoked method is not public.
Mechanism
Within EBSI, DIDs serve as identity identifiers. Proof of DID ownership is established via the exchange of Verifiable Presentations.
Access management is divided into two components:
-
Endpoint protection - Filters intents to manage access.
-
Entity protection - Applies business logic-based rules.
Please note, access is always intent-based, which is manifested as an OAuth 2.0 scope.
The scope value is openid followed by one or more space-separated scope tokens. Each token conforms to
the pattern <registry>:<action>, optionally suffixed with :<0x-address> to target a specific contract
instance instead of the environment's default. The address must be 0x followed by 40 hexadecimal
characters (no un-prefixed or ICAP form), and a mixed-case address must carry a valid EIP-55 checksum.
Scopes, actors, registries and policies
Each identified scope has unique Verifiable Presentation requirements, which the client obtains from the DCQL query endpoint. The following scopes are supported:
- SCOPES
| Intent | Scope | Combinable | Holder DID method | Description |
|---|---|---|---|---|
| Register a DID document | did-registry:invite | No | did:ebsi | Onboarding: allows insertDidDocument for a DID that is not registered yet |
| Update a DID document | did-registry:write | Yes | did:ebsi | Grants write access to the DID Registry for an already registered DID |
| Accept an accreditation | issuers-registry:invite | No | did:ebsi | Onboarding: allows a new Trusted Issuer to register its first accreditation |
| Manage Issuers Registry content | issuers-registry:write | Yes | did:ebsi | Grants write access to the Issuers Registry for a Trusted Issuer |
| Invoke a trusted smart contract | ledger:invoke | No | did:ebsi or did:key | Allows invoking functions on an allowlisted contract |
| Manage policies | policies-registry:write | Yes | did:ebsi | Grants write access to the Policies Registry |
| Manage schemas | schemas-registry:write | Yes | did:ebsi | Grants write access to the Schemas Registry |
| Create timestamps | timestamp:write | Yes | did:ebsi | Grants write access to the Timestamp contract |
| Authorise a Track and Trace DID | track-and-trace:authorise | No | did:ebsi | Allows a Track and Trace administrator to call authoriseDid |
| Create Track and Trace documents | track-and-trace:create | Yes | did:ebsi | Allows an allowlisted creator to create documents |
| Write Track and Trace events/access | track-and-trace:write | Yes | did:ebsi or did:key | Allows writing events and managing access on existing documents |
Unrecognised scopes will return an error. When several scopes are combined, the holder's DID method must be allowed by every requested scope.
- ACTORS
| Abbreviation | Term | Description |
|---|---|---|
| EBSI SO | EBSI Support Office | Technical support team within EBSI |
| RTAO | Root Trusted Accreditation Organisation | Entity that issues Verifiable Accreditations for Trusted Accreditation Organisations |
| TAO | Trusted Accreditation Organisation | Entity that issues Verifiable Accreditations (Accreditations, Attestations and Authorisations) to legal entities |
| TI | Trusted Issuer | Legal Entity with one or more accreditations. Accredited to accredit, attest or authorise |
| Deployer | Smart contract deployer | Legal Entity recorded as the deployer of a contract in the Contracts Registry (see ledger:invoke) |
- REGISTRIES
| Name | Role |
|---|---|
| DID Registry | Stores registered DIDs |
| Issuers Registry | Stores registered accreditations from TIs |
| Policies Registry | Stores policies and user attributes (e.g. TrackAndTrace:authoriseDid) |
| Schemas Registry | Stores data schemas |
| Timestamp | Stores timestamped hashes and records |
| Track and Trace | Stores documents, events and access rights |
| Contracts Registry | Stores the contracts that can be invoked with ledger:invoke and their deployer |
- POLICIES
The scope is checked twice: when the access token is issued (token-time checks) and when a transaction is submitted to the Ledger API, which only accepts the functions listed for the scope.
| Scope | Required Verifiable Credential | Token-time checks | Allowed functions |
|---|---|---|---|
did-registry:invite | VerifiableAuthorisationToOnboard | The DID is not registered yet. The VP JWT header carries a jwk matching the jwkThumbprint of the credential; its thumbprint is bound to the token (cnf.jkt). The key must be secp256k1 (ES256K). | insertDidDocument, only for AT.sub == did, with vMethodId, publicKey and the transaction signer matching the bound key |
did-registry:write | SelfAttestation | The holder is a registered did:ebsi and proves control of its key. No Trusted Issuer status is required. | addController, addVerificationMethod, addVerificationRelationship, expireVerificationMethod, revokeController, revokeVerificationMethod, rollVerificationMethod, updateBaseDocument |
issuers-registry:invite | VerifiableAuthorisationForTrustChain, VerifiableAccreditationToAttest or VerifiableAccreditationToAccredit | The holder is registered in the Issuers Registry and has no accreditation yet. | setAttributeData, only for AT.sub == did |
issuers-registry:write | SelfAttestation | The holder is registered in the Issuers Registry and already has accreditations. | addIssuerProxy, removeIssuerProxy, setAttributeData, setAttributeMetadata, updateIssuerProxy |
ledger:invoke | VerifiableAuthorisationToInvoke | Each credentialSubject.contractAddress is an active contract in the Contracts Registry whose deployer is the credential issuer. The token carries these addresses in authorization_details. | Any function on the allowlisted contract(s). At submission, the transaction must target a listed address, the signer must control the token subject, and the contract must still be active with the same deployer DID |
policies-registry:write | SelfAttestation | The holder is a registered did:ebsi and proves control of its key. Permissions are enforced on-chain. | activatePolicy, deactivatePolicy, deleteUserAttributes, insertPolicy, insertUserAttributes, updatePolicy |
schemas-registry:write | SelfAttestation | The holder is a registered did:ebsi and proves control of its key. Permissions are enforced on-chain. | insertSchema, updateMetadata, updateSchema |
timestamp:write | SelfAttestation | The holder is a registered did:ebsi and proves control of its key. Permissions are enforced on-chain. | appendRecordVersionHashes, commitTimestampHashes, detachRecordVersionHash, insertHashAlgorithm, insertRecordOwner, insertRecordVersionInfo, revokeRecordOwner, timestampHashes, timestampRecordHashes, timestampRecordVersionHashes, timestampVersionHashes, updateHashAlgorithm |
track-and-trace:authorise | VerifiableAuthorisationToOnboard | The key that signed the VP (ES256K only) holds the TrackAndTrace:authoriseDid attribute in the Policies Registry. | authoriseDid |
track-and-trace:create | SelfAttestation | The holder DID is allowlisted as a Track and Trace document creator. | commitCreateDocument, createDocument |
track-and-trace:write | SelfAttestation | The holder DID has an access in Track and Trace (creator, write or delegate). | grantAccess, removeDocument, revokeAccess, writeEvent |
DCQL Query
The OpenID4VP 1.0 (final) grant uses a DCQL (Digital
Credentials Query Language) query, as defined in
OpenID4VP 1.0 (final) §6.
A GET HTTP endpoint is exposed, as defined in openid-configuration under the
dcql_query_endpoint claim, where the client can obtain the DCQL query for the requested scope.
Requests for combined scopes are merged into a single DCQL query.
The response contains the query itself, together with the credential formats and signing algorithms accepted by the service:
{
"client_metadata": {
"vp_formats_supported": {
"jwt_vc_json": {
"alg_values_supported": ["ES256K"]
}
}
},
"dcql_query": {
"credentials": [
{
"id": "did_registry_invite_credential",
"format": "jwt_vc_json",
"require_cryptographic_holder_binding": true,
"meta": {
"type_values": [["VerifiableAuthorisationToOnboard"]]
}
}
]
}
}
jwt_vc_json is the only Credential Format Identifier requested by this API. The example above
is the response for did-registry:invite. alg_values_supported is the algorithm accepted for
the signature of the Verifiable Presentation and depends on the requested scope:
did-registry:inviteandtrack-and-trace:authoriseacceptES256Konly.- All other scopes accept
ES256andES256K.
The vp_formats_supported claim of the OpenID configuration is the union across all scopes, not
a guarantee for each scope.
Compared with the pilot API, the accepted signing algorithms are now defined per scope:
- Presentations are signed with
ES256Kfordid-registry:inviteandtrack-and-trace:authorise, and withES256orES256Kfor every other scope. In the pilot API,ES256was accepted forissuers-registry:invite,issuers-registry:write,policies-registry:writeandschemas-registry:writeonly. - Credentials accept
ES256andES256Kfor every scope requiring a credential. In the pilot API, they acceptedES256only. EdDSAis rejected by the token endpoint, even though presentation verification itself would accept it.- Scope merging no longer narrows the accepted set. In the pilot API, a combined request resolved to the intersection of the requested scopes.
- CREDENTIAL QUERIES
Four scopes request a credential of a specific type. The remaining seven, which correspond to the combinable scopes, request a single shared self-attestation credential.
| Scope | Credential query id | Requested credential type |
|---|---|---|
did-registry:invite | did_registry_invite_credential | VerifiableAuthorisationToOnboard |
issuers-registry:invite | issuers_registry_invite_credential | VerifiableAuthorisationForTrustChain, VerifiableAccreditationToAttest or VerifiableAccreditationToAccredit |
ledger:invoke | ledger_invoke_credential | VerifiableAuthorisationToInvoke |
track-and-trace:authorise | track_and_trace_authorise_credential | VerifiableAuthorisationToOnboard |
did-registry:write, issuers-registry:write, timestamp:write, track-and-trace:create, track-and-trace:write, policies-registry:write, schemas-registry:write | self_attestation_credential | SelfAttestation |
- SELF-ATTESTATION CREDENTIAL
DCQL cannot express the absence of a credential requirement, since credentials must be a
non-empty array. The seven combinable scopes, which require no third-party credential, therefore
present a single shared, self-issued SelfAttestation credential.
The credential is issued by the holder to itself. Both iss and vc.issuer are set to the holder's
own DID, as are sub and credentialSubject.id. It declares no termsOfUse and asserts no
third-party trust claim, and is consequently exempt from the Issuers Registry trusted-issuer lookup.
As the shared verification pipeline structurally validates every embedded credential against the
EBSI Verifiable Attestation schema, the credential must nonetheless be structurally complete.
The id, issuanceDate, issued, validFrom and credentialSchema properties are therefore all
required, despite the credential serving only as a placeholder.
Requesting several of these scopes together results in a single credential requirement rather than one per scope.
The self-attestation credential is verified against the holder's capabilityInvocation
verification relationship rather than assertionMethod. A newly onboarded did:ebsi grants its
first key only the capabilityInvocation and authentication relationships, so requiring
assertionMethod would prevent the credential from being presented until a separate,
did-registry:write-scoped addVerificationRelationship transaction had been performed.
- VP TOKEN
The vp_token is a JSON-encoded object keyed by DCQL credential-query id, per
OpenID4VP 1.0 (final) §8.1.
presentation_submission must be omitted:
{
"self_attestation_credential": [
"eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6..."
]
}
A legacy compact-JWS vp_token (OpenID4VP draft 14) is rejected with invalid_request.
The Verifiable Presentation JWTs carried by the vp_token must satisfy the following freshness rules:
expis required and at most 300 seconds in the future.iatis required, at most 5 seconds in the future and at most 300 seconds old.nbfis required, andaudmust equal the API base URL (for examplehttps://api-<network>.ebsi.<domain>/v1).nonceis required (a string of at most 256 characters). It is single use per holder DID and is remembered for 5 minutes: a replayed nonce is rejected. If the single use of the nonce cannot be verified, the endpoint answers with HTTP500server_error.
VCDM 2.0 presentations (flat vp+jwt payload with enveloped credentials, @context[0] set to https://www.w3.org/ns/credentials/v2) are only accepted by deployments that enable them. Other deployments reject them with invalid_request and the description VCDM 2.0 presentations are not supported; VCDM 1.1 presentations are always accepted.
Obtaining Access
The authorisation service generates a short-lived, OAuth 2.0 compatible access token derived from the Verifiable Presentation. Due to brief session lifetimes, which are currently defined on a case-by-case basis, refresh tokens are not supported.
Follow this sequence of API calls to request an access token.
-
GET DCQL query: Begin by fetching the DCQL query for the required scope.
-
POST Token Endpoint: Once you have the query, create and submit a
vp_tokenkeyed by the credential-query identifiers specified in the query, as a JSON object.
Combining scopes
The seven combinable scopes (did-registry:write, issuers-registry:write, timestamp:write,
track-and-trace:create, track-and-trace:write, policies-registry:write and
schemas-registry:write) can be requested together in a single space-separated scope, for example
openid did-registry:write issuers-registry:write. Every requested scope must pass its own checks
(logical AND), and the access token grants nothing beyond the sum of the individual scopes.
The remaining scopes (did-registry:invite, issuers-registry:invite, track-and-trace:authorise
and ledger:invoke) require a specific credential and/or add bespoke claims, so each must be
requested alone. A scope can only be requested once per request.
Any scope can be suffixed with :<0x-address> to target a specific contract instance instead of the
environment's default, e.g. did-registry:write:0x.... The address is 0x followed by 40 hexadecimal
characters, with a valid EIP-55 checksum if it is mixed-case. The suffix does not change a scope's
combinability, and duplicates are detected by scope regardless of the suffix: did-registry:write and
did-registry:write:0x... cannot be requested together.
The diagram below captures an interaction between a client and the Authorisation Service.
API Endpoints
OpenID Provider Metadata
Exposes the configuration of the OpenID Provider. For a detailed description of this endpoint, please refer to the documentation here:
OpenID Provider's public keys
Exposes the public keys used by the Authorisation Server. For a detailed description of this endpoint, please refer to the documentation here:
Get DCQL query requirements
Fetches the DCQL query requirements of a scope. For a detailed description of this endpoint, please refer to the documentation here:
Get access token
Users receive access tokens by presenting a valid EBSI Verifiable Credential and proving ownership over their DID. For a detailed description of this endpoint, please refer to the documentation here: