• Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • cli
    • None
    • Platform: All, OS: All

      Currently there is no way to supply Hudson credentials to hudson-cli, making it
      unusable to those who do not allow anonymous access to Hudson.

          [JENKINS-3796] Allow CLI to provide basic authentication

          hopfrog238 created issue -

          huybrechts added a comment -

          Initial implementation at http://github.com/huybrechts/hudson/tree/cli-auth
          Needs some more consideration about possible security issues.

          huybrechts added a comment - Initial implementation at http://github.com/huybrechts/hudson/tree/cli-auth Needs some more consideration about possible security issues.

          Code changed in hudson
          User: : kohsuke
          Path:
          trunk/hudson/main/core/src/main/java/hudson/cli/CLICommand.java
          trunk/hudson/main/core/src/main/java/hudson/cli/CliManagerImpl.java
          trunk/hudson/main/core/src/main/java/hudson/security/AbstractPasswordBasedSecurityRealm.java
          trunk/hudson/main/core/src/main/java/hudson/security/CliAuthenticator.java
          trunk/hudson/main/core/src/main/java/hudson/security/SecurityRealm.java
          trunk/hudson/main/test/src/test/java/hudson/security/CliAuthenticationTest.java
          trunk/www/changelog.html
          http://jenkins-ci.org/commit/28296
          Log:
          [FIXED JENKINS-3796] implemented an extensible authentication scheme for CLI clients.

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : kohsuke Path: trunk/hudson/main/core/src/main/java/hudson/cli/CLICommand.java trunk/hudson/main/core/src/main/java/hudson/cli/CliManagerImpl.java trunk/hudson/main/core/src/main/java/hudson/security/AbstractPasswordBasedSecurityRealm.java trunk/hudson/main/core/src/main/java/hudson/security/CliAuthenticator.java trunk/hudson/main/core/src/main/java/hudson/security/SecurityRealm.java trunk/hudson/main/test/src/test/java/hudson/security/CliAuthenticationTest.java trunk/www/changelog.html http://jenkins-ci.org/commit/28296 Log: [FIXED JENKINS-3796] implemented an extensible authentication scheme for CLI clients.
          SCM/JIRA link daemon made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

          hopfrog238 added a comment -

          So, how does one pass authentication information to the cli client? I've tried --username and --password without success.

          hopfrog238 added a comment - So, how does one pass authentication information to the cli client? I've tried --username and --password without success.

          plouj added a comment -

          This patch is based on Tom Huybrechts' work. It adds support for BASIC authentication when executing CLI commands over HTTP (not the CLI port). To use use BASIC authentication the user of CLI has to supply the username and password inside the URL. For example:

          http://user:password@hudson.example.com/

          plouj added a comment - This patch is based on Tom Huybrechts' work. It adds support for BASIC authentication when executing CLI commands over HTTP (not the CLI port). To use use BASIC authentication the user of CLI has to supply the username and password inside the URL. For example: http://user:password@hudson.example.com/
          plouj made changes -
          Attachment New: cli-basic-auth.patch [ 19577 ]

          Plouj added a comment -

          This fixes the previous patch by making it compilable, using Apache commons codec and removing print statements.

          Plouj added a comment - This fixes the previous patch by making it compilable, using Apache commons codec and removing print statements.
          plouj made changes -
          Attachment New: cli-basic-auth2.patch [ 19593 ]

          Plouj added a comment -

          I would like to re-open this issue so that the patch that provides basic HTTP authentication gets applied.

          Plouj added a comment - I would like to re-open this issue so that the patch that provides basic HTTP authentication gets applied.
          plouj made changes -
          Resolution Original: Fixed [ 1 ]
          Status Original: Resolved [ 5 ] New: Reopened [ 4 ]

            Unassigned Unassigned
            hopfrog238 hopfrog238
            Votes:
            5 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: