Multi-tenant setup for Jenkins
Asked Answered
U

1

7

I want to setup multi-tenant support for our Jenkins. Let, we have 5 jobs for two users (GitHub user) in Jenkins and all the 5 jobs are in a single server.

  • user_1 has j1, j2, j3 jobs
  • user_2 has j4, j5 jobs

Now,

  • user_1 can see only j1, j2 and j3 jobs (and don't see j4 or j5)
  • user_2 can see only j4 and j5 jobs

when they come in Jenkins.

How can we setup Jenkins for multi-tenant support?

Ultramontanism answered 15/5, 2015 at 4:58 Comment(1)
This looks like a config question rather than a programming question.Miniver
B
3

For the quickest approach to accomplish what you are describing, follow these steps:

  1. Go to "Configure Global Security" and navigate to the "Authorization" tab
  2. Use "Role Based Strategy"
  3. Give desired access to users
  4. Provide desired job level access for users

You can utilize some type of naming convention for your jobs and you can use regular expression to provide access for a set of jobs.

Another option would be to check out some of the Authentication/Authorization plugins available for Jenkins. A popular plugin in this realm is the Matrix Authorization Strategy Plugin (often combined with Active Directory), though I have not personally used this.

Buyers answered 6/6, 2017 at 2:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.