Skip to content

Commit de80434

Browse files
committed
feat(platform-objects): sys_idp_group_mapping names an SSO provider source; translations; changeset
Claude-Session: https://claude.ai/code/session_01ADHkmNwrm1hJ9e7eLARM7n Co-authored-by: Claude <noreply@anthropic.com>
1 parent d87fee1 commit de80434

11 files changed

Lines changed: 66 additions & 40 deletions
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@objectstack/plugin-auth': patch
3+
'@objectstack/platform-objects': patch
4+
---
5+
6+
feat(plugin-auth): an SSO sign-in grants the ordinary permission set its IdP group is mapped to
7+
8+
Clause-②: yes (widening)
9+
Metadata-protocol: none
10+
11+
An enterprise SSO provider (OIDC or SAML, through `@better-auth/sso`) can now drive what its users may do from the groups the identity provider sends at sign-in, through the same `sys_idp_group_mapping` mappings a SCIM connection uses. There is no second mapping model.
12+
13+
- **Where the groups come from.** Set the provider's own claim mapping to fill `groups`: `mapping.extraFields: { groups: 'groups' }` for an OIDC claim named `groups`, or the attribute name an IdP uses for SAML (for example Entra ID's groups claim URI). The value may be one string or a list of strings. A provider whose mapping fills no `groups` behaves as before.
14+
- **Saving a mapping.** `POST /api/v1/auth/admin/scim/set-group-mapping` now also takes `providerId` in place of `connectionId` (exactly one of the two; both is `400 VALIDATION_FAILED` on `providerId`). The grant's organization is the provider's own `organization_id`; a provider that names none, or an unknown provider, is refused `400 VALIDATION_FAILED` on `providerId`. With SSO off the save is refused `503`. The same platform-admin gate and the same organization-boundary judgement apply: administrator sets and every set outside the organization boundary are refused, and without a security service the save is refused `503`. The row is stored with `source_kind: 'sso'` (a new option on `sys_idp_group_mapping.source_kind`) and `source_id` = the provider id.
15+
- **At each sign-in.** Every sign-in through the provider matches each group value against the provider's mappings (by `groupExternalId` when the mapping names one, which suits Entra ID's group object ids, else by exact `groupDisplayName`) and makes the user's grants follow them: a mapped group grants its set in the provider's organization, and a group the user has left loses the set at their next sign-in. A sign-in with no groups removes the grants that provider made earlier. The boundary is asked again before every grant, so a set that becomes an administrator set after its mapping was saved grants nothing, and with no security service nothing is granted. Only grants the provider made (their `reason` names the provider) are ever removed: a grant made by hand, or by SCIM, is never touched. Every write goes through the engine, so the break-glass last-administrator guard still refuses what it refuses elsewhere. If applying the mappings fails, the sign-in still succeeds and the failure is logged at `error`.
16+
- **Deleting a mapping.** `POST /api/v1/auth/admin/scim/delete-group-mapping` removes an SSO mapping and, at once, the grants its provider made of that set in that organization, unless another of the provider's mappings still names that set (then each user's next sign-in decides).

