当前位置:网站首页>Jenkins user rights management

Jenkins user rights management

2022-07-07 21:25:00 Cloud computing security

2d697c8b26a7d91dc044f623e7f80f4a

Jenkins edition :2.332.3


One 、 Installing a plug-in

1.1 install

stay Jenkins Install the plug-in in the management plug-in of

Input Role You can find it , As shown in the figure below, I have already installed .

image-20220706113750812

1.2 To configure

Click on Configure Global Security Enter the configuration

1、 stay Jenkins The following icons are found in the settings

image-20220706114033184

2、 Select the plug-in just installed as my user permission

image-20220706114334669

Two 、 Create the role

2.1 Plug in features

stay Jenkins Found under settings Manage and Assign Roles And click into

image-20220706114829442

The main function :

image-20220706115131927

2.2 Role management

1、 Click on the image above Manage Roles Enter role management

image-20220706115702953

2、 Create a global role

Create a file called base The global role of , This role can be used as the basic permission of all users , That is, all ordinary users have basic permissions , And give the character Overall Under the Read jurisdiction .

image-202207061203532873、 Create project roles

Create a file called shop Project role of ,Pattern For filtering or matching regular expression items ,cms.* Said to cms The first item will be matched to , After setting up , Assign corresponding permissions to the project role .

image-20220706121102934

Pattern Can match the job (job)、 agent (agents)、 Folder (folders) And other project keywords and types .

The format is :jobs, agents, folders, etc If there are more than one , Use commas in English "," Just separate .

4、 Create node roles

Node role is mainly used for master-slave Jenkins When the deployment , Configure node permissions .

image-20220706121946074

2.3 Role assignment

1、 Create user

image-20220706122231874

2、 Click on Assign Roles Assign permissions to users

image-20220706122541034

Follow the project role permissions configured above ,ops Users can only match with cms The opening project , He can't see other projects , Next, we will verify .

3、ops User login authentication

image-20220706122943398

thus ,Jenkins User permissions are set !

原网站

版权声明
本文为[Cloud computing security]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/188/202207071811164343.html