Jenkins基于用户的工作安全 [英] Jenkins user-based job security

查看:108
本文介绍了Jenkins基于用户的工作安全的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在用于构建代码的本地计算机上只有一个jenkins实例.我们有不同的项目团队从事不同的项目,每个项目都有不同的工作. 为了消除某个团队中某人不小心弄乱另一个团队的工作的可能性,我创建了多个jenkins用户. 但是,所有可以登录的用户仍然可以看到所有作业.是否有某些用户只能查看与他们相关的作业的方法?

I have just a single instance of jenkins on a local machine which we are using to build our code. We have different project teams working on different projects, and different jobs for each project. To eliminate the possibility of someone from one team accidentally messing up another team's job, i have created multiple jenkins users. However, all of the users that can log on still see all of the jobs. Is there a way for certain users to only see the jobs that pertain to them?

我已经广泛搜索了类似的内容,但是没有运气.我还没有找到任何插件.我当前使用的是基于矩阵的安全性,尽管您可以通过此方法更改所有用户的权限,但是不能将特定权限应用于特定作业.至少据我所知.有任何想法吗?

I have searched extensively for something like this but no luck. I haven't found any plugins for this. I am using matrix based security currently, and although you can change the permissions of all the users through this, you can not apply specific permissions to specific jobs. At least to my knowledge. Any ideas?

请澄清一下,我希望众多团队之一以jenkins登录到他们的用户帐户,并且只看到他们的工作.其他团队的工作不应该可见,登录时只有他们所分配的工作应该可见

Just to clarify, I want one of the many teams to log in to their user account in jenkins, and only see their jobs. The jobs of the other teams should not be visible, only the ones that they are assigned should be visible when they log on

我为此找到的最接近的东西是在角色策略插件"中,有一个基于用户的工作过滤器

The closest thing i have found for this is in the Role Strategy Plugin, there is a user-based job filter

推荐答案

原来,jenkins中已经有一个功能,不需要插件! 在管理Jenkins"的配置全局安全性"部分中,单击基于项目的矩阵授权策略". 然后,您可以通过单击启用基于项目的安全性",在特定作业的作业配置屏幕中配置权限.

Turns out there is a feature already in jenkins for this, no plugins necessary! In the Configure Global Security section in Manage Jenkins, click "Project-based matrix authorization strategy". Then you can configure permissions in the job configure screen for that particular job by clicking "enable project-based security".

现在,您可以配置Jenkins,以便"Joe可以访问项目A,B和C,但他看不到D".

Now you can configure your Jenkins so that "Joe can access project A, B, and C but he can't see D".

这篇关于Jenkins基于用户的工作安全的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