How to setup credentials for every project in Jenkins?

折月煮酒 提交于 2019-12-18 09:03:14

问题


I have some 10 projects in my Jenkins , each for 10 different clients . So i need to create credentials for all my projects , so that each client can access only their project .

Is there any plugin to achieve my requirement .??

Please Help !!!


回答1:


Select "Project-based Matrix Authorization Strategy" under Global Security

Define general users, without access to projects at this level.

Then on per-project select "Enable project-based security", and here you can give individual users addition permissions, such as ability to view and execute the job

Edit:

In Configure Global Security, under Project-based Matrix Authorization:

  • Make sure Anonymous and Authenticated don't have any other permissions.
  • Give Anonymous:
    • Job Discover (this will redirect non-logged in users to login page).
  • Give Authenticated:
    • Overall Read (without this permission, nothing else will work).
    • View Read, optional (without this, they won't see custom views, just the 'all view').
  • Save configuration

In Job Configuration, under Enable project-based security:

  • Give client1:
    • Job Read (this will allow to view this particular job, and nothing else).
    • Give additional permissions as required (build, workspace, promote, etc).
  • Save configuration


来源:https://stackoverflow.com/questions/27393169/how-to-setup-credentials-for-every-project-in-jenkins

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!