From 1ada1b8c8a17d88d1daa5db1bb513094d6a7dc39 Mon Sep 17 00:00:00 2001 From: Nikos Sklikas Date: Tue, 13 Oct 2026 14:19:05 +0300 Subject: [PATCH] feat: add privileged_session_max_age to the kratos_info library 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. --- lib/charms/kratos/v0/kratos_info.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/charms/kratos/v0/kratos_info.py b/lib/charms/kratos/v0/kratos_info.py index 384fe531..125973ff 100644 --- a/lib/charms/kratos/v0/kratos_info.py +++ b/lib/charms/kratos/v0/kratos_info.py @@ -54,7 +54,7 @@ def some_event_function(): # Increment this PATCH version before using `charmcraft publish-lib` or reset # to 0 if you are raising the major API version -LIBPATCH = 6 +LIBPATCH = 7 RELATION_NAME = "kratos-info" INTERFACE_NAME = "kratos_info" @@ -100,6 +100,7 @@ def send_info_relation_data( oidc_webauthn_sequencing_enabled: bool, verification_enabled: bool, feature_flags: Optional[list[str]] = None, + privileged_session_max_age: Optional[str] = None, ) -> None: """Updates relation with endpoints, config and configmaps info.""" if not self._charm.unit.is_leader(): @@ -123,6 +124,8 @@ def send_info_relation_data( if feature_flags: info_databag["feature_flags"] = ",".join(feature_flags) + if privileged_session_max_age: + info_databag["privileged_session_max_age"] = privileged_session_max_age for relation in relations: relation.data[self._charm.app].update(info_databag)