jenkinsci / jenkinsci/active-directory-plugin
[JENKINS-8287] Append domain name to the username
- Dominant language
- Java
- Stars
- 53
- Forks
- 115
- PR merge metrics
- No merged PRs in 30d
Description
In my setup Hudson is using a svn server where users are reported in the following format: USER@DOMAIN.EXT.
Unfortunately, when I log in Hudson through Active Directory, the created user is only USER thus it does not match the discovered users through svn.
My patch modify two things:
- the method getPrincipalName() so that if the user log in as USER@DOMAIN.EXT the code does not transform it to USER@DOMAIN.EXT.DOMAIN.EXT.
- the returned name is the principalName variable, that is the full username with the domain information.
My patch only modify the ActiveDirectoryUnixAuthenticationProvider class, the other authentication provider used when Hudson is running on Windows was not modified, I have to test environment to do this change.
I also see that my change conflicts with JENKINS-5773, so I am wondering if we should not add a new configuration parameter where we can define a pattern for the username?
---
Originally reported by
rborer, imported from: Append domain name to the username
Raw content of original issue
In my setup Hudson is using a svn server where users are reported in the following format: USER@DOMAIN.EXT.
Unfortunately, when I log in Hudson through Active Directory, the created user is only USER thus it does not match the discovered users through svn.
My patch modify two things:
- the method getPrincipalName() so that if the user log in as USER@DOMAIN.EXT the code does not transform it to USER@DOMAIN.EXT.DOMAIN.EXT.
- the returned name is the principalName variable, that is the full username with the domain information.
My patch only modify the ActiveDirectoryUnixAuthenticationProvider class, the other authentication provider used when Hudson is running on Windows was not modified, I have to test environment to do this change.
I also see that my change conflicts with JENKINS-5773, so I am wondering if we should not add a new configuration parameter where we can define a pattern for the username?
- environment:
Hudson 1.388 with active directory plugin version 1.17, running under Linux
1 attachment
- [active_directory.patch](https://issues.jenkins.io/secure/attachment/20071/active_directory.patch)
Contributor guide
Research direction
Start by locating ActiveDirectoryUnixAuthenticationProvider and its getPrincipalName() method, then review the attached active_directory.patch and the conflicting JENKINS-5773 issue. Check how the Unix provider handles usernames containing a domain and whether the Windows provider is in scope. Done means the intended full username format is defined without duplicated domain information and covered across the relevant provider behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- authentication, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100