• 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

          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.

          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 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 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.

          Code changed in hudson
          User: : kohsuke
          Path:
          trunk/hudson/main/cli/src/main/java/hudson/cli/FullDuplexHttpStream.java
          trunk/www/changelog.html
          http://jenkins-ci.org/commit/33167
          Log:
          [FIXED JENKINS-3796]
          CLI can now work with a reverse proxy that requires BASIC auth.
          (<a href="http://issues.jenkins-ci.org/browse/JENKINS-3796">issue 3796</a>)

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : kohsuke Path: trunk/hudson/main/cli/src/main/java/hudson/cli/FullDuplexHttpStream.java trunk/www/changelog.html http://jenkins-ci.org/commit/33167 Log: [FIXED JENKINS-3796] CLI can now work with a reverse proxy that requires BASIC auth. (<a href="http://issues.jenkins-ci.org/browse/JENKINS-3796">issue 3796</a>)

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

              Created:
              Updated:
              Resolved: