• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • cli
    • None
    • Linux with the latest hudson 1.359

      java -jar hudson-cli.jar -s http://<Some URL> login --name <login name> --password <some passwd>
      "--name" is not a valid option
      java -jar hudson-cli.jar login args...

      Try different options, e.g., --username, etc same issue.
      What are the right option for java -jar hudson-cli.jar login?
      Perhaps expand what the login args ...are

      Thanks,

          [JENKINS-6628] hudson-cli.jar login does not work

          amargono created issue -
          Alan Harder made changes -
          Assignee New: Alan Harder [ mindless ]
          Alan Harder made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]

          Alan Harder added a comment -

          What security type do you use? I've confirmed that LDAP doesn't support the username/password parameters, and have started working on fixing this. Do you use LDAP, or ?

          Alan Harder added a comment - What security type do you use? I've confirmed that LDAP doesn't support the username/password parameters, and have started working on fixing this. Do you use LDAP, or ?

          Code changed in hudson
          User: : mindless
          Path:
          trunk/hudson/main/core/src/main/java/hudson/security/LDAPSecurityRealm.java
          http://jenkins-ci.org/commit/33773
          Log:
          JENKINS-6628 change LDAPSecurityRealm to extend AbstractPasswordBasedAuthentication
          so it gets the createCliAuthenticator stuff, and CLI will accept --username, etc.
          In my tests this worked when passing credentials to run a command.
          Login seemed to work, but commands after that were still as anonymous,
          so something still missing.

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : mindless Path: trunk/hudson/main/core/src/main/java/hudson/security/LDAPSecurityRealm.java http://jenkins-ci.org/commit/33773 Log: JENKINS-6628 change LDAPSecurityRealm to extend AbstractPasswordBasedAuthentication so it gets the createCliAuthenticator stuff, and CLI will accept --username, etc. In my tests this worked when passing credentials to run a command. Login seemed to work, but commands after that were still as anonymous, so something still missing.

          dogfood added a comment -

          Integrated in hudson_main_trunk #170
          JENKINS-6628 change LDAPSecurityRealm to extend AbstractPasswordBasedAuthentication
          so it gets the createCliAuthenticator stuff, and CLI will accept --username, etc.
          In my tests this worked when passing credentials to run a command.
          Login seemed to work, but commands after that were still as anonymous,
          so something still missing.

          mindless :
          Files :

          • /trunk/hudson/main/core/src/main/java/hudson/security/LDAPSecurityRealm.java

          dogfood added a comment - Integrated in hudson_main_trunk #170 JENKINS-6628 change LDAPSecurityRealm to extend AbstractPasswordBasedAuthentication so it gets the createCliAuthenticator stuff, and CLI will accept --username, etc. In my tests this worked when passing credentials to run a command. Login seemed to work, but commands after that were still as anonymous, so something still missing. mindless : Files : /trunk/hudson/main/core/src/main/java/hudson/security/LDAPSecurityRealm.java

          jpshackelford added a comment -

          We can confirm that Hudson ver. 1.371 with Crowd Authentication the login cli command doesn't specify what args it should take for username and password and the obvious ones don't work.

          jpshackelford added a comment - We can confirm that Hudson ver. 1.371 with Crowd Authentication the login cli command doesn't specify what args it should take for username and password and the obvious ones don't work.

          Alan Harder added a comment -

          jpshackelford, please file a new issue for the crowd plugin.. ask them to extend AbstractPasswordBasedSecurityRealm instead of directly from SecurityRealm to get the CLI authentication stuff.. thanks!

          Alan Harder added a comment - jpshackelford, please file a new issue for the crowd plugin.. ask them to extend AbstractPasswordBasedSecurityRealm instead of directly from SecurityRealm to get the CLI authentication stuff.. thanks!

          Code changed in hudson
          User: : mindless
          Path:
          trunk/hudson/main/core/src/main/java/hudson/cli/declarative/CLIRegisterer.java
          trunk/www/changelog.html
          http://jenkins-ci.org/commit/34178
          Log:
          [FIXED JENKINS-6628] There is some code duplication in main() methods between
          CLICommand and the anonymous CLICommand subclass in CLIRegisterer.. the latter
          was missing the loadStoredAuthentication call which enables CLI login command.
          CLI login now works for CLI commands defined via @CLIMethod annotation.

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : mindless Path: trunk/hudson/main/core/src/main/java/hudson/cli/declarative/CLIRegisterer.java trunk/www/changelog.html http://jenkins-ci.org/commit/34178 Log: [FIXED JENKINS-6628] There is some code duplication in main() methods between CLICommand and the anonymous CLICommand subclass in CLIRegisterer.. the latter was missing the loadStoredAuthentication call which enables CLI login command. CLI login now works for CLI commands defined via @CLIMethod annotation.
          SCM/JIRA link daemon made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Progress [ 3 ] New: Resolved [ 5 ]

            mindless Alan Harder
            amargono amargono
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: