Open strobeti opened 3 years ago
Could you give more details please,
Why are you doing this? How were you creating the users before?
Seems related to https://github.com/jenkinsci/azure-ad-plugin/issues/92#issuecomment-815165936
(The only plugin I'm aware of with support for this is the Active Directory plugin, although I've never used it myself, it wouldn't work with an SSO plugin unless we created a login page with username/password and an azure-ad button)
Hi @timja,
we are using a groovy script to create local users and tokens on startup of jenkins. This is only done for technical users and how we have done it since day one. We didn't use Azure AD right from the beginning.
However, we have not changed anything in this setup. It just no longer works with the latest Azure AD plugin. Version 158.v437429002c6b works for us, but produces "user not found" logs. There were earlier versions that worked perfectly.
I assumed that local users get created but are disbaled by the plugin afterwards because they are not part of the security realm?
API token matched for user agent but the impersonation failed
Regardless of it working perfectly before that was an implementation detail and not a supported feature.
It was likely broken when Azure AD users got support for using an API token.
Why are you using this? and can you use an Azure AD user instead (they don't need an O365 license assigned)
Basically two reasons:
Should not be a problem to create that user in AD 👍 Wasn't aware that it's not a supported feature
I faced the same issue. I need a user who has only permission to read prometheus metrics but I do not want this user in Azure AD. I will try if API token can be used but I feel a bit scared with @timja comment.
We are using local jenkins users to connect agents via swarm. With the latest version this fails as the User is not created.
Version report
Jenkins and plugins versions report:
Linux 5.8.0-1038-aws 20.04.1-Ubuntu
Reproduction steps
Add local jenkins user while configuring Security Realm as Azure Active Directory. User is not available in Azure AD.
Results
Expected result: Local user was usable in prior versions
Actual result: