【发布时间】:2018-11-13 06:30:44
【问题描述】:
我正在尝试在 Windows 机器上安装 shibboleth IDP 和 SP。我的目标是使用 mysql 而不是 LDAP。找不到任何相关来源。请帮忙!
【问题讨论】:
标签: shibboleth
我正在尝试在 Windows 机器上安装 shibboleth IDP 和 SP。我的目标是使用 mysql 而不是 LDAP。找不到任何相关来源。请帮忙!
【问题讨论】:
标签: shibboleth
如果您询问如何配置 Shibboleth IdP 以提供从 MySQL 源派生的属性,您可以使用 <DataConnector> 元素。下面的例子在mysqldb.example.com处连接数据库shibboleth,并定义属性sn:
# In the file attribute-resolver.xml (version 3.3 of Shibboleth Idp)
<AttributeDefinition
xmlns="urn:mace:shibboleth:2.0:resolver:ad"
xsi:type="Simple" id="sn" sourceAttributeID="sn">
<Dependency ref="mysqlconnector" />
<AttributeEncoder xsi:type="SAML2String"
xmlns="urn:mace:shibboleth:2.0:attribute:encoder"
name="urn:oid:2.5.4.4" friendlyName="sn" />
</AttributeDefinition>
<DataConnector id="mysqlconnector" xsi:type="RelationalDatabase">
<ApplicationManagedConnection
jdbcDriver="com.mysql.jdbc.Driver"
jdbcURL="jdbc:mysql://mysqldb.example.com/shibboleth"
jdbcUserName="username"
jdbcPassword="password" />
<QueryTemplate>
<![CDATA[
SELECT sn
FROM users
WHERE userid='$resolutionContext.principal'
]]>
</QueryTemplate>
</DataConnector>
请注意,以上内容适用于 Shibboleth Idp 3.3 版;如需更多信息,请参阅the Shibboleth RelationalDatabaseConnector documentation。
【讨论】: