OpenID Connect (OIDC)
What is OIDC?
OpenID Connect (OIDC) is an identity layer built on top of the OAuth 2.0 protocol. It enables applications (clients) to verify the identity of end users or services based on authentication performed by an Identity Provider (IdP) and to obtain basic profile information in a secure, standardized way.
In practice, OIDC is used to:
- Authenticate users and services
- Obtain access tokens for calling protected APIs
- Federate identities across different organizations and infrastructures
OIDC is widely used in EOSC, AAI federations, and modern cloud-native services.
How does OIDC work (high level)?
- A client (user application or service) redirects or authenticates against an OIDC Provider.
- The OIDC Provider authenticates the user or service.
- The provider issues one or more tokens:
- ID Token – identity information (who you are)
- Access Token – authorization to access APIs
- (optionally) Refresh Token – obtain new access tokens
- The client sends the access token to a protected API (e.g. the Accounting Service).
- The API validates the token using the issuer’s public keys and claims.
How to get an OIDC token
The exact steps depend on the grant type used. The most common cases are described below.
1. Interactive user authentication
Used by web portals and CLI tools that authenticate a human user.
Typical steps:
- Redirect the user to the OIDC Provider’s
/authorizeendpoint - User logs in via the IdP
- The client exchanges the authorization code at the
/tokenendpoint - The client receives an access token
This flow is suitable for:
- Web applications
- Command-line tools using device or browser-based login
2. Non-interactive authentication
Used by services, daemons, or automated workflows.
In this flow:
- A client authenticates directly to the
/tokenendpoint - Authentication is done using a client ID and client secret (or certificate)
- The OIDC Provider returns an access token
This is the recommended approach for service-to-service communication.
How to Have a Service Account
A service account represents a non-human identity that can authenticate to an OIDC provider using the Client Credentials grant. This is the recommended approach for backend services, automated workflows, pipelines, cron jobs, and other machine-to-machine communication.
For detailed, authoritative instructions, users must follow the official AAI guides:
-
EOSC Core – Registering services with the Core Infrastructure Proxy
-
ENVRI-ID - Registering Services with the ENVRI-ID Infrastructure Proxy
OIDC Providers registered in the Accounting Service
The Accounting Service supports multiple OIDC Providers depending on the deployment environment and logical node.
Notes
- The issuer value must exactly match the
issclaim in the access token - Tokens issued by non-registered issuers will be rejected