Gitlab + Jenkins with Azure Active Directory Authentication

Viewed 286

Context & Problem

I'm working on a DevOps platform for a company which wants to provide developers with tools for code versioning & automatic testing / build / deploy, using Gitlab + Jenkins + Azure (alongside other tools like Jira / Sonarqube / Grafana, but not relevant here).

For security reasons & ease of management, we want to provide users with only one account for all those tools : Azure Active Directory.

Currently, Gitlab users can connect through Azure AD, and a push to the Gitlab repository triggers a build in Jenkins. When I configure Jenkins authentication through Azure AD, the Gitlab integration with Jenkins doesn't work anymore, since you can no longer use username / password to connect to Jenkins, and it seems the only way provided by Gitlab integrations.

Current Setup

Questions

  • Is there a way for Jenkins to provide multiple auth strategies depending on the user ? (as Gitlab does)
  • Is there a way for Gitlab to use something else that user / password for Jenkins integration or Webhooks ?
  • Do we have to choose between Azure AD & Gitlab integration ? (if so, does this mean no one uses Jenkins Single Sign On & Gitlab ? Seems weird)

Leads & Ideas

  • Tried using webhooks instead of the Jenkins integration, but it fails since the webhooks also need username / password (and integration would probably be less "advanced")
  • Tried finding a way to enable multiple auth methods on Jenkins, but seems impossible right now (https://issues.jenkins.io/browse/JENKINS-15063)
  • Tried giving role permissions to Gitlab on Azure AD, but it won't change anything since I can't find how to make Gitlab using OAuth with Jenkins

I searched thorougly for answers, but still may have missed something trivial. I didn't find much litterature on this specific setup, so I'm hoping someone around here did encounter this type of situation before

Thank you for your help

0 Answers
Related