当前位置:网站首页>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 服务后,会发现系统允许匿名登录,并且可以进行任何操作。
参考资料
边栏推荐
- flask返回文件下载
- ESP系列引脚说明图汇总
- Personalized online cloud database hybrid optimization system | SIGMOD 2022 selected papers interpretation
- On why we should program for all
- Common functions for PHP to process strings
- Remote storage access authorization
- National economic information center "APEC industry +": economic data released at the night of the Spring Festival | observation of stable strategy industry fund
- 化不掉的钟薛高,逃不出网红产品的生命周期
- CAD ARX gets the current viewport settings
- Introduction to number theory (greatest common divisor, prime sieve, inverse element)
猜你喜欢

Pyqt5 development tips - obtain Manhattan distance between coordinates

Golang DNS 随便写写

Learn Arduino with examples

【MySQL】数据库的存储过程与存储函数通关教程(完整版)

Epoll and IO multiplexing of redis

将 NFT 设置为 ENS 个人资料头像的分步指南
![[research materials] 2021 live broadcast annual data report of e-commerce - Download attached](/img/a6/74da2f44c7b6b22fed2f8e41a55988.jpg)
[research materials] 2021 live broadcast annual data report of e-commerce - Download attached

Easy to use tcp-udp_ Debug tool download and use

C language - bit segment
![[research materials] 2022 enterprise wechat Ecosystem Research Report - Download attached](/img/35/898a8086bc35462b0fcb9e6b58b86b.jpg)
[research materials] 2022 enterprise wechat Ecosystem Research Report - Download attached
随机推荐
flask返回文件下载
National economic information center "APEC industry +": economic data released at the night of the Spring Festival | observation of stable strategy industry fund
Introduction to number theory (greatest common divisor, prime sieve, inverse element)
PHP - Common magic method (nanny level teaching)
C language - bit segment
使用 Dumpling 备份 TiDB 集群数据到兼容 S3 的存储
Asia Pacific Financial Media | female pattern ladyvision: forced the hotel to upgrade security. The drunk woman died in the guest room, and the hotel was sentenced not to pay compensation | APEC secur
Summary of phased use of sonic one-stop open source distributed cluster cloud real machine test platform
Understanding of law of large numbers and central limit theorem
1204 character deletion operation (2)
使用 BR 恢复 S3 兼容存储上的备份数据
Sanzi chess (C language)
【T31ZL智能视频应用处理器资料】
It's hard to find a job when the industry is in recession
Uibehavior, a comprehensive exploration of ugui source code
[Yugong series] February 2022 U3D full stack class 011 unity section 1 mind map
数据治理:误区梳理篇
C语言自定义类型:结构体
使用 TiDB Lightning 恢复 S3 兼容存储上的备份数据
图像融合--挑战、机遇与对策