首页 > 解决方案 > IdentityServer4 和 Tableau Server OpenID 授权

问题描述

我正在尝试使用 OpenID 从 Tableau 服务器获得使用 IdentityServer4 的授权,但我没有任何运气。我为支持的 OpenID 授权代码流配置了 IdentityServer4 客户端,我能够完成重定向到 IdentityServer 登录页面的前几个步骤,成功登录,接受声明类型,然后在重定向回 Tableau 时出现User could not be found错误。我正在使用 IdentityServer 安装附带的内存测试用户 (bob),并在 Tableau 中创建了该确切的用户和电子邮件地址。

我的客户如下:

new Client
   {
       ClientId = "tableau",
       ClientSecrets =
       {                       
           new Secret("[my secret]", "tableau.secret")
           {
               Type = SecretTypes.SharedSecret
           },                       
       },

       AllowedGrantTypes = GrantTypes.CodeAndClientCredentials,
       AllowAccessTokensViaBrowser = true,
       AccessTokenType = AccessTokenType.Jwt,
       RedirectUris = { "http://[tableuServer]/vizportal/api/web/v1/auth/openIdLogin" },
       AllowOfflineAccess = true,

       AllowedScopes =
       {
           IdentityServerConstants.StandardScopes.OpenId,
           IdentityServerConstants.StandardScopes.Profile,
           IdentityServerConstants.StandardScopes.Email,
           IdentityServerConstants.StandardScopes.Phone,
           IdentityServerConstants.StandardScopes.Address
       }
   },

我真的希望有人已经让这个工作,并且可以分享一个工作客户或我需要做出的改变。此 IdentityServer 适用于其他 3 种客户端类型,所以我知道我在这方面做得很好。

标签: openididentity-managementtableau-api

解决方案


看起来 Tableau 无法识别用户。验证 Tableau 和 Identity Server 中的用户名之间是否存在任何不匹配。Identity Server在 IDToken 中发送唯一的用户标识符(IDToken 中的sub声明)。IDToken 中的此子声明用于识别 Tableau 中的用户。几个参考链接: https://onlinehelp.tableau.com/current/server/en-us/openid_auth_troubleshooting.htm https://onlinehelp.tableau.com/current/server/en-us/openid_auth_signing_in.htm


推荐阅读