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

CLI AuthenticationCache is not working with -remoting + @CLIMethod

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • cli, core
    • None

      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.

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

              Created:
              Updated: