Map SCIM groups to organization teams#2354
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
2 issues found across 5 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
|
Went through this one carefully given it's SCIM provisioning, where tenancy isolation is the property that matters most. The good news: the org scoping is implemented correctly — I traced every Groups operation (list/get/create/replace/patch/delete) and they all resolve the team through an org-filtered lookup, so I couldn't find an IDOR: .where(and(eq(TeamTable.id, teamId), eq(TeamTable.organizationId, input.provider.organizationId)))A token for org A hitting an org-B group id gets a flat 404 (same as nonexistent), so there's no cross-org existence leak either. Members are validated as org members before insert, and the de-dup + unique TeamMember index prevent duplicate rows. PATCH parsing is also solid — op names lowercased, A few things I'd want addressed before merge: 1. The tenancy property has no test. This is the single most important behavior in the PR and the new tests only exercise the pure helpers ( 2. The Groups list ignores 3. Duplicate-name race on replace/patch throws an uncaught 500. Create wraps its insert and maps the unique-constraint violation to 409 via Smaller:
Nice to see the delete path deliberately mirror the canonical app team-delete (SkillHubMember → TeamMember → Team) rather than inventing new cleanup. Mostly hardening + the pagination/error-shape items above. |
Summary
Tests
Reviewer Evidence
No screen recording attached: this is a backend SCIM API change without a UI flow. The commands above cover typechecking, focused SCIM/route policy tests, and the den-api build.