APIs for systems, not end users
Digital Twin is never exposed to the end user. API consumers are digital channels, card and payment processors, and equivalent partners. Each consumer is an authenticated, authorized system acting on behalf of end customers.
OpenID Connect — per-microservice authorization
Digital Twin's APIs are never exposed to the end user — only to other microservices, which in turn may be reached by third parties through the bank's own authentication, identification and access-control system. To secure those calls, Digital Twin uses OpenID Connect (for example, Keycloak) to authorize every API call.
This lets the bank control — per microservice — exactly which APIs each client may call. Each microservice authenticates against the OpenID provider and receives a token carrying its granted scopes; Digital Twin validates the token and enforces those restrictions on every request.
Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6...
// validated claims (issued by Keycloak)
{
"iss": "https://id.bank.example/realms/digital-twin",
"azp": "ach-processor", // calling microservice
"scope": "tx:post:ach balances:read", // APIs this service may call
"exp": 1782226800
}
The call above may only post ACH transactions and read balances. Calling any API outside its scope returns 403.