Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-6125

Server error when a user listed in sonar.security.localUsers does not exist

    Details

      Description

      If sonar.security.localUsers=john and the user with login "john" does not exist in database, then authentication fails with error :

      2015.01.28 03:54:56 ERROR web[o.s.s.ui.JRubyFacade]  Fail to render: /batch/global
      undefined method `save' for nil:NilClass
              /opt/app/sonarqube-4.5.2/web/WEB-INF/lib/need_authentication.rb:69:in `local_auth'
              /opt/app/sonarqube-4.5.2/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/database_statements.rb:136:in `transaction'
              /opt/app/sonarqube-4.5.2/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/transactions.rb:182:in `transaction'
              /opt/app/sonarqube-4.5.2/web/WEB-INF/lib/need_authentication.rb:68:in `local_auth'
              /opt/app/sonarqube-4.5.2/web/WEB-INF/lib/need_authentication.rb:54:in `authenticate?'
              /opt/app/sonarqube-4.5.2/web/WEB-INF/lib/need_authentication.rb:240:in `authenticate'
              /opt/app/sonarqube-4.5.2/web/WEB-INF/lib/authenticated_system.rb:130:in `login_from_basic_auth'
              org/jruby/RubyProc.java:290:in `call'
              org/jruby/RubyProc.java:224:in `call'
              /opt/app/sonarqube-4.5.2/web/WEB-INF/gems/gems/actionpack-2.3.15/lib/action_controller/http_authentication.rb:126:in `authenticate'
              /opt/app/sonarqube-4.5.2/web/WEB-INF/gems/gems/actionpack-2.3.15/lib/action_controller/http_authentication.rb:116:in `authenticate_with_http_basic'
              /opt/app/sonarqube-4.5.2/web/WEB-INF/lib/authenticated_system.rb:129:in `login_from_basic_auth'
              /opt/app/sonarqube-4.5.2/web/WEB-INF/lib/authenticated_system.rb:11:in `current_user'
              /opt/app/sonarqube-4.5.2/web/WEB-INF/app/controllers/application_controller.rb:102:in `set_user_session'
              org/jruby/RubyKernel.java:2223:in `send'
      

        Attachments

          Activity

            People

            • Assignee:
              julien.lancelot Julien Lancelot
              Reporter:
              simon.brandhof Simon Brandhof (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved: