0

我正在尝试使用 Identity Server 3 将联合身份验证/单点登录与 Sitecore 集成。请注意,我没有以任何方式使用 Azure Active Directory。

我一直在关注这些页面: http ://blog.baslijten.com/enable-federated-authentication-and-configure-auth0-as-an-identity-provider-in-sitecore-9-0/

https://dhalgara.com/2018/05/01/sitecore-9-integrating-azure-ad-along-with-identity-server-3/

我相信我已经接近了,因为我可以设置出现的登录按钮,将我带到身份服务器进行身份验证。然后我输入用户名/密码,然后它正确地进行身份验证并将我重定向回 Sitecore 登录页面,并出现以下错误:

您无权访问系统。如果您认为这是错误的,请联系系统管理员。

我确认我正在进行身份验证,并且当我进入 Sitecore 的用户管理屏幕时,我发现一些用户的名字很有趣,这些用户的名字一定是通过我提到的登录过程创建的。他们也不是任何角色的一部分,这就是我怀疑我无法登录的原因。

几乎所有网站都提到配置这个 XML 块是关键:

<transformation type="Sitecore.Owin.Authentication.Services.DefaultTransformation, Sitecore.Owin.Authentication">
  <sources hint="raw:AddSource">
    <claim name="x" value="y" />
  </sources>
  <targets hint="raw:AddTarget">
    <claim name="something here" value="Sitecore\Developer" />
  </targets>
  <keepSource>true</keepSource>
</transformation>

但这究竟意味着什么?我检查了我的智威汤逊,我没有返回任何声明,例如“角色”或“ http://schemas.microsoft.com/ws/2008/06/identity/claims/role ”,但这是否有必要为我的用户分配开发人员角色?上面的 X/Y 值应该是什么,“这里的东西”的值应该是什么,以便我的用户成为 Sitecore\Developer 角色(或我想要的其他角色)?

如何确保当我的用户登录时,我可以将他们作为特定组的一部分?

谢谢您的帮助。

4

1 回答 1

0

如果您遇到以下错误,则表示 Identity Server 上的应用程序配置有问题,请检查配置,它可能是重定向 url 或站点主机名。

You do not have access to the system. If you think this is wrong, please contact the system administrator.

建议:重新访问 Identity Server/Azure AD 中的应用配置。

您提到的块基本上是为用户设置角色权限。以下配置将允许您为 Sitecore/Developer Role 设置默认声明。

<transformation name="Transform to Sitecore DEV Role" type="Sitecore.Owin.Authentication.Services.DefaultTransformation, Sitecore.Owin.Authentication">
              <sources hint="raw:AddSource">
                <claim name="groups" value="<GUID>" />
              </sources>
              <targets hint="raw:AddTarget">
                <claim name=__"http://schemas.microsoft.com/ws/2008/06/identity/claims/role" value="Sitecore\Developer" />
                <claim name="__http://schemas.microsoft.com/ws/2008/06/identity/claims/role" value="Sitecore\Author" />
                <claim name="__http://schemas.microsoft.com/ws/2008/06/identity/claims/role" value="sitecore\Analytics Personalization" />
                <claim name="__http://schemas.microsoft.com/ws/2008/06/identity/claims/role" value="sitecore\Analytics Maintaining" />
                <claim name="__http://schemas.microsoft.com/ws/2008/06/identity/claims/role" value="sitecore\Forms Editor" />
              </targets>
              <keepSource>true</keepSource>
            </transformation> 

如果您看到有趣的名字被添加到 Sitecore,请尝试以下链接中 Sitecore 社区推荐的解决方案。

https://community.sitecore.net/developers/f/5/t/8801

于 2018-12-28T06:51:30.837 回答