Skip to content

feat(sso): the admin group makes its members admins in one organisation - #322

Merged
iheitlager merged 3 commits into
mainfrom
feat/sso-admin-group
Nov 14, 2026
Merged

iheitlager merged 3 commits into
mainfrom
feat/sso-admin-group

Conversation

@iheitlager

Copy link
Copy Markdown
Member

Summary

  • Members of one identity-provider group (FRANK_SSO_ADMIN_GROUP, e.g. Okta frank-admins) are admins in one organisation (FRANK_SSO_ADMIN_ORGANISATION, e.g. sbp), from their first sign-in; leaving the group takes back the role it gave.
  • Needed on STACKIT (test-frank#2): sbplabs Okta sends email_verified: false, so linking a pre-created user is refused; with the group nobody has to be created in advance.
  • ADR-026 supersedes ADR-020 decision 5's "SSO never grants a role" for this one mapping.

Changes

Added

  • sso.rs: the two settings (both or neither, and only with the other SSO settings); the ID token's groups claim; the callback applies the group before the session starts and audits role_granted / role_revoked.
  • store/participants.rs: sync_admin_group (split into group_may_change, grant_admin, revoke_admin for CCN); table sso_roles, created in files that lack it.
  • serve.rs, cli.rs: --sso-admin-group, --sso-admin-organisation; the organisation must exist at start.
  • deploy/stackit: sso_admin_group, sso_admin_organisation, with a precondition.
  • ADR-026, spec 012 requirement 9, README.

Changed

  • set_role clears the group's mark: a role set by hand is the command line's. remove_user clears it too.

Changelog

  • SSO admin group (feat(sso): Okta group frank-admins makes its members admins in the core organisation #321, ADR-026): with FRANK_SSO_ADMIN_GROUP and FRANK_SSO_ADMIN_ORGANISATION, members of that provider group are admins in that organisation from their first sign-in; leaving the group takes back the role it gave. Roles set with the command line are never touched. Audit lines role_granted and role_revoked. deploy/stackit: sso_admin_group and sso_admin_organisation.

Testing

  • Store: new member granted; leave and rejoin; superadmin, hand-set admin and machine untouched; removal clears the mark
  • Config: both or neither, not without SSO
  • End to end (tests/sso.rs): a signed ID token with groups → core + admin; without → back to the partner organisation, role gone; audit lines
  • make lint, make test, make check-assurance, lizard CCN ≤ 15 on the changed files
  • deploy/stackit: tofu validate, template rendered with the admin group

Related Issues

Closes #321


🤖 Generated with Claude Code

iheitlager and others added 3 commits November 14, 2026 19:58
…on (#321)

FRANK_SSO_ADMIN_GROUP and FRANK_SSO_ADMIN_ORGANISATION (both or
neither; the organisation must exist at start). The ID token's groups
claim is read into the identity. At every sign-in, before the session:
a member without a role, or with the one the group gave, is moved to
the admin organisation and made admin; a user who has left the group
loses that role and goes back to FRANK_SSO_ORGANISATION. Roles set by
hand are never touched, and setting one by hand clears the mark. The
marks live in a new table, sso_roles, added like ADR-017's tables.
Audit lines role_granted and role_revoked, by sso.

ADR-026 supersedes ADR-020 decision 5's "SSO never grants a role" for
this one mapping; spec 012 requirement 9; README; deploy/stackit takes
sso_admin_group and sso_admin_organisation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
make mcdc-obligations: the decisions in sso.rs and participants.rs moved.
make test-mcdc: 48/48 decisions of two or more conditions covered.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@iheitlager
iheitlager merged commit b6cc4dc into main Nov 14, 2026
6 checks passed
@iheitlager
iheitlager deleted the feat/sso-admin-group branch November 14, 2026 19:16
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.

feat(sso): Okta group frank-admins makes its members admins in the core organisation

1 participant