‎packages/platform-objects/src/apps/translations/ar.objects.generated.ts‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2659,14 +2659,15 @@ export const arObjects: NonNullable<TranslationData['objects']> = {
26592659
},
26602660
source_kind: {
26612661
label: "نوع المصدر",
2662-
help: "ما يرسل المجموعة: اتصال SCIM.",
2662+
help: "ما يرسل المجموعة: اتصال SCIM، أو مزوّد SSO عند تسجيل الدخول.",
26632663
options: {
2664-
scim: "اتصال SCIM"
2664+
scim: "اتصال SCIM",
2665+
sso: "مزوّد SSO"
26652666
}
26662667
},
26672668
source_id: {
26682669
label: "معرّف المصدر",
2669-
help: "معرّف اتصال SCIM الذي تصل عبره المجموعة، مثل \"okta-prod\"."
2670+
help: "معرّف اتصال SCIM أو معرّف مزوّد SSO الذي تصل عبره المجموعة، مثل \"okta-prod\"."
26702671
},
26712672
group_external_id: {
26722673
label: "المعرّف الخارجي للمجموعة",
@@ -2682,7 +2683,7 @@ export const arObjects: NonNullable<TranslationData['objects']> = {
26822683
},
26832684
organization_id: {
26842685
label: "المؤسسة",
2685-
help: "المؤسسة التي يتم المنح فيها: المؤسسة المالكة لاتصال SCIM."
2686+
help: "المؤسسة التي يتم المنح فيها: المؤسسة المالكة لاتصال SCIM أو لمزوّد SSO."
26862687
},
26872688
created_at: {
26882689
label: "تاريخ الإنشاء"

‎packages/platform-objects/src/apps/translations/de.objects.generated.ts‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2659,14 +2659,15 @@ export const deObjects: NonNullable<TranslationData['objects']> = {
26592659
},
26602660
source_kind: {
26612661
label: "Quellart",
2662-
help: "Was die Gruppe überträgt: eine SCIM-Verbindung.",
2662+
help: "Was die Gruppe überträgt: eine SCIM-Verbindung oder ein SSO-Anbieter bei der Anmeldung.",
26632663
options: {
2664-
scim: "SCIM-Verbindung"
2664+
scim: "SCIM-Verbindung",
2665+
sso: "SSO-Anbieter"
26652666
}
26662667
},
26672668
source_id: {
26682669
label: "Quell-ID",
2669-
help: "Die ID der SCIM-Verbindung, über die die Gruppe eintrifft, z. B. \"okta-prod\"."
2670+
help: "Die ID der SCIM-Verbindung oder des SSO-Anbieters, über die die Gruppe eintrifft, z. B. \"okta-prod\"."
26702671
},
26712672
group_external_id: {
26722673
label: "Externe Gruppen-ID",
@@ -2682,7 +2683,7 @@ export const deObjects: NonNullable<TranslationData['objects']> = {
26822683
},
26832684
organization_id: {
26842685
label: "Organisation",
2685-
help: "Die Organisation, in der die Berechtigung erteilt wird: die Organisation, der die SCIM-Verbindung gehört."
2686+
help: "Die Organisation, in der die Berechtigung erteilt wird: die Organisation, der die SCIM-Verbindung oder der SSO-Anbieter gehört."
26862687
},
26872688
created_at: {
26882689
label: "Erstellt am"

‎packages/platform-objects/src/apps/translations/en.objects.generated.ts‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2659,14 +2659,15 @@ export const enObjects: NonNullable<TranslationData['objects']> = {
26592659
},
26602660
source_kind: {
26612661
label: "Source Kind",
2662-
help: "What pushes the group: a SCIM connection.",
2662+
help: "What sends the group: a SCIM connection, or an SSO provider at sign-in.",
26632663
options: {
2664-
scim: "SCIM Connection"
2664+
scim: "SCIM Connection",
2665+
sso: "SSO Provider"
26652666
}
26662667
},
26672668
source_id: {
26682669
label: "Source ID",
2669-
help: "The SCIM connection ID the group arrives through, e.g. \"okta-prod\"."
2670+
help: "The SCIM connection ID or the SSO provider ID the group arrives through, e.g. \"okta-prod\"."
26702671
},
26712672
group_external_id: {
26722673
label: "Group External ID",
@@ -2682,7 +2683,7 @@ export const enObjects: NonNullable<TranslationData['objects']> = {
26822683
},
26832684
organization_id: {
26842685
label: "Organization",
2685-
help: "The organization the grant is made in: the organization that owns the SCIM connection."
2686+
help: "The organization the grant is made in: the organization that owns the SCIM connection or the SSO provider."
26862687
},
26872688
created_at: {
26882689
label: "Created At"

‎packages/platform-objects/src/apps/translations/es-ES.objects.generated.ts‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2659,14 +2659,15 @@ export const esESObjects: NonNullable<TranslationData['objects']> = {
26592659
},
26602660
source_kind: {
26612661
label: "Tipo de origen",
2662-
help: "Qué envía el grupo: una conexión SCIM.",
2662+
help: "Qué envía el grupo: una conexión SCIM o un proveedor SSO al iniciar sesión.",
26632663
options: {
2664-
scim: "Conexión SCIM"
2664+
scim: "Conexión SCIM",
2665+
sso: "Proveedor SSO"
26652666
}
26662667
},
26672668
source_id: {
26682669
label: "ID de origen",
2669-
help: "El ID de la conexión SCIM por la que llega el grupo, p. ej. \"okta-prod\"."
2670+
help: "El ID de la conexión SCIM o del proveedor SSO por el que llega el grupo, p. ej. \"okta-prod\"."
26702671
},
26712672
group_external_id: {
26722673
label: "ID externo del grupo",
@@ -2682,7 +2683,7 @@ export const esESObjects: NonNullable<TranslationData['objects']> = {
26822683
},
26832684
organization_id: {
26842685
label: "Organización",
2685-
help: "La organización en la que se concede: la organización propietaria de la conexión SCIM."
2686+
help: "La organización en la que se concede: la organización propietaria de la conexión SCIM o del proveedor SSO."
26862687
},
26872688
created_at: {
26882689
label: "Creado el"

‎packages/platform-objects/src/apps/translations/fr.objects.generated.ts‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2659,14 +2659,15 @@ export const frObjects: NonNullable<TranslationData['objects']> = {
26592659
},
26602660
source_kind: {
26612661
label: "Type de source",
2662-
help: "Ce qui envoie le groupe : une connexion SCIM.",
2662+
help: "Ce qui envoie le groupe : une connexion SCIM, ou un fournisseur SSO à la connexion.",
26632663
options: {
2664-
scim: "Connexion SCIM"
2664+
scim: "Connexion SCIM",
2665+
sso: "Fournisseur SSO"
26652666
}
26662667
},
26672668
source_id: {
26682669
label: "ID de source",
2669-
help: "L’ID de la connexion SCIM par laquelle le groupe arrive, p. ex. \"okta-prod\"."
2670+
help: "L’ID de la connexion SCIM ou du fournisseur SSO par lequel le groupe arrive, p. ex. \"okta-prod\"."
26702671
},
26712672
group_external_id: {
26722673
label: "ID externe du groupe",
@@ -2682,7 +2683,7 @@ export const frObjects: NonNullable<TranslationData['objects']> = {
26822683
},
26832684
organization_id: {
26842685
label: "Organisation",
2685-
help: "L’organisation dans laquelle l’attribution est faite : celle qui possède la connexion SCIM."
2686+
help: "L’organisation dans laquelle l’attribution est faite : celle qui possède la connexion SCIM ou le fournisseur SSO."
26862687
},
26872688
created_at: {
26882689
label: "Créé le"

‎packages/platform-objects/src/apps/translations/ja-JP.objects.generated.ts‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2659,14 +2659,15 @@ export const jaJPObjects: NonNullable<TranslationData['objects']> = {
26592659
},
26602660
source_kind: {
26612661
label: "ソース種別",
2662-
help: "グループを送信するもの:SCIM 接続。",
2662+
help: "グループを送信するもの:SCIM 接続、またはサインイン時の SSO プロバイダー。",
26632663
options: {
2664-
scim: "SCIM 接続"
2664+
scim: "SCIM 接続",
2665+
sso: "SSO プロバイダー"
26652666
}
26662667
},
26672668
source_id: {
26682669
label: "ソース ID",
2669-
help: "グループが届く SCIM 接続の ID(例:\"okta-prod\")。"
2670+
help: "グループが届く SCIM 接続の ID または SSO プロバイダーの ID(例:\"okta-prod\")。"
26702671
},
26712672
group_external_id: {
26722673
label: "グループ外部 ID",
@@ -2682,7 +2683,7 @@ export const jaJPObjects: NonNullable<TranslationData['objects']> = {
26822683
},
26832684
organization_id: {
26842685
label: "組織",
2685-
help: "付与が行われる組織:SCIM 接続を所有する組織。"
2686+
help: "付与が行われる組織:SCIM 接続または SSO プロバイダーを所有する組織。"
26862687
},
26872688
created_at: {
26882689
label: "作成日時"

‎packages/platform-objects/src/apps/translations/pt-BR.objects.generated.ts‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2659,14 +2659,15 @@ export const ptBRObjects: NonNullable<TranslationData['objects']> = {
26592659
},
26602660
source_kind: {
26612661
label: "Tipo de origem",
2662-
help: "O que envia o grupo: uma conexão SCIM.",
2662+
help: "O que envia o grupo: uma conexão SCIM ou um provedor SSO no login.",
26632663
options: {
2664-
scim: "Conexão SCIM"
2664+
scim: "Conexão SCIM",
2665+
sso: "Provedor SSO"
26652666
}
26662667
},
26672668
source_id: {
26682669
label: "ID de origem",
2669-
help: "O ID da conexão SCIM pela qual o grupo chega, por exemplo \"okta-prod\"."
2670+
help: "O ID da conexão SCIM ou do provedor SSO pelo qual o grupo chega, por exemplo \"okta-prod\"."
26702671
},
26712672
group_external_id: {
26722673
label: "ID externo do grupo",
@@ -2682,7 +2683,7 @@ export const ptBRObjects: NonNullable<TranslationData['objects']> = {
26822683
},
26832684
organization_id: {
26842685
label: "Organização",
2685-
help: "A organização em que a concessão é feita: a organização proprietária da conexão SCIM."
2686+
help: "A organização em que a concessão é feita: a organização proprietária da conexão SCIM ou do provedor SSO."
26862687
},
26872688
created_at: {
26882689
label: "Criado em"

‎packages/platform-objects/src/apps/translations/ru.objects.generated.ts‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2659,14 +2659,15 @@ export const ruObjects: NonNullable<TranslationData['objects']> = {
26592659
},
26602660
source_kind: {
26612661
label: "Тип источника",
2662-
help: "Что передаёт группу: подключение SCIM.",
2662+
help: "Что передаёт группу: подключение SCIM или поставщик SSO при входе.",
26632663
options: {
2664-
scim: "Подключение SCIM"
2664+
scim: "Подключение SCIM",
2665+
sso: "Поставщик SSO"
26652666
}
26662667
},
26672668
source_id: {
26682669
label: "ID источника",
2669-
help: "ID подключения SCIM, через которое приходит группа, например \"okta-prod\"."
2670+
help: "ID подключения SCIM или поставщика SSO, через которое приходит группа, например \"okta-prod\"."
26702671
},
26712672
group_external_id: {
26722673
label: "Внешний ID группы",
@@ -2682,7 +2683,7 @@ export const ruObjects: NonNullable<TranslationData['objects']> = {
26822683
},
26832684
organization_id: {
26842685
label: "Организация",
2685-
help: "Организация, в которой выдаётся разрешение: организация, которой принадлежит подключение SCIM."
2686+
help: "Организация, в которой выдаётся разрешение: организация, которой принадлежит подключение SCIM или поставщик SSO."
26862687
},
26872688
created_at: {
26882689
label: "Создано"

‎packages/platform-objects/src/apps/translations/zh-CN.objects.generated.ts‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2659,14 +2659,15 @@ export const zhCNObjects: NonNullable<TranslationData['objects']> = {
26592659
},
26602660
source_kind: {
26612661
label: "来源类型",
2662-
help: "推送该组的来源:SCIM 连接。",
2662+
help: "发送该组的来源:SCIM 连接,或登录时的 SSO 提供方。",
26632663
options: {
2664-
scim: "SCIM 连接"
2664+
scim: "SCIM 连接",
2665+
sso: "SSO 提供方"
26652666
}
26662667
},
26672668
source_id: {
26682669
label: "来源 ID",
2669-
help: "该组经由的 SCIM 连接 ID,例如 \"okta-prod\"。"
2670+
help: "该组经由的 SCIM 连接 ID 或 SSO 提供方 ID,例如 \"okta-prod\"。"
26702671
},
26712672
group_external_id: {
26722673
label: "组外部 ID",
@@ -2682,7 +2683,7 @@ export const zhCNObjects: NonNullable<TranslationData['objects']> = {
26822683
},
26832684
organization_id: {
26842685
label: "组织",
2685-
help: "授权所在的组织:拥有该 SCIM 连接的组织。"
2686+
help: "授权所在的组织:拥有该 SCIM 连接或 SSO 提供方的组织。"
26862687
},
26872688
created_at: {
26882689
label: "创建时间"

0 commit comments

Comments
 (0)