[PR #7931] [MERGED] feat(scim): introduce ownership model for SCIM #24533

Closed
opened 2026-04-15 22:25:01 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/7931
Author: @jonathansamines
Created: 2/11/2026
Status: Merged
Merged: 2/12/2026
Merged by: @himself65

Base: canaryHead: feat/scim-provider-owner


📝 Commits (1)

  • 3534219 feat(scim): introduce ownership model for SCIM

📊 Changes

5 files changed (+322 additions, -45 deletions)

View changed files

📝 docs/content/docs/plugins/scim.mdx (+56 -0)
📝 packages/scim/src/index.ts (+9 -0)
📝 packages/scim/src/routes.ts (+54 -45)
📝 packages/scim/src/scim.management.test.ts (+195 -0)
📝 packages/scim/src/types.ts (+8 -0)

📄 Description

Summary by cubic

Add optional ownership for SCIM provider connections. When enabled, tokens are tied to their creator and all management endpoints enforce owner or org membership.

  • New Features

    • New option: scim({ providerOwnership: { enabled: true } }) (default false).
    • Conditionally adds userId to scimProvider; generateSCIMToken stores the creator’s userId.
    • Access rules: org providers require current org membership; personal providers require the owner when userId exists; unowned personal providers remain accessible.
    • listSCIMProviderConnections returns org providers where the user is a member, owned personal providers for the owner, and unowned providers.
    • Docs updated with setup, option details, and schema changes.
  • Migration

    • After enabling providerOwnership: npx @better-auth/cli migrate and npx @better-auth/cli generate.
    • Ensure scimProvider includes an optional userId (string) column.

Written for commit 35342192c0. Summary will update on new commits.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/7931 **Author:** [@jonathansamines](https://github.com/jonathansamines) **Created:** 2/11/2026 **Status:** ✅ Merged **Merged:** 2/12/2026 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `feat/scim-provider-owner` --- ### 📝 Commits (1) - [`3534219`](https://github.com/better-auth/better-auth/commit/35342192c056557e459bd82ac8754bf1876231d3) feat(scim): introduce ownership model for SCIM ### 📊 Changes **5 files changed** (+322 additions, -45 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/plugins/scim.mdx` (+56 -0) 📝 `packages/scim/src/index.ts` (+9 -0) 📝 `packages/scim/src/routes.ts` (+54 -45) 📝 `packages/scim/src/scim.management.test.ts` (+195 -0) 📝 `packages/scim/src/types.ts` (+8 -0) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Add optional ownership for SCIM provider connections. When enabled, tokens are tied to their creator and all management endpoints enforce owner or org membership. - New Features - New option: scim({ providerOwnership: { enabled: true } }) (default false). - Conditionally adds userId to scimProvider; generateSCIMToken stores the creator’s userId. - Access rules: org providers require current org membership; personal providers require the owner when userId exists; unowned personal providers remain accessible. - listSCIMProviderConnections returns org providers where the user is a member, owned personal providers for the owner, and unowned providers. - Docs updated with setup, option details, and schema changes. - Migration - After enabling providerOwnership: npx @better-auth/cli migrate and npx @better-auth/cli generate. - Ensure scimProvider includes an optional userId (string) column. <sup>Written for commit 35342192c056557e459bd82ac8754bf1876231d3. Summary will update on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-15 22:25:01 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#24533