Skip to main content

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.

info

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:

Supported OpenID4VP grants

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
IntentScopeCombinableHolder DID methodDescription
Register a DID documentdid-registry:inviteNodid:ebsiOnboarding: allows insertDidDocument for a DID that is not registered yet
Update a DID documentdid-registry:writeYesdid:ebsiGrants write access to the DID Registry for an already registered DID
Accept an accreditationissuers-registry:inviteNodid:ebsiOnboarding: allows a new Trusted Issuer to register its first accreditation
Manage Issuers Registry contentissuers-registry:writeYesdid:ebsiGrants write access to the Issuers Registry for a Trusted Issuer
Invoke a trusted smart contractledger:invokeNodid:ebsi or did:keyAllows invoking functions on an allowlisted contract
Manage policiespolicies-registry:writeYesdid:ebsiGrants write access to the Policies Registry
Manage schemasschemas-registry:writeYesdid:ebsiGrants write access to the Schemas Registry
Create timestampstimestamp:writeYesdid:ebsiGrants write access to the Timestamp contract
Authorise a Track and Trace DIDtrack-and-trace:authoriseNodid:ebsiAllows a Track and Trace administrator to call authoriseDid
Create Track and Trace documentstrack-and-trace:createYesdid:ebsiAllows an allowlisted creator to create documents
Write Track and Trace events/accesstrack-and-trace:writeYesdid:ebsi or did:keyAllows 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
AbbreviationTermDescription
EBSI SOEBSI Support OfficeTechnical support team within EBSI
RTAORoot Trusted Accreditation OrganisationEntity that issues Verifiable Accreditations for Trusted Accreditation Organisations
TAOTrusted Accreditation OrganisationEntity that issues Verifiable Accreditations (Accreditations, Attestations and Authorisations) to legal entities
TITrusted IssuerLegal Entity with one or more accreditations. Accredited to accredit, attest or authorise
DeployerSmart contract deployerLegal Entity recorded as the deployer of a contract in the Contracts Registry (see ledger:invoke)

  • REGISTRIES
NameRole
DID RegistryStores registered DIDs
Issuers RegistryStores registered accreditations from TIs
Policies RegistryStores policies and user attributes (e.g. TrackAndTrace:authoriseDid)
Schemas RegistryStores data schemas
TimestampStores timestamped hashes and records
Track and TraceStores documents, events and access rights
Contracts RegistryStores 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.

ScopeRequired Verifiable CredentialToken-time checksAllowed functions
did-registry:inviteVerifiableAuthorisationToOnboardThe 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:writeSelfAttestationThe 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:inviteVerifiableAuthorisationForTrustChain, VerifiableAccreditationToAttest or VerifiableAccreditationToAccreditThe holder is registered in the Issuers Registry and has no accreditation yet.setAttributeData, only for AT.sub == did
issuers-registry:writeSelfAttestationThe holder is registered in the Issuers Registry and already has accreditations.addIssuerProxy, removeIssuerProxy, setAttributeData, setAttributeMetadata, updateIssuerProxy
ledger:invokeVerifiableAuthorisationToInvokeEach 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:writeSelfAttestationThe 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:writeSelfAttestationThe holder is a registered did:ebsi and proves control of its key. Permissions are enforced on-chain.insertSchema, updateMetadata, updateSchema
timestamp:writeSelfAttestationThe 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:authoriseVerifiableAuthorisationToOnboardThe key that signed the VP (ES256K only) holds the TrackAndTrace:authoriseDid attribute in the Policies Registry.authoriseDid
track-and-trace:createSelfAttestationThe holder DID is allowlisted as a Track and Trace document creator.commitCreateDocument, createDocument
track-and-trace:writeSelfAttestationThe 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:invite and track-and-trace:authorise accept ES256K only.
  • All other scopes accept ES256 and ES256K.

The vp_formats_supported claim of the OpenID configuration is the union across all scopes, not a guarantee for each scope.

Signing algorithms

Compared with the pilot API, the accepted signing algorithms are now defined per scope:

  • Presentations are signed with ES256K for did-registry:invite and track-and-trace:authorise, and with ES256 or ES256K for every other scope. In the pilot API, ES256 was accepted for issuers-registry:invite, issuers-registry:write, policies-registry:write and schemas-registry:write only.
  • Credentials accept ES256 and ES256K for every scope requiring a credential. In the pilot API, they accepted ES256 only.
  • EdDSA is 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.

ScopeCredential query idRequested credential type
did-registry:invitedid_registry_invite_credentialVerifiableAuthorisationToOnboard
issuers-registry:inviteissuers_registry_invite_credentialVerifiableAuthorisationForTrustChain, VerifiableAccreditationToAttest or VerifiableAccreditationToAccredit
ledger:invokeledger_invoke_credentialVerifiableAuthorisationToInvoke
track-and-trace:authorisetrack_and_trace_authorise_credentialVerifiableAuthorisationToOnboard
did-registry:write, issuers-registry:write, timestamp:write, track-and-trace:create, track-and-trace:write, policies-registry:write, schemas-registry:writeself_attestation_credentialSelfAttestation

  • 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.

note

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:

  • exp is required and at most 300 seconds in the future.
  • iat is required, at most 5 seconds in the future and at most 300 seconds old.
  • nbf is required, and aud must equal the API base URL (for example https://api-<network>.ebsi.<domain>/v1).
  • nonce is 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 HTTP 500 server_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.

API CALL

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_token keyed 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: