-
Notifications
You must be signed in to change notification settings - Fork 305
Open
Labels
2.0oboThese tasks are related to DAB OBO Delegated Identity implmentation.These tasks are related to DAB OBO Delegated Identity implmentation.
Milestone
Description
- Validate inbound JWT:
- signature
- issuer
- audience (must match DAB)
- expiry
- Extract identity claims:
- use oid when present
- fallback to sub when oid is missing (guest/B2B)
- extract tid
-
Reject request if neither oid nor sub exists → 401
-
Compute authorization‑context hash from permission‑affecting claims
-
Construct cache key exactly as defined:
(oid OR sub) + tid + authorization‑context hash -
Enforce design‑mandated validation rules:
- database-type must be mssql
- database-audience required
- token-cache-duration-minutes set a defaulkt value of 10 within the code.
Acceptance Criteria / Tests
- missing oid+sub → 401
- invalid config fails deterministically
=======================================================`
Implement delegated SQL execution using OAuth2 On‑Behalf‑Of with in‑memory token caching and non‑pooled SQL connections.
-
Acquire SQL access token using AcquireTokenOnBehalfOf
- inbound user JWT as assertion
- scope derived by appending /.default to database-audience
-
Cache SQL tokens in memory only, keyed by cache key from Issue 1
-
Perform early refresh before expiry
-
Do not refresh tokens during an active SQL query
-
Open SQL connections with:
- SqlConnection.AccessToken = delegated SQL token
- pooling disabled
-
Error handling:
- OBO failure → 401
- no fallback to app identity
-
Acceptance Criteria / Testss
- audience correctly converted to /.default
- token reused from cache when valid
- refresh happens only before query
- no refresh during active query
- OBO failure always returns 401
- SQL executes as delegated user
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
2.0oboThese tasks are related to DAB OBO Delegated Identity implmentation.These tasks are related to DAB OBO Delegated Identity implmentation.
Type
Projects
Status
In Progress