Skip to content

docs: add saml idp and nested groups designs - #296

Merged
jaspermayone merged 2 commits into
mainfrom
jaspermayone/104-saml-nested-groups-designs
Nov 17, 2026
Merged

jaspermayone merged 2 commits into
mainfrom
jaspermayone/104-saml-nested-groups-designs

Conversation

@jaspermayone

Copy link
Copy Markdown
Member

Adds two design documents. This PR changes no code.

  • docs/designs/saml-idp.md (saml idp support (db-backed service providers) #104): Weave as a SAML identity provider. A SAML service provider (SP) is an oauth_applications row with a 1:1 saml_service_providers row. v1 supports SP-initiated sign-in only. The signing key is in encrypted credentials. The plan has 3 phases. The EGM review is complete, with one re-audit.
  • docs/designs/nested-groups.md (design: nested groups and a split between teams and app access #294): groups that contain groups, with a closure table, team and access purposes, group_grants, and app owners. The EGM review has not run yet.

An adversarial review found 2 high and 7 medium or low problems. The second commit fixes them:

  • SAML: only a superadmin can create a SAML SP or change its SAML fields, and a new SAML row starts restricted. SAMLRequest has a size cap and an inflate cap. The CSP block does not read a value that the action loads, and the post page allows https: for SP redirects. The rollback hides SAML tiles.
  • Nested groups: all group rights stay with superadmins, as on main today. The waiver rule stays. A move is atomic, a soft-deleted group loses its nestings, and the derived tables cascade on delete.

Open items:

  • Counsel must confirm the 90-day retention for saml_sign_ins.
  • At the start of SAML phase 3, check the shape of the gem setting asserted_attributes_opts.
  • Nested groups: webhooks stay direct-only. A service that syncs a group from group.member_* events does not see effective changes. Decide this before Phase 3.
  • SAML: think about a one-time "Continue to " page on the first sign-in for each member and SP.
flowchart LR
  SP[Service provider] -->|AuthnRequest| E["/saml/sso"]
  E -->|303| R["/saml/sso/resume"]
  R -->|AppAccess check| A{Permitted?}
  A -->|yes| S[Signed Response]
  A -->|no| D[Signed RequestDenied]
  S --> ACS[SP ACS URL]
  D --> ACS
Loading

@jaspermayone
jaspermayone requested a review from a team November 17, 2026 04:18
@jaspermayone
jaspermayone merged commit f3a363d into main Nov 17, 2026
9 checks passed
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.

1 participant