• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • core
    • Linux redhat Server release 5.8 64 bit
      Apache Tomcat 6.0.18
      Jenkins 1.563

      After upgrade from 1.563 to 1.572, all my Jenkins userid in Uppercase are no longer visible and cannot log in (eg : userid like UL11244) . I can see only user in lowercase (admin). I use Jenkins own database.
      As a workaround, I have to rename directory in JENKINS_HOME/users folder, eg:
      mv /build/hudson/users/UL11251 /build/hudson/users/ul11251 and then modify config.xml to find and replace all UL11251 in ul11251.
      In this case user ul11251 can log in and work.
      But since I have lot of users, I have to rollback to 1.563.
      Thanks

          [JENKINS-23872] Jenkins users disappeared!

          Just an update. You should only have to change the filenames to lowercase: https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/jenkins/model/IdStrategy.java#L144

          I am seeing if I can add some migration mechanism

          Stephen Connolly added a comment - Just an update. You should only have to change the filenames to lowercase: https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/jenkins/model/IdStrategy.java#L144 I am seeing if I can add some migration mechanism

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          core/src/main/java/hudson/model/User.java
          http://jenkins-ci.org/commit/jenkins/46c58c52256c16dff076b92a97290f3930e3d49c
          Log:
          [FIXED JENKINS-23872] Jenkins users disappeared!

          • Added migration logic to move the config files

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: core/src/main/java/hudson/model/User.java http://jenkins-ci.org/commit/jenkins/46c58c52256c16dff076b92a97290f3930e3d49c Log: [FIXED JENKINS-23872] Jenkins users disappeared! Added migration logic to move the config files

          e. cresta added a comment -

          It' not enough to change filename. It is necessary to change all entries in config.xml for all users from uppercase to lowercase.
          For now I'll not upgrade Jenkins until the problem will be resolved

          e. cresta added a comment - It' not enough to change filename. It is necessary to change all entries in config.xml for all users from uppercase to lowercase. For now I'll not upgrade Jenkins until the problem will be resolved

          dogfood added a comment -

          Integrated in jenkins_main_trunk #3562
          [FIXED JENKINS-23872] Jenkins users disappeared! (Revision 46c58c52256c16dff076b92a97290f3930e3d49c)

          Result = SUCCESS
          Stephen Connolly : 46c58c52256c16dff076b92a97290f3930e3d49c
          Files :

          • core/src/main/java/hudson/model/User.java

          dogfood added a comment - Integrated in jenkins_main_trunk #3562 [FIXED JENKINS-23872] Jenkins users disappeared! (Revision 46c58c52256c16dff076b92a97290f3930e3d49c) Result = SUCCESS Stephen Connolly : 46c58c52256c16dff076b92a97290f3930e3d49c Files : core/src/main/java/hudson/model/User.java

          Daniel Beck added a comment -

          Stephen: User.getOrCreate uses keyFor(String) which by default lowercases the user name in the case-insensitive strategy.

          But the authorization strategy is configured for uppercase user names, and there never was a need before to do case insensitive comparison.

          E.g. https://github.com/jenkinsci/role-strategy-plugin/blob/master/src/main/java/com/michelin/cio/hudson/plugins/rolestrategy/RoleMap.java#L71

          So, no permissions for the newly lowercased user (even if he now retains his custom name, email address, password, ...)

          Daniel Beck added a comment - Stephen: User.getOrCreate uses keyFor(String) which by default lowercases the user name in the case-insensitive strategy. But the authorization strategy is configured for uppercase user names, and there never was a need before to do case insensitive comparison. E.g. https://github.com/jenkinsci/role-strategy-plugin/blob/master/src/main/java/com/michelin/cio/hudson/plugins/rolestrategy/RoleMap.java#L71 So, no permissions for the newly lowercased user (even if he now retains his custom name, email address, password, ...)

          Code changed in jenkins
          User: Daniel Beck
          Path:
          changelog.html
          http://jenkins-ci.org/commit/jenkins/02b46fc5ddb32548019591c63d5700f8d3228b8e
          Log:
          Noting JENKINS-23872, JENKINS-24006, 19d8b80

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Beck Path: changelog.html http://jenkins-ci.org/commit/jenkins/02b46fc5ddb32548019591c63d5700f8d3228b8e Log: Noting JENKINS-23872 , JENKINS-24006 , 19d8b80

          Daniel, the authorization strategies need updating to reflect the case sensitivity strategy exposed by the security realm.

          Stephen Connolly added a comment - Daniel, the authorization strategies need updating to reflect the case sensitivity strategy exposed by the security realm.

          Daniel Beck added a comment -

          Stephen: I know, but it looked like your comment

          Just an update. You should only have to change the filenames to lowercase

          addressed the following:

          mv /build/hudson/users/UL11251 /build/hudson/users/ul11251 and then modify config.xml to find and replace all UL11251 in ul11251.

          The latter is still necessary (depending on security realm), otherwise you'll have your users but they won't have permissions to do anything.

          Daniel Beck added a comment - Stephen: I know, but it looked like your comment Just an update. You should only have to change the filenames to lowercase addressed the following: mv /build/hudson/users/UL11251 /build/hudson/users/ul11251 and then modify config.xml to find and replace all UL11251 in ul11251. The latter is still necessary (depending on security realm), otherwise you'll have your users but they won't have permissions to do anything.

          Code changed in jenkins
          User: Jesse Glick
          Path:
          changelog.html
          core/src/main/java/hudson/model/User.java
          test/src/test/java/hudson/model/UserTest.java
          test/src/test/resources/hudson/model/UserTest/migration.zip
          http://jenkins-ci.org/commit/jenkins/088edabb31a90cd607f3c6a3123effce5703c817
          Log:
          [FIXED JENKINS-24317] Corrected user dir migration code from JENKINS-23872.
          Adapted from #1375 by @daniel-beck: omitting change to User construction, and adding test.

          Compare: https://github.com/jenkinsci/jenkins/compare/3daa6a97b026...088edabb31a9

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: changelog.html core/src/main/java/hudson/model/User.java test/src/test/java/hudson/model/UserTest.java test/src/test/resources/hudson/model/UserTest/migration.zip http://jenkins-ci.org/commit/jenkins/088edabb31a90cd607f3c6a3123effce5703c817 Log: [FIXED JENKINS-24317] Corrected user dir migration code from JENKINS-23872 . Adapted from #1375 by @daniel-beck: omitting change to User construction, and adding test. Compare: https://github.com/jenkinsci/jenkins/compare/3daa6a97b026...088edabb31a9

          Code changed in jenkins
          User: Jesse Glick
          Path:
          changelog.html
          core/src/main/java/hudson/model/User.java
          test/src/test/java/hudson/model/UserTest.java
          test/src/test/resources/hudson/model/UserTest/migration.zip
          http://jenkins-ci.org/commit/jenkins/bce92ec53ddefb7d5105f3f82af96ee954467bdd
          Log:
          [FIXED JENKINS-24317] Corrected user dir migration code from JENKINS-23872.
          Adapted from #1375 by @daniel-beck: omitting change to User construction, and adding test.
          (cherry picked from commit 088edabb31a90cd607f3c6a3123effce5703c817)

          Conflicts:
          changelog.html

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: changelog.html core/src/main/java/hudson/model/User.java test/src/test/java/hudson/model/UserTest.java test/src/test/resources/hudson/model/UserTest/migration.zip http://jenkins-ci.org/commit/jenkins/bce92ec53ddefb7d5105f3f82af96ee954467bdd Log: [FIXED JENKINS-24317] Corrected user dir migration code from JENKINS-23872 . Adapted from #1375 by @daniel-beck: omitting change to User construction, and adding test. (cherry picked from commit 088edabb31a90cd607f3c6a3123effce5703c817) Conflicts: changelog.html

            stephenconnolly Stephen Connolly
            ecresta e. cresta
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: