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

ScriptSecurityRealm.loadUserByUsername() IllegalArgumentException is not being caught by role strategy

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Originally it has been reported by Sebastian Schuberth in JENKINS-35515.
      It happens, because User Authorities permission check logic relies on the Security realm and does not handle errors.
      Most likely there is a related bug in active directory plugin

      java.lang.IllegalArgumentException: Cannot pass null or empty values to constructor
      at org.acegisecurity.userdetails.User.<init>(User.java:127)
      at hudson.plugins.script_realm.ScriptSecurityRealm.loadUserByUsername(ScriptSecurityRealm.java:105)
      at com.michelin.cio.hudson.plugins.rolestrategy.RoleMap.hasPermission(RoleMap.java:110)
      at com.michelin.cio.hudson.plugins.rolestrategy.RoleMap.access$000(RoleMap.java:64)
      at com.michelin.cio.hudson.plugins.rolestrategy.RoleMap$AclImpl.hasPermission(RoleMap.java:341)
      

        Attachments

          Activity

          oleg_nenashev Oleg Nenashev created issue -
          oleg_nenashev Oleg Nenashev made changes -
          Field Original Value New Value
          Description Originally it has been reported by [~sschuberth] in JENKINS-35515.
          It happens, because User Authorities permission check logic relies on the Security realm and does not handle errors.
          Most

          {noformat}
          java.lang.IllegalArgumentException: Cannot pass null or empty values to constructor
          at org.acegisecurity.userdetails.User.<init>(User.java:127)
          at hudson.plugins.script_realm.ScriptSecurityRealm.loadUserByUsername(ScriptSecurityRealm.java:105)
          at com.michelin.cio.hudson.plugins.rolestrategy.RoleMap.hasPermission(RoleMap.java:110)
          at com.michelin.cio.hudson.plugins.rolestrategy.RoleMap.access$000(RoleMap.java:64)
          at com.michelin.cio.hudson.plugins.rolestrategy.RoleMap$AclImpl.hasPermission(RoleMap.java:341)
          {noformat}
          oleg_nenashev Oleg Nenashev made changes -
          Summary ScriptSecurityRealm.loadUserByUsername() IllegalArgumentException due to the missing username or password ScriptSecurityRealm.loadUserByUsername() IllegalArgumentException is not being caught by role strategy
          oleg_nenashev Oleg Nenashev made changes -
          Description Originally it has been reported by [~sschuberth] in JENKINS-35515.
          It happens, because User Authorities permission check logic relies on the Security realm and does not handle errors.
          Most

          {noformat}
          java.lang.IllegalArgumentException: Cannot pass null or empty values to constructor
          at org.acegisecurity.userdetails.User.<init>(User.java:127)
          at hudson.plugins.script_realm.ScriptSecurityRealm.loadUserByUsername(ScriptSecurityRealm.java:105)
          at com.michelin.cio.hudson.plugins.rolestrategy.RoleMap.hasPermission(RoleMap.java:110)
          at com.michelin.cio.hudson.plugins.rolestrategy.RoleMap.access$000(RoleMap.java:64)
          at com.michelin.cio.hudson.plugins.rolestrategy.RoleMap$AclImpl.hasPermission(RoleMap.java:341)
          {noformat}
          Originally it has been reported by [~sschuberth] in JENKINS-35515.
          It happens, because User Authorities permission check logic relies on the Security realm and does not handle errors.
          Most likely there is a related bug in active directory plugin

          {noformat}
          java.lang.IllegalArgumentException: Cannot pass null or empty values to constructor
          at org.acegisecurity.userdetails.User.<init>(User.java:127)
          at hudson.plugins.script_realm.ScriptSecurityRealm.loadUserByUsername(ScriptSecurityRealm.java:105)
          at com.michelin.cio.hudson.plugins.rolestrategy.RoleMap.hasPermission(RoleMap.java:110)
          at com.michelin.cio.hudson.plugins.rolestrategy.RoleMap.access$000(RoleMap.java:64)
          at com.michelin.cio.hudson.plugins.rolestrategy.RoleMap$AclImpl.hasPermission(RoleMap.java:341)
          {noformat}
          oleg_nenashev Oleg Nenashev made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 172002 ] JNJira + In-Review [ 199188 ]

            People

            • Assignee:
              oleg_nenashev Oleg Nenashev
              Reporter:
              oleg_nenashev Oleg Nenashev
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: