Bitzsoft.Integrations.Scim
1.0.0-alpha.10
dotnet add package Bitzsoft.Integrations.Scim --version 1.0.0-alpha.10
NuGet\Install-Package Bitzsoft.Integrations.Scim -Version 1.0.0-alpha.10
<PackageReference Include="Bitzsoft.Integrations.Scim" Version="1.0.0-alpha.10" />
<PackageVersion Include="Bitzsoft.Integrations.Scim" Version="1.0.0-alpha.10" />
<PackageReference Include="Bitzsoft.Integrations.Scim" />
paket add Bitzsoft.Integrations.Scim --version 1.0.0-alpha.10
#r "nuget: Bitzsoft.Integrations.Scim, 1.0.0-alpha.10"
#:package Bitzsoft.Integrations.Scim@1.0.0-alpha.10
#addin nuget:?package=Bitzsoft.Integrations.Scim&version=1.0.0-alpha.10&prerelease
#tool nuget:?package=Bitzsoft.Integrations.Scim&version=1.0.0-alpha.10&prerelease
Bitzsoft.Integrations.Scim
面向多租户 ToB 场景的 SCIM 2.0 客户端,遵循 RFC 7643 与 RFC 7644,目标框架为
net5.0;net8.0;net10.0。
安装
dotnet add package Bitzsoft.Integrations.Scim
已实现
- User、Group 的读取、搜索、创建、PUT 替换、PATCH 和幂等删除;
ServiceProviderConfig、ResourceTypes、Schemas发现端点;- GET filter/pagination/sort/projection,以及默认保护敏感 filter 的 POST
/.search; - Bulk 请求和逐项响应;
application/scim+json、ETag/If-Match、Retry-After、request id;- Bearer、Basic、API-key header,多租户端点与凭据解析;
- 标准错误到
IntegrationException分类的映射,异常不保留原始正文或detail; - User 企业扩展和未知扩展 schema 的无损 JSON 保留;
- Users/Groups 到 Sync Engine 的 page source。
连接器不限制或截断成功及错误响应正文。宿主若启用 RequestLogging,其默认行为也应 保持完整正文;大小限制只能是明确的可选策略。
注册
services.AddVaultCredentialResolver(); // 宿主实现 IIntegrationCredentialResolver
services.AddBitzsoftScim(
new ScimEndpoint(
new Uri("https://directory.example.com/scim/v2/"),
ScimAuthenticationMode.Bearer));
所有调用都必须携带显式租户上下文:
var context = new ScimRequestContext(
tenantId: "customer-a",
region: "eu",
environment: IntegrationEnvironments.Production,
credentialName: "provisioning");
var users = await client.ListUsersAsync(
context,
new ScimQuery
{
Filter = "active eq true",
Count = 100
},
cancellationToken);
有 filter 时 ScimSearchMode.Auto 默认使用 POST Users/.search,避免员工标识等
查询条件进入 URL、代理和访问日志。只有明确设置 ScimSearchMode.Get 才会将 filter
放入 query string。
每租户端点不同的宿主应实现 IScimEndpointResolver 并调用:
services.AddBitzsoftScim<TenantScimEndpointResolver>();
端点默认强制 HTTPS。只有显式启用时允许 loopback HTTP。默认 HttpClient 禁止自动 重定向,避免 Authorization 被带到非预期 origin。
同步语义与限制
SCIM 没有标准 delta token 或变更 webhook。ScimSyncPageSource 使用以下兼容语义:
- 仅接受
Users、Groupsstream; - 每次运行固定 UTC 上水位;
- 增量 filter 为
meta.lastModified gt 上次水位 and ... le 本次水位; - continuation cursor 只负责当前运行分页,delta cursor 只在最终页提交;
- 资源必须包含
id和meta.lastModified; - 记录版本优先使用
meta.version。
标准 list 无法发现已经删除的资源,因此必须周期性运行 full reconcile。相同
meta.lastModified 下的稳定顺序、PATCH、Bulk、filter、sort、ETag 都取决于服务端
ServiceProviderConfig 与实际契约,首次接入必须在 sandbox 认证。
动态按租户切换客户端证书不由本包伪装支持;mTLS 场景应由宿主为命名 HttpClient
提供受控 HttpMessageHandler,并验证租户到证书的隔离策略。
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 is compatible. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Bitzsoft.Integrations.Compatibility (>= 1.0.0-alpha.10)
- Bitzsoft.Integrations.Core (>= 1.0.0-alpha.10)
- Bitzsoft.Integrations.Sync (>= 1.0.0-alpha.10)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Http (>= 10.0.10)
-
net5.0
- Bitzsoft.Integrations.Compatibility (>= 1.0.0-alpha.10)
- Bitzsoft.Integrations.Core (>= 1.0.0-alpha.10)
- Bitzsoft.Integrations.Sync (>= 1.0.0-alpha.10)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 5.0.0)
- Microsoft.Extensions.Http (>= 5.0.0)
-
net8.0
- Bitzsoft.Integrations.Compatibility (>= 1.0.0-alpha.10)
- Bitzsoft.Integrations.Core (>= 1.0.0-alpha.10)
- Bitzsoft.Integrations.Sync (>= 1.0.0-alpha.10)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Http (>= 10.0.10)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Bitzsoft.Integrations.Scim:
| Package | Downloads |
|---|---|
|
Bitzsoft.Integrations.All
Bitzsoft 第三方集成聚合包 — net5.0 包含传统连接器,net8.0+ 额外包含受上游 TFM 限制的 AI 模块 |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0-alpha.10 | 55 | 7/26/2026 |