Skip to content

Add account_id to requests - #46

Merged
JonaBenja merged 2 commits into
mainfrom
jona/set_account_id_for_logging
Apr 23, 2026
Merged

Add account_id to requests#46
JonaBenja merged 2 commits into
mainfrom
jona/set_account_id_for_logging

Conversation

@JonaBenja

@JonaBenja JonaBenja commented Apr 23, 2026

Copy link
Copy Markdown

Select the correct claim (this is different for Keycloak vs.Entra) to extract the email address of the user who made the request. This is then added to the request as 'account_id' property. For system accounts, select the app id. If none of the above are present, extract the 'sub' claim as account_id

Note: Er wordt in de tests nog aangenomen dat de sub claim een e-mail adres bevat, maar zowel Keycloak als Entra tokens is het een token. De sub claim wordt wel aangeraden om een user mee te identificeren:

https://learn.microsoft.com/en-us/entra/identity-platform/id-token-claims-reference#use-claims-to-reliably-identify-a-user

Maar dat is out of scope voor deze PR lijkt me?

@JonaBenja JonaBenja changed the title Jona/set account id for logging Add account_id to requests Apr 23, 2026

@pstokkink pstokkink left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏

@JonaBenja
JonaBenja merged commit 86a2bc2 into main Apr 23, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants