zitadel/internal/user/model
Livio Spring 9ec9ad4314
feat(oidc): sid claim for id_tokens issued through login V1 (#8525)
# Which Problems Are Solved

id_tokens issued for auth requests created through the login UI
currently do not provide a sid claim.
This is due to the fact that (SSO) sessions for the login UI do not have
one and are only computed by the userAgent(ID), the user(ID) and the
authentication checks of the latter.

This prevents client to track sessions and terminate specific session on
the end_session_endpoint.

# How the Problems Are Solved

- An `id` column is added to the `auth.user_sessions` table.
- The `id` (prefixed with `V1_`) is set whenever a session is added or
updated to active (from terminated)
- The id is passed to the `oidc session` (as v2 sessionIDs), to expose
it as `sid` claim

# Additional Changes

- refactored `getUpdateCols` to handle different column value types and
add arguments for query

# Additional Context

- closes #8499 
- relates to #8501
2024-09-03 13:19:00 +00:00
..
address.go chore(v2): move to new org (#3499) 2022-04-26 23:01:45 +00:00
email.go fix: make user creation errors helpful (#5382) 2023-03-14 19:20:38 +00:00
external_idp_view.go refactor(fmt): run gci on complete project (#7557) 2024-04-03 10:43:43 +00:00
external_idp.go chore(v2): move to new org (#3499) 2022-04-26 23:01:45 +00:00
notify_user.go chore(v2): move to new org (#3499) 2022-04-26 23:01:45 +00:00
otp.go fix: commandside queries (#1313) 2021-02-22 14:08:47 +01:00
password.go chore(v2): move to new org (#3499) 2022-04-26 23:01:45 +00:00
phone.go fix: make user creation errors helpful (#5382) 2023-03-14 19:20:38 +00:00
profile.go fix: return absolute url for avatar in user sessions (#3724) 2022-05-30 11:27:52 +00:00
refresh_token_view.go refactor(fmt): run gci on complete project (#7557) 2024-04-03 10:43:43 +00:00
refresh_token.go chore(v2): move to new org (#3499) 2022-04-26 23:01:45 +00:00
token_view.go refactor(fmt): run gci on complete project (#7557) 2024-04-03 10:43:43 +00:00
token.go chore(v2): move to new org (#3499) 2022-04-26 23:01:45 +00:00
user_changes.go chore(deps): upgrade all go modules (#6895) 2023-11-13 10:41:29 +00:00
user_membership_view.go refactor(fmt): run gci on complete project (#7557) 2024-04-03 10:43:43 +00:00
user_session_view.go feat(oidc): sid claim for id_tokens issued through login V1 (#8525) 2024-09-03 13:19:00 +00:00
user_view.go refactor: cleanup unused code (#7130) 2024-01-02 14:26:31 +00:00