Skip to content

feat: add privileged_session_max_age to the kratos_info library - #772

Merged
nsklikas merged 1 commit into
mainfrom
kratos-info-privileged-session-max-age
Nov 23, 2026
Merged

nsklikas merged 1 commit into
mainfrom
kratos-info-privileged-session-max-age

Conversation

@nsklikas

@nsklikas nsklikas commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

What

kratos_info LIBPATCH 7, the library file alone.

The provider can publish the age of a privileged session (privileged_session_max_age), and the requirer reads it with the rest of the data. The charm on the Istio track publishes the field (#774), and the login UI's charm reads it (canonical/identity-platform-login-ui-operator#543).

Why

With Bring Your Own SSO, the login UI lets a user remove an SSO sign-in from their account (Connected accounts). Kratos does not do this removal: the login UI asks the SSO service, which removes the link through Kratos's admin API. So Kratos does not check the age of the session, and the login UI must do it as Kratos does for its own unlink: a session older than privileged_session_max_age must sign in again first.

The login UI must use the same value as Kratos. With a different value, it asks for a new sign-in where Kratos does not, or it lets an older session remove a sign-in when Kratos refuses the same session for its own unlink. The login UI's charm reads the value from this relation, and it does not enable Bring Your Own SSO without it.

Good to know

  • Nothing changes for this charm on main. The argument is optional: a provider that does not pass it publishes exactly what it published before, and main does not pass it.
  • Why on main. This library has always changed on main first, and main releases it to Charmhub. With the patch on the track only, the next change of the library on main would take the same patch number for other content.
  • Nothing has to merge before this, and it can merge at any time.

Tests

The repository's unit tests and lint pass with the new library file. The field has no test here, because nothing on main uses it; #774 tests it.

@nsklikas
nsklikas force-pushed the kratos-info-privileged-session-max-age branch from b4445d5 to 6e17c8b Compare October 23, 2026 11:57
@nsklikas
nsklikas force-pushed the kratos-info-privileged-session-max-age branch 2 times, most recently from 6fae23b to 0b39cd1 Compare November 19, 2026 13:59
@nsklikas
nsklikas marked this pull request as ready for review November 20, 2026 10:19
@nsklikas
nsklikas requested a review from a team as a code owner November 20, 2026 10:19
@nsklikas
nsklikas force-pushed the kratos-info-privileged-session-max-age branch from 0b39cd1 to c87925b Compare November 20, 2026 12:28
The provider can publish the age of a privileged session, and the requirer
reads it with the rest of the data. The field is optional, so a provider
that does not pass it publishes what it published before. LIBPATCH 7.
@nsklikas
nsklikas force-pushed the kratos-info-privileged-session-max-age branch from c87925b to 1ada1b8 Compare November 23, 2026 14:36
@nsklikas
nsklikas enabled auto-merge November 23, 2026 14:38
@nsklikas
nsklikas merged commit bf1aceb into main Nov 23, 2026
6 checks passed
@nsklikas
nsklikas deleted the kratos-info-privileged-session-max-age branch November 23, 2026 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants