使用 SAML 集成将 AWS Cognito 与 Google Workspace 集成

Integrate AWS Cognito with Google Workspace using SAML integration

我在 EKS(即 Jenkins)上为公司用户提供了一些应用程序。在公司里,我们使用 Google Workspaces (GSuite) 来处理电子邮件和其他东西。所以我想允许用户使用 Google 凭据登录到我服务的那些应用程序。我发现我可以使用 Cognito 来实现它,但我无法连接它们并以 Google 显示 403 结束流程。错误:app_not_configured_for_user。在他们的 documentation 我可以找到:

Verify that the value in the saml:Issuer tag in the SAMLRequest matches the Entity ID value configured in the SAML Service Provider Details section in the Admin console. This value is case-sensitive.

但是我该如何调试呢?我没有看到来自 AWS 和 Google 双方的日志:/

think I followed all possible guides and I cannot find what I'm doing wrong. I found that Google has this page 但他们没有提供 AWS Cognito 的确切场景。不管怎样,所有这些都非常相似,所以我想我不应该有问题,但我确实有。

我做了什么:

现在,当我在 AWS 控制台中单击 View Hosted UI 时,它会将我重定向到 Google 身份验证,然后直接转到前面提到的 403 app_not_configured_for_user 页。

我用略有不同的映射配置、签名响应等将其绑定了 3 次,但没有让我克服该错误。

有人试过集成它吗?

如何解决 Google Workspace 管理控制台中与 SAML 应用相关的 403 app_not_configured_for_user 错误

您需要做的第一件事是获取记录整个登录过程的 HAR 文件并找到 SAML 请求。可以找到步骤here.

获得文件后,您可以使用该工具打开它并在右上角搜索 SAMLreq(见图)。

之后您将获得包含信息的值列表。您必须一项一项地检查,直到在请求选项卡中找到具有 SAML 请求的项(参见下面的示例)。

从 SAML 请求中获取值后,复制它,然后您可以使用 this tool 进行 SAML 解码并找到实体 ID。您可以使用 Ctrl + F 并搜索 saml:Issuer 以更快地找到该值。如果值不匹配,那么您就知道有错误,您需要联系应用程序的支持团队以查看哪个值是正确的。

如果值匹配,我建议 opening a ticket 与 Google 核对。