当前位置:网站首页>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 服务后,会发现系统允许匿名登录,并且可以进行任何操作。
参考资料
边栏推荐
- Image fusion -- challenges, opportunities and Countermeasures
- Personalized online cloud database hybrid optimization system | SIGMOD 2022 selected papers interpretation
- "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
- Hill sort c language
- flask返回文件下载
- [nonlinear control theory]9_ A series of lectures on nonlinear control theory
- Interview Reply of Zhuhai Jinshan
- PHP - Common magic method (nanny level teaching)
- 【MySQL】数据库的存储过程与存储函数通关教程(完整版)
- 数据治理:主数据的3特征、4超越和3二八原则
猜你喜欢

wincc7.5下载安装教程(Win10系统)

C语言自定义类型:结构体
![[research materials] 2022 enterprise wechat Ecosystem Research Report - Download attached](/img/35/898a8086bc35462b0fcb9e6b58b86b.jpg)
[research materials] 2022 enterprise wechat Ecosystem Research Report - Download attached

Analysis of pointer and array written test questions

ROS learning (IX): referencing custom message types in header files

Wincc7.5 download and installation tutorial (win10 system)

National economic information center "APEC industry +": economic data released at the night of the Spring Festival | observation of stable strategy industry fund

IP lab, the first weekly recheck

Make learning pointer easier (3)

【T31ZL智能视频应用处理器资料】
随机推荐
Chinese Remainder Theorem (Sun Tzu theorem) principle and template code
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
1. Color inversion, logarithmic transformation, gamma transformation source code - miniopencv from zero
[cloud native] teach you how to build ferry open source work order system
指针和数组笔试题解析
Migrate data from SQL files to tidb
"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
C语言 - 位段
21. Delete data
Personalized online cloud database hybrid optimization system | SIGMOD 2022 selected papers interpretation
好用的TCP-UDP_debug工具下载和使用
化不掉的钟薛高,逃不出网红产品的生命周期
Binary tree creation & traversal
使用 BR 恢复 S3 兼容存储上的备份数据
Summary of phased use of sonic one-stop open source distributed cluster cloud real machine test platform
649. Dota2 Senate
[research materials] 2021 China online high growth white paper - Download attached
It's hard to find a job when the industry is in recession
IP lab, the first weekly recheck
Pyqt5 development tips - obtain Manhattan distance between coordinates