jenkinsci / azure-ad-plugin

Authentication and Authorization with Azure AD
https://plugins.jenkins.io/azure-ad/
MIT License
29 stars 58 forks source link

Fall Back Mechanism for Jenkins Own Database #421

Open choolairaj opened 1 year ago

choolairaj commented 1 year ago

Describe your use-case which is not covered by existing documentation.

Hello - Could you add more clarity on the documentation / readme on how to setup Jenkin's internal database asa. fall back mechanism so that we can create service accounts in Jenkins database and setup the user accounts via Azure AD ? This might also help if there is a need to by pass Azure AD and work directly via the users registered in Jenkins Database ?

Thanks

Reference any relevant documentation, other materials or issues/pull requests that can be used for inspiration.

No response

KalleOlaviNiemitalo commented 1 year ago

From https://issues.jenkins.io/browse/JENKINS-67636, it looks like https://plugins.jenkins.io/mixing-security-realm/ is not suitable for creating local service accounts while other users log in via Azure AD.

IIRC, I first created a service account in Jenkins, and then switched to the Azure AD security realm. The service account does not exist in Azure AD, but I can still grant rights to it via Jenkins Configuration as Code, and I can use it in the Authorize Project plugin; but I'm not sure this is a supported configuration, and I don't think I have tried logging in to the service account from outside of Jenkins, using an access token.