Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-4354

Make Hudson user names case insensitive

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved (View Workflow)
    • Major
    • Resolution: Fixed
    • core
    • None
    • Platform: Other, OS: All

    Description

      As of now the names of users (id) are case sensitive. Retrieving user "name" and
      "Name" returns different User objects. Each user data is then stored in separete
      folders; "users/name/" and "users/Name". This is fine on linux as files are case
      sensitive, but not so good on Windows as file names are case insensitive.

      On Windows the user "Name" and "name", will be different users but after a
      server restart they will be populated with the same data. It is the same data as
      both user objects has been loaded with data from the "users/name" folder. So
      this means that on Windows, the user objects should be the same as they contain
      the same data.

      The background to this enhancement is that I have two issues reported on the ci-
      game (3990 and 4350). Depending on how people log in to a machine, they will
      have different casing on their user name. This is fine, but the big problem (in
      my eyes) is that Hudson stores two different user's data in one folder. Therefore I think Hudson should treat user names case insensitive, as the users
      is the same person (ie same data after a restart).

      The effect of this change would be small as I dont think there are no hudson
      installations that have users with different casing in their names and still
      would like to make a distinction between them.

      Attachments

        Issue Links

          Activity

            redsolo redsolo created issue -
            tacianotres Taciano Tres added a comment -

            This is an issue to me too, since our users are authenticated on LDAP
            (configured as case insensitive), and some users uses uppercase and some uses
            lowercase login UID. In either case Hudson should obey the case returned by
            LDAP.

            tacianotres Taciano Tres added a comment - This is an issue to me too, since our users are authenticated on LDAP (configured as case insensitive), and some users uses uppercase and some uses lowercase login UID. In either case Hudson should obey the case returned by LDAP.
            mdonohue mdonohue added a comment -
                • Issue 4550 has been marked as a duplicate of this issue. ***
            mdonohue mdonohue added a comment - Issue 4550 has been marked as a duplicate of this issue. ***
            mdonohue mdonohue made changes -
            Field Original Value New Value
            Link This issue is duplicated by JENKINS-4550 [ JENKINS-4550 ]

            Code changed in hudson
            User: : kohsuke
            Path:
            trunk/hudson/main/core/src/main/java/hudson/model/User.java
            trunk/www/changelog.html
            http://fisheye4.cenqua.com/changelog/hudson/?cs=24879
            Log:
            [FIXED JENKINS-4354] in 1.340. User IDs are now case preserving but case insensitive

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : kohsuke Path: trunk/hudson/main/core/src/main/java/hudson/model/User.java trunk/www/changelog.html http://fisheye4.cenqua.com/changelog/hudson/?cs=24879 Log: [FIXED JENKINS-4354] in 1.340. User IDs are now case preserving but case insensitive
            scm_issue_link SCM/JIRA link daemon made changes -
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Resolved [ 5 ]
            mdonohue mdonohue made changes -
            Link This issue is blocking JENKINS-5436 [ JENKINS-5436 ]
            tacianotres Taciano Tres added a comment -

            Sorry about being late, but just today have some time to test the fix.
            But it don't work, at least not completely. The issue that remains is that the permissions should be case insensitive too: if the user 'bob' has the permission, the authenticated user 'Bob' should have it too.
            I can authenticate the users case insensitively, but can't authorize it.
            Mu vote is for reopen this bug.

            tacianotres Taciano Tres added a comment - Sorry about being late, but just today have some time to test the fix. But it don't work, at least not completely. The issue that remains is that the permissions should be case insensitive too: if the user 'bob' has the permission, the authenticated user 'Bob' should have it too. I can authenticate the users case insensitively, but can't authorize it. Mu vote is for reopen this bug.
            tacianotres Taciano Tres added a comment -

            Anyone against reopening this issue?
            Doing in 3 ... 2 ... 1 ...

            tacianotres Taciano Tres added a comment - Anyone against reopening this issue? Doing in 3 ... 2 ... 1 ...
            tacianotres Taciano Tres made changes -
            Resolution Fixed [ 1 ]
            Status Resolved [ 5 ] Reopened [ 4 ]
            bbrandt bbrandt added a comment -

            The issue may now reside in the "Matrix Authorization Strategy" and "Project-based Matrix Authorization Strategy" plugin code. Authentication is case insensitive, but permissions are not.

            bbrandt bbrandt added a comment - The issue may now reside in the "Matrix Authorization Strategy" and "Project-based Matrix Authorization Strategy" plugin code. Authentication is case insensitive, but permissions are not.
            tacianotres Taciano Tres added a comment -

            No hint to this issue?

            tacianotres Taciano Tres added a comment - No hint to this issue?
            hs2501 Hemant Singh added a comment -

            +1. We are having this issue as well. The windows user have habit of using mixed case (FirstNameLastName), so this should be solved in order to use Active Directory plug-in in meaningful way.

            hs2501 Hemant Singh added a comment - +1. We are having this issue as well. The windows user have habit of using mixed case (FirstNameLastName), so this should be solved in order to use Active Directory plug-in in meaningful way.
            ckohle Chris Kohle added a comment -

            Will the issue be fixed anytime soon?

            ckohle Chris Kohle added a comment - Will the issue be fixed anytime soon?
            jenkinstss O H added a comment -

            +1. We even had the issue that Jenkins (running on Windows server) does not know the rights of once configured users suddenly. Changing/adding the user exactly as written in the users list gave him back the rights he once had! I was just stripped this way of my admin rights recently!!!

            jenkinstss O H added a comment - +1. We even had the issue that Jenkins (running on Windows server) does not know the rights of once configured users suddenly. Changing/adding the user exactly as written in the users list gave him back the rights he once had! I was just stripped this way of my admin rights recently!!!

            we're having the same issue as O H, so +1

            aschilling Andreas Schilling added a comment - we're having the same issue as O H, so +1
            cforce cforce added a comment - - edited Please fix, there so many different requests! Related/Dupe to https://issues.jenkins-ci.org/browse/JENKINS-3218 https://issues.jenkins-ci.org/browse/JENKINS-6377 https://issues.jenkins-ci.org/browse/JENKINS-4354 https://issues.jenkins-ci.org/browse/JENKINS-4354 https://issues.jenkins-ci.org/browse/JENKINS-4550 https://issues.jenkins-ci.org/browse/JENKINS-5436
            hikerguy1900 Eric Blom added a comment -

            +1 for a fix for this.

            hikerguy1900 Eric Blom added a comment - +1 for a fix for this.
            mdkf Michael Fowler made changes -
            Link This issue is related to JENKINS-17674 [ JENKINS-17674 ]
            mdkf Michael Fowler made changes -
            Link This issue depends on JENKINS-17674 [ JENKINS-17674 ]

            This needs to be configurable. Making usernames case insensitive will raise a similar bug for Security Realms which are case sensitive.

            e.g. Unix login names are case sensitive (convention is to only use all lowercase, but they are actually case sensitive)

            e.g. Email addresses are permitted to be case sensitive (nobody really treats them as case sensitive but according to the RFC everything before the @ must be treated as case preserving as it may be case sensitive and only the receiving mailbox will have the correct knowledge)

            Worse still is that Jenkins sees Users who's ID differs only in case as being the same User object under some code paths and different User objects under other code paths.

            stephenconnolly Stephen Connolly added a comment - This needs to be configurable. Making usernames case insensitive will raise a similar bug for Security Realms which are case sensitive. e.g. Unix login names are case sensitive (convention is to only use all lowercase, but they are actually case sensitive) e.g. Email addresses are permitted to be case sensitive (nobody really treats them as case sensitive but according to the RFC everything before the @ must be treated as case preserving as it may be case sensitive and only the receiving mailbox will have the correct knowledge) Worse still is that Jenkins sees Users who's ID differs only in case as being the same User object under some code paths and different User objects under other code paths.
            oleg_nenashev Oleg Nenashev made changes -
            Link This issue depends on JENKINS-22247 [ JENKINS-22247 ]
            oleg_nenashev Oleg Nenashev added a comment - - edited

            Fixed in JENKINS-22247 (jenkins-1.566+)

            oleg_nenashev Oleg Nenashev added a comment - - edited Fixed in JENKINS-22247 (jenkins-1.566+)
            oleg_nenashev Oleg Nenashev made changes -
            Resolution Fixed [ 1 ]
            Status Reopened [ 4 ] Resolved [ 5 ]
            oleg_nenashev Oleg Nenashev made changes -
            Link This issue is duplicated by JENKINS-6377 [ JENKINS-6377 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 134427 ] JNJira + In-Review [ 186809 ]

            People

              Unassigned Unassigned
              redsolo redsolo
              Votes:
              17 Vote for this issue
              Watchers:
              18 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: