You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5ab851e
Browse filesBrowse the repository at this point in the historyBrowse files
Introduce the backend core for remembering a user's chosen IdP on a
per-SP basis, gated behind two independent opt-ins: an EngineBlock-wide
config flag and the SP's own Manage metadata coin. This replaces, for
opted-in SPs, the existing single global "remember choice" cookie with
a signed-per-entry cookie keyed by SP entityId, so different SPs can
have independent (and independently expiring) remembered IdPs.
Only true/"1" values for the SP metadata coin enable the feature for
that SP; any other value (including "false" or "-1") leaves it
disabled, so a malformed Manage value can never silently turn on
choice-remembering behaviour.
- Coins/ServiceProvider/PushMetadataAssembler gain the
wayf_remember_choice coin (metadata:coin:wayf_remember_choice),
defaulting to false and parsed with strict true-only semantics.
- RememberedIdpCookie encodes/decodes the "rememberedidps" cookie
(deflate + base64 JSON, one {idp, expires} entry per SP entityId),
validates entry shape defensively, drops expired entries on every
read, and prunes down to a configurable maximum (keeping the
highest-expiry entries) only when a new entry is added.
- DiContainerRuntime/EngineBlockBootstrapper bridge the new cookie
service and the per-SP feature flag into the legacy Corto layer.
- SingleSignOn bypasses WAYF using a remembered IdP when the SP has
opted in and the choice is still valid for one of the candidate
IdPs, preserving the existing zero/one-candidate and SSO-notification
shortcuts; the legacy global "rememberchoice" cookie path is now
gated off for SPs using the new per-SP mode instead of double-firing.
- ContinueToIdp persists a checked "remember this choice" selection
into the cookie and normalizes/prunes it on every request regardless
of whether this SP is enrolled, so stale entries age out naturally.
- The WAYF view model, Twig templates and rememberChoice.js are wired
so the per-SP checkbox submits a hidden form field instead of writing
a client-side cookie, leaving the legacy global-cookie behaviour
untouched for SPs that haven't opted in.
Refs: #2065
0 commit comments