当前位置:网站首页>Jenkins 用户权限管理
Jenkins 用户权限管理
2022-07-07 18:11:00 【云计算-Security】

Jenkins 版本:2.332.3
一、安装插件
1.1 安装
在 Jenkins 的管理插件中进行插件安装
输入 Role 即可找到,如下图我已经安装过了。

1.2 配置
点击 Configure Global Security 进入配置
1、在 Jenkins 设置中找到如下图标

2、选择刚安装的插件来作为我的用户权限

二、创建角色
2.1 插件功能
在 Jenkins 设置下找到 Manage and Assign Roles 并点击进入

主要功能:

2.2 角色管理
1、点击上图 Manage Roles 进入角色管理

2、创建全局角色
创建一个名为 base 的全局角色,该角色可作为所有用户的基本权限,也就是所有普通用户都具备的基本权限,并赋予角色 Overall 下的 Read 权限。
3、创建项目角色
创建一个名为 shop 的项目角色,Pattern 为过滤或匹配正则表达项,cms.* 表示以 cms 开头的项目都会被匹配到,设置完之后,为该项目角色赋予对应的权限。

Pattern 可以匹配作业(job)、代理(agents)、文件夹(folders)等项目关键字及类型。
格式为:jobs, agents, folders, etc 如有多个的话,用英文状态下的逗号","分开即可。
4、创建节点角色
节点角色主要是用于主从 Jenkins 部署时,进行节点权限配置。

2.3 角色分配
1、创建用户

2、点击 Assign Roles 为用户分配权限

按照上面配置的项目角色权限,ops 用户只能匹配到以 cms 开头的项目,其他项目他是无法看到的,接下来进行验证。
3、ops 用户登录验证

至此,Jenkins 用户权限设置完毕!
边栏推荐
- LeetCode_7_5
- Force buckle 1790 Can two strings be equal by performing string exchange only once
- Implement secondary index with Gaussian redis
- Chapter 20 using work queue manager (3)
- 力扣 1232.缀点成线
- The state cyberspace Office released the measures for data exit security assessment: 100000 information provided overseas needs to be declared
- 力扣 2315.统计星号
- 毕业季|遗憾而又幸运的毕业季
- JVM GC garbage collection brief
- 【STL】vector
猜你喜欢

【mysql篇-基础篇】事务

Mongodb由浅入深学习

Compiler optimization (4): inductive variables
![[philosophy and practice] the way of program design](/img/c8/93f2ac7c5beb95f64b7883ad63c74c.jpg)
[philosophy and practice] the way of program design

写了个 Markdown 命令行小工具,希望能提高园友们发文的效率!

Yolov6:yolov6+win10--- train your own dataset

【STL】vector

ASP.NET学习& asp‘s one word
![About cv2 dnn. Readnetfromonnx (path) reports error during processing node with 3 inputs and 1 outputs [exclusive release]](/img/59/33381b8d45401607736f05907ee381.png)
About cv2 dnn. Readnetfromonnx (path) reports error during processing node with 3 inputs and 1 outputs [exclusive release]

Cloud component development and upgrading
随机推荐
Force buckle 2315 Statistical asterisk
kubernetes之创建mysql8
[auto.js] automatic script
线性基
毕业季|遗憾而又幸运的毕业季
Read PG in data warehouse in one article_ stat
rk3128投影仪lcd显示四周显示不完整解决
LeetCode_ 7_ five
【解决】package ‘xxxx‘ is not in GOROOT
Chapter 9 Yunji datacanvas company won the highest honor of the "fifth digital finance innovation competition"!
841. String hash
LeetCode_7_5
第二十章 使用工作队列管理器(三)
【STL】vector
How to cooperate among multiple threads
ASP.NET学习& asp‘s one word
Some arrangements about oneself
Some important knowledge of MySQL
模拟实现string类
JVM GC垃圾回收简述