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

CLI AuthenticationCache is not working with -remoting + @CLIMethod

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Trivial
    • Resolution: Unresolved
    • Component/s: cli, core
    • Labels:
      None
    • Similar Issues:

      Description

      When we use CLI commands like safe-restart or keep-build, the authentication cache provided by login in addition to -remoting is not working. It's due to the different way to manage those CLI commands compared to the regular one, that inherits from the CLICommand class.

      Example:

      Configure an instance with a user (login=user, password=user), and a project called "p".

      > java -jar jenkins-cli.jar -s http://localhost:8080/jenkins -remoting login --username user --password user
      > java -jar jenkins-cli.jar -s http://localhost:8080/jenkins -remoting build p
      > java -jar jenkins-cli.jar -s http://localhost:8080/jenkins -remoting keep-build p 1
      

      The build will work but the keep-build will fail because the anonymous user does not have the Run/Update permission.

        Attachments

          Issue Links

            Activity

            There are no comments yet on this issue.

              People

              • Assignee:
                wfollonier Wadeck Follonier
                Reporter:
                wfollonier Wadeck Follonier
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: