当前位置:网站首页>LDAP應用篇(4)Jenkins接入
LDAP應用篇(4)Jenkins接入
2022-07-06 08:18:00 【雨帝夜淚】
LDAP應用篇(4)Jenkins接入
配置 Jenkins 接入 LDAP 時需要慎重一些,因為一旦在配置中啟用了LDAP驗證用戶之後,會導致之前的用戶無法登錄,包括 admin 賬戶。
證書配置
如果 Jenkins 通過 ldaps 接入 ,必須單獨配置 java 運行環境的證書。如果使用 ldap 協議接入,則可跳過此部分。
下載及導入
證書的配置,只需要兩步,即下載和導入即可。在導入時,根據不同的jdk版本比特置會略有不同,尤其是 jdk11 以上的版本,已經沒有了 jre 目錄,請注意!
openssl s_client -connect <address>:636 >> host.crt
keytool -import -trustcacerts -alias <address> -file host1.crt -keystore /usr/java/jdk-17.0.3.1/lib/security/cacerts
在導入證書時,需要輸入證書密碼,該密碼默認為: changeit 。其實這個怎麼來的並不知道,似乎大家都是這麼用的~~~
有些文檔會先清除下載證書中的 BEGIN CERTIFICATE 和 END CERTIFICATE 內容,但是根據實測,並不需要這些操作。
Jenkins 中的配置
安全配置
進入 全局安全配置 中,按照網上的一般操作填寫信息即可,注意如下兩項: User search base 及 Group search base ,錶示用戶和組的搜索起點,這裏不要輸入完整的DN信息,只需要輸入用戶和組的最後一節 ou 即可。
Display Name LDAP attribute 一項用於顯示用戶名,但是一般的 posixAccount 賬戶並沒有此屬性,可以改為 cn 屬性。
修改後不要直接保存,一定要點擊 Test LDAP settings 按鈕,確認無誤後方可保存!!!
基於角色的矩陣授權
基於角色的矩陣授權這裏也不再贅述,只是在上一步配置了LDAP之後,一定要在這裏的 Assign Roles 頁面的 Global roles 中,確保至少有一個用戶具備 admin 角色。這樣才能保證該用戶可以正常管理 Jenkins。
故障修複
正如開頭部分所說,如果萬一修改時發生意外,導致無法登錄,也可以通過下面的方法進行修複。在Jenkins目錄中查找 config.xml 文件,如果配置了環境變量 JENKINS_HOME ,文件可能在指定的目錄中。打開該文件,配置下面的內容為 false :
<useSecurity>flase</useSecurity>
重啟 Jenkins 服務後,會發現系統允許匿名登錄,並且可以進行任何操作。
參考資料
边栏推荐
- The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
- Entity class design for calculating age based on birthday
- Grayscale upgrade tidb operator
- CAD ARX gets the current viewport settings
- 让学指针变得更简单(三)
- Golang DNS 随便写写
- [research materials] 2021 live broadcast annual data report of e-commerce - Download attached
- Step by step guide to setting NFT as an ens profile Avatar
- The State Economic Information Center "APEC industry +" Western Silicon Valley will invest 2trillion yuan in Chengdu Chongqing economic circle, which will surpass the observation of Shanghai | stable
- [cloud native] teach you how to build ferry open source work order system
猜你喜欢

Résumé des diagrammes de description des broches de la série ESP
![[research materials] 2021 Research Report on China's smart medical industry - Download attached](/img/c8/a205ddc2835c87efa38808cf31f59e.jpg)
[research materials] 2021 Research Report on China's smart medical industry - Download attached

Asia Pacific Financial Media | designer universe | Guangdong responds to the opinions of the national development and Reform Commission. Primary school students incarnate as small community designers

Online yaml to CSV tool

Zhong Xuegao, who cannot be melted, cannot escape the life cycle of online celebrity products

Data governance: 3 characteristics, 4 transcendence and 3 28 principles of master data

NFT smart contract release, blind box, public offering technology practice -- jigsaw puzzle

好用的TCP-UDP_debug工具下载和使用
![07- [istio] istio destinationrule (purpose rule)](/img/be/fa0ad746a79ec3a0d4dacd2896235f.jpg)
07- [istio] istio destinationrule (purpose rule)

ESP系列引脚說明圖匯總
随机推荐
P3047 [usaco12feb]nearby cows g (tree DP)
使用 TiDB Lightning 恢复 S3 兼容存储上的备份数据
Pangolin Library: control panel, control components, shortcut key settings
【云原生】手把手教你搭建ferry开源工单系统
Upgrade tidb operator
synchronized 解决共享带来的问题
23. Update data
【T31ZL智能视频应用处理器资料】
The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
Go learning notes (3) basic types and statements (2)
1204 character deletion operation (2)
Vocabulary notes for postgraduate entrance examination (3)
Make learning pointer easier (3)
Parameter self-tuning of relay feedback PID controller
将 NFT 设置为 ENS 个人资料头像的分步指南
【MySQL】数据库的存储过程与存储函数通关教程(完整版)
Asia Pacific Financial Media | art cube of "designer universe": Guangzhou community designers achieve "great improvement" in urban quality | observation of stable strategy industry fund
你想知道的ArrayList知识都在这
[Yugong series] February 2022 U3D full stack class 010 prefabricated parts
"Designer universe" Guangdong responds to the opinions of the national development and Reform Commission. Primary school students incarnate as small community designers | national economic and Informa