A guardian gets in by the guardian rule alone; no site cookie outlives its SSO session. Release 0.2.2. #8
Loading…
Reference in a new issue
No description provided.
Delete branch "guardian-only-by-guardian-rule"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes two findings of the ADR 0007 quality check.
A guardian gets in by the guardian rule alone. Before, a guardian's login counted as "any account", so a guardian of one pupil got into every other pupil's
authenticatedsite (and into any site whose audience claim the token happened to carry), also with guardians switched off there.roles(orclaimPaths) holdguardianRole(new, defaultaivopod:guardian) or its token carriesguardianClaimPathat all.k: 'g';admitslets it in only when the site takes guardians and the owner is one of its children. A guardian without children admits nowhere.No site cookie outlives its SSO session. The SSO session now keeps its end; a ticket's cookie gets
min(now + ttl, session end). Before, a cookie issued late in a guardian's 2 h session got a fresh 2 h, so a revoked guardian kept access up to about 4 h (8 h + 8 h for normal sessions).Upgrade note: site cookies are signed under a new purpose (
site2); cookies of 0.2.1 and older cannot tell a guardian apart and are not accepted, so everyone signs in once more.Also:
subjectHashis exported fromaccess.tswith a fixed test vector (https://login.example.org+student-1→UH-RUVt2gJYjVNsnfR4RLc) that the Sites pack pins too; the tests' guardian claims have Aivopod's real shape (groups: ['aivopod:sites-gate'],roles,aivopod_guardian_of); README and example config describeguardianRole.Tests: 19 passed (5 new: guardian refused on
authenticated, claim-audience, plain and other-pupil sites and admitted on both of the child's; claim-only guardian; childless guardian; cookie capped at the SSO session for guardians and normal logins; role found inroleswithclaimPaths: ["groups"]; hash vector).Release 0.2.2.
🤖 Generated with Claude Code