azure-active-directory - Kubernetes 和 AAD 身份验证

标签 azure-active-directory kubernetes-ingress azure-aks

在配置的 AKS 上,有一个带有使用 AAD 身份验证的应用程序的 docker 容器。

基于 this article还有配置的入口。 API 运行良好。

当我添加到带有 https 前缀的 Azure Active Directory 应用程序注册回复 URL 时,我收到错误“请求中指定的回复 URL 与为应用程序配置的回复 URL 不匹配”。我看到在浏览器地址行中,redirect_uri 以 http 开头。

当我添加以 http 开头的回复 URL 时,我收到“异常:关联失败”。

我尝试过的:添加到 ingress.yaml 设置 ingress.kubernetes.io/force-ssl-redirect: "true"

可能有某种方法可以强制 ingress 运行 https 而不是 http,或者可能有一些 AAD 重定向配置?有任何想法吗?

更新 2:http 重定向可能是因为 ADAL。

PS:能找到similar topic没有答案

更新3:
我决定不使用 nginx 作为入口。相反,我现在使用负载平衡器。很快就可以使用 Azure 应用程序网关入口 Controller

最佳答案

你试过这个吗?

By default the controller redirects HTTP clients to the HTTPS port 443 using a 308 Permanent Redirect response if TLS is enabled for that Ingress.

This can be disabled globally using ssl-redirect: "false" in the NGINX config map, or per-Ingress with the nginx.ingress.kubernetes.io/ssl-redirect: "false" annotation in the particular resource.


更多信息 on the Ingress documentation link .

关于azure-active-directory - Kubernetes 和 AAD 身份验证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51258599/

相关文章:

azure-devops - 使用 Azure AD token 通过 Azure DevOps 进行身份验证

angular - 从 Angular 应用程序调用/授权 Azure Active Directory 时出现 CORS 错误

authentication - 使用 Azure 托管服务标识和应用服务身份验证的服务到服务身份验证?

Nginx 入口资源 - 从 www 重定向(SSL 不起作用)

kubernetes - 为不同后端上的多个服务搜索正确的 Ingress 定义

azure - Aks 现货实例优先级[

Azure 模板对 AKS 节点池的支持

azure - 无法安装同步服务。请参阅事件日志了解更多详细信息

kubernetes - kubernetes 中每个部署的命名空间

azure - SSH 到 Azure Kubernetes 虚拟机时出现错误