madmatt/silverstripe-shibboleth

为 SilverStripe 添加 Shibboleth 单点登录支持

安装: 494

依赖关系: 0

建议者: 0

安全: 0

星标: 1

关注者: 4

分支: 1

开放问题: 2

类型:silverstripe-vendormodule

2.0.0 2022-06-27 14:46 UTC

This package is auto-updated.

Last update: 2024-08-27 19:21:25 UTC


README

扩展了 Silverstripe 4 的 silverstripe-saml 模块,以提供 Shibboleth 特定的绑定,并允许 silverstripe-saml 模块与基于 Shibboleth 的身份提供者 (IdP) 一起使用。

有关如何配置此模块的大部分信息,请参阅 silverstripe-saml 开发者文档。以下列出了 Shibboleth 特定的附加功能。

自定义配置

实现您自己的自定义 SAMLConfiguration

此模块为 SAMLConfService 定义了 SAMLConfiguration 的子类。如果您想扩展它,请确保您扩展 ShibSAMLConfiguration

指定一个自定义属性作为 NameID

某些 Shibboleth 实现将始终显示一个瞬时的 NameID,这意味着它不能用来识别每次相同的用户。如果是这种情况,首先与 IdP 供应商联系 - 最佳选项是让 NameID 以持久格式返回(请参阅 Shibboleth Name Identifiers 文档)。

但是,如果无法更改这一点,您可以指定一个在 SAML 响应中返回的属性,用作 'NameID' 的替代(例如,用于查找用户的唯一值)。

通过添加以下内容到您的 YML 配置来实现

# The below will use the eduPersonPrincipalName attribute to determine the NameID
# See a full list of oid -> 'friendly name' mappings here: https://incommon.org/community-practices-and-standards/object-identifier-registrations/
Madmatt\Shibboleth\SAMLConfiguration:
  nameid_override_attribute: "urn:oid:1.3.6.1.4.1.5923.1.1.1.6"

指定一个自定义 SilverStripe 字段以比较 NameID

默认情况下,Shibboleth 模块不会更改 NameID 与基本模块工作的比较方式(例如,它将在 GUID 列中存储 NameID,并使用该字段查找现有成员)。但是,您可以通过为 shib_unique_identifier_field 配置变量提供一个值来覆盖此行为。

这可能在一个您正在从旧的 SilverStripe auth_external 模块迁移到 Apache mod_shib 模块(默认填充 $_SERVER['REMOTE_USER'])的情况下很有用。

Madmatt\Shibboleth\SAMLConfiguration:
  shib_unique_identifier_field: Email