
我安裝了幾個月前的 freeipa。然而,最近當我回來繼續使用 IPA 伺服器進行管理時,我無法登入它。
即使我無法登入 IPA 系統,DNS 也可以在我的專用網路中正常運作。我在 httpd 設定中使用 LetsEncrypt 憑證。
$ipa-pkinit-管理狀態
PKINIT is enabled
The ipa-pkinit-manage command was successful
$克利斯特
Ticket cache: KCM:0
Default principal: [email protected]
Valid starting Expires Service principal
31.08.2020 16.12.30 01.09.2020 16.12.25 krbtgt/[email protected]
$ipa -v ping
ipa: ERROR: cannot connect to 'https://serenity.example.com/ipa/json': [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:897)
貓 /var/log/httpd/error_log
[Mon Aug 31 16:31:30.125325 2020] [wsgi:error] [pid 9761:tid 139962713196288] [remote 10.0.12.31:58490] ipa: INFO: 401 Unauthorized: HTTPSConnectionPool(host='serenity.example.com', port=443): Max retries exceeded with url: /ipa/session/cookie (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:897)'),))
網路使用者介面登入:
Login failed due to an unknown reason
注意:我已將網域變更為 example.com
是什麼導致了這個問題以及如何解決它?
答案1
看看內容:
- /etc/ipa/ca.crt
- /var/lib/ipa-client/pki/ca-bundle.pem
- /var/lib/ipa-client/pki/kdc-ca-bundle.pem
如果您對 https 使用 LetsEncrypt 和自簽名 CA,則每個憑證中應該有多個憑證。在我新增 LetsEncrypt 根 CA 之前註冊的客戶端缺少這 3 個檔案中的額外憑證。
我參考了https://github.com/freeipa/freeipa-letsencrypt為了切換到 LetsEncrypt,它具有 ipa-cacert-manage (將根 CA 添加到 freeipa 的信任)和 ipa-certupdate (將 freeipa 信任中的所有證書拉到客戶端),我後來意識到我應該運行在翻轉https以使用LetsEncrypt 之前,在每個客戶端上更新ipa-cert。