-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Caching of system users authorization details are broken #1363
Comments
## Description This adds a check to include the system user id in the list of identifiable claims, which is in turn used to generate a cache key for authorization requests on dialog details accesses. ## Related Issue(s) - #1363 ## Verification - [x] **Your** code builds clean without any errors or warnings - [x] Manual testing done (required) - [x] Relevant automated test added (if you find this hard, leave it and we'll help out) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced methods to simplify the retrieval of system user IDs from claims. - Enhanced claims processing to include system user identifiers from authorization details. - **Bug Fixes** - Streamlined logic in handling user ID extraction, improving efficiency. - **Tests** - Added a test to verify the correct extraction of system user identifiers from claims. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
TestFor læringens del ønsker jeg å få til å teste #1363 Jeg har for eksempel testet tidligere at DAGL og REGN for samme org kan lese samme dialog slik at jeg får flere "lest av" på en og samme dialog. Jeg regner med at DAGL er fin å benytte for steg 1. men da at REGN er uegnet for steg 2. for da skal bruker egentlig ikke ha tilgang. Hva slags knytning skal eventuelt bruker i steg 2. ha til samme org som i 1.? Test av denne blir mest for læringAntakelig er denne testet godt nok, særlig siden den er såpass spesifikk. Verdien av å teste denne vil ligge mer i forstå systembruker og autentisering ved å følge oppskriften fra Bjørn her:
Lite å bekrefteSiden feilen allerede er rettet er det heller ingen mulighet for å sette opp et feil-scenario å teste først for å se om man følger rett oppskrift. |
Description
When generating cache keys for system users, the system user id is not part of the list of identifiable claims on which the key is based
Reproduction
Expected behavior
Actual behavior
Additional information
The two requests will have identical cache keys, causing the second request from to hit the cache for the PDP call. This is a security issue, but mitigated by the fact that it must be owned by the same organization.
The text was updated successfully, but these errors were encountered: