【发布时间】:2021-03-28 20:20:51
【问题描述】:
我目前正在尝试为通过 Azure 的虚拟机服务(而不是应用服务)运行的 Jenkins 启用通过 Azure Active Directory 的身份验证。我使用 Microsoft 的 tutorial 设置服务器以及安装 Azure AD plugin 并按照插件页面的说明设置身份验证。我几乎可以正常工作了,但是在实际尝试登录时,我收到以下错误消息:
AADSTS50011: The reply URL specified in the request does not match the reply URLs configured for the application: '<GUID goes here>'
仔细观察,回复 URL 不匹配,因为 Jenkins 服务器当前使用 HTTP,而回复 URL 使用 HTTPS。由于回复 URL 必须是 HTTPS,我目前正在尝试为 Jenkins 服务器启用 HTTPS。在我的研究中,大部分都涉及应用服务,但我主要是尝试为virtual machines启用它。
当我在 AWS 中尝试此操作时,我了解到您无法使用提供免费 SSL 证书的工具,因为虚拟机可以随时换出。我不确定 Azure 是否有相同的行为。
我可以使用 LetsEncrypt 等免费工具之一,还是需要为虚拟机购买 SSL 证书?
【问题讨论】:
-
我确实找到了重定向的 URL。如上所述,由于回复 URL 应该是 HTTPS 而不是 HTTP,因此存在不匹配,这在
redirect_uri中显示。因此,我正在尝试将 VM 转换为使用 HTTPS,这样就不会再出现不匹配了。 -
rejahrehim.com/blog/let%27s-encrypt/jenkins/2016/07/28/… -- 您可以使用 nginx + Let's Encrypt 并反向安装到您的 Jenkins 安装中(nginx 将侦听 HTTPS 和代理流量到您的 HTTP Jenkins)。在不与 Jenkins 争吵的情况下,这可能是明智的做法。
-
@evilSnobu 所以正在使用的虚拟机没有 FQDN。我可以使用
localhost还是需要一个实际的 FQDN? -
在尝试使用命令
./letsencrypt-auto --config /etc/letsencrypt/configs/localhost.conf certonly运行letsencrypt 时,我收到以下错误:Requesting to rerun ./letsencrypt-auto with root privileges... Skipping bootstrap because certbot-auto is deprecated on this system. Your system is not supported by certbot-auto anymore. Certbot cannot be installed.
标签: azure jenkins azure-active-directory