Data plane signaling (OAuth2 token exchange): a token exchange and a JWKS fetch on every signaling request
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- java
- Ambito
- authentication, backend
Direzione di ricerca
Start in data-plane-signaling-oauth2-token-exchange, especially Oauth2TokenExchangeSignalingAuthorization.evaluate and isAuthorized, then read Oauth2ClientImpl and JwksPublicKeyResolver for token expiry and resolver caching behavior. Implement bounded token reuse keyed by exchange parameters and subject token, plus reuse of JWKS resolvers with configurable validity. Done means repeated requests reuse valid cached credentials and keys, expired or changed credentials refresh appropriately, and the cache setting can preserve per-request exchanges.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Feature Request
Cache what the oauth2_token_exchange signaling authorization obtains over the network:
- the exchanged token, on the sending side;
- the counter-party's JWKS, on the receiving side.
Which Areas Would Be Affected?
data-plane-signaling-oauth2-token-exchange: Oauth2TokenExchangeSignalingAuthorization.
Why Is the Feature Desired?
Sending side (evaluate). Every signaling call from the controlplane to a data plane (prepare, start, suspend,
terminate) first exchanges the workload credential for a token at the token exchange endpoint. That is a synchronous
HTTP round trip on the state machine worker, before the signaling call itself. The Javadoc says this is deliberate:
"Exchanged tokens are not cached: every signaling request triggers a fresh exchange". As a result:
- every signaling step costs two round trips instead of one;
- the token exchange service gets the same request rate as the data plane;
- a worker of the transfer state machine waits for both calls. With the NATS task-based state machines, throughput is roughly workers ÷ step round trip, so the extra round trip lowers the ceiling directly.
In a load test (single runtime hosting provider and consumers, 40 negotiation+transfer flows/s, 16 transfer workers), a thread dump showed 7 of the 16 transfer workers inside Oauth2ClientImpl.requestToken, called from Oauth2TokenExchangeSignalingAuthorization.obtainToken, for prepare, start and terminate.
Receiving side (isAuthorized). For every incoming signaling request (data plane → controlplane callbacks), the
authorization builds a new JwksPublicKeyResolver with JwksPublicKeyResolver.create(keyParserRegistry, jwksUri, monitor), the factory without a cache. So every callback fetches the JWKS over HTTP before the token can be verified.
Solution Proposal
- Cache exchanged tokens in
evaluate.- Key: the exchange parameters (
tokenExchangeEndpoint,resource,audience,scope) plus the subject token (or its hash), so that a rotated workload credential (e.g. a projected ServiceAccount token) results in a new exchange. - Lifetime: the token's
expires_in, whichOauth2ClientImplalready parses into
TokenRepresentation.expiresIn, minus a safety margin (e.g. 10–30 s or a fraction of the lifetime). Tokens withoutexpires_inare not cached, which is the current behavior. - Bounded size (LRU), since the key includes per-data-plane values.
- Opt-in or opt-out setting: e.g.
edc.signaling.oauth2.tokenexchange.cache.enabled, for deployments that want one token per request.
- Key: the exchange parameters (
- Reuse the JWKS resolver in
isAuthorized: keep oneJwksPublicKeyResolverperjwksUri, created with
create(keyParserRegistry, jwksUrl, monitor, cacheValidityMs), so that keys are cached and refreshed through the NimbusJWKSource(rate limiting, refresh-ahead). Make the validity configurable, as other JWKS consumers in EDC do.
- Lingua principale
- Java
- Stelle
- 429
- Fork
- 302
- Merge medio
- 10h 46m
- PR unite (30g)
- 75
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di eclipse-edc/Connector
-
triage
Difficoltà 4/5 3-5 giorni Idoneità per principianti 54/100
eclipse-edc/Connector#6293 ·
I maintainer di solito rispondono entro 1 giorno
-
Implement conditional extension loading (DR 2026-11-24)Forse già presa @paullatzelsperger l’ha presa 5 giorni fa. Apertafeature_request triage
eclipse-edc/Connector#6275 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
feature_request stale triage
Difficoltà 5/5 Più di una settimana Idoneità per principianti 18/100
eclipse-edc/Connector#6235 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Don't hold a DB connection during token validation of incoming negotiation and transfer messagesApertafeature_request triage
Difficoltà 4/5 3-5 giorni Idoneità per principianti 54/100
eclipse-edc/Connector#6183 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
feature_request triage
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
eclipse-edc/Connector#6182 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di eclipse-edc/Connector
Issue simili
-
triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
eclipse-edc/IdentityHub#1296 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
cloudfoundry/uaa#4194 ·
I maintainer di solito rispondono entro 1 giorno
-
ui: 進捗状況線ダイアログが日本語表示で英語のままApertaarea: ui priority: medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
tetsuji16/microProject#1721 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 2 giorni
-
The engine's "loaded, but had errors" message leaves out which library and line each error is inAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
cqframework/clinical_quality_language#1980 ·
I maintainer di solito rispondono entro 3 giorni