Keycloak、Discourse 和 SAML 再一次

我以某种方式配置了 Keycloak 与 Discourse 的 SAML 授权,甚至透明用户创建功能也能正常工作。
但现在在传递用户字段时出现了问题。
我在 Keycloak SAML 中配置了以下字段映射(来源于互联网):


当我登录 Discourse 时,会通过 Keycloak 创建新用户。这是用户在 Keycloak 中的样子:

随后,创建的用户会被同步到 Discourse。以下是带有映射的字段如何传递到 Discourse 的示例:

.............................
<saml:AttributeStatement>
    <saml:Attribute FriendlyName="Email" Name="email" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
        <saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">a.nakhimov@yandex.ru</saml:AttributeValue>
    </saml:Attribute>
    <saml:Attribute FriendlyName="Username" Name="name" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
        <saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">v.pupkin</saml:AttributeValue>
    </saml:Attribute>
</saml:AttributeStatement>
........................

这是提交后在 Discourse 中显示的用户样子:

第 1、3 和 4 项完全正确。但我不满意第 2 项……在 Keycloak 中,用户拥有正常的名字和姓氏。为什么在 Discourse 中只保留了名字的首字母?是否有办法修复这个问题?是否需要在 SAML 中进行其他映射配置?

你设法让它正常工作了吗?