This is unfortunately a necessary measure.See the "Fix" section in https://wiki.jenkins-ci.org/display/SECURITY/Jenkins+Security+Advisory+2013-01-04
--
Kohsuke Kawaguchi
From a message I sent to the list a few days ago, which worked for at least some people:
>>>
I was in a slightly different situation (linux, slaves launched manually), but had the 403 as well. Fixed by going to Manage Jenkins -> Configure Global Security, and under Project-based Matrix Authorization Strategy I had to enable “connect” in the “slave” section, for user “Anonymous”.
<<<
I’m not sure if that address your problem, of what the security implications are, but anyhow …
Matthew Webber
But what about when the slave is not installed as a service? I use headless jnlp (https://wiki.jenkins-ci.org/display/JENKINS/Distributed+builds#Distributedbuilds-Launchslaveagentheadlessly) in a script that makes sure slave.jar is up to date.
It looks like should be able to authenticate with -auth or –jnlpCredentials, but neither seems to work - ideally, I’d like to use my API token rather than my password …
Is this supposed to work, or is this a request for a new feature?
From: jenkins...@googlegroups.com [mailto:jenkins...@googlegroups.com]
On Behalf Of Kohsuke Kawaguchi
Sent: 11 January 2013 14:16
To: jenkins...@googlegroups.com
Subject: Re: JNLP slave no longer works
Slaves installed as a service stores the secret token information in the startup configuration file, such as /etc/init/jenkins-slave-*.conf (Linux), /System/Library/LaunchDaemons/org.jenkins-ci.slave.*.plist (OS X), or $SLAVE_ROOT/jenkins-slave.xml (Windows). Look for seemingly meaningless hex-encoded token in this file (which is passed as an argument to the the Java program).
--
This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
The slave.jar from LTS 1.480.2 version has parameters "-auth" and "-jnlpCredentials". Neither of them seems to work, I will get a "Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/codec/binary/Base64" or "java.io.IOException: Failed to load http://bsjenkinsslave03.server.lan:8280/jenkins/computer/bsjenkinsslave03/slave-agent.jnlp: 403 Forbidden", depending on what combination of parameters I use.I consider the "manually download the jnlp file" as a very dirty quickhack... will we see a proper launching of the slaves again soon?
We'll fix this in the next mainline release, and once all the fallout bugs like this are fixed and verified, I'll plan on another LTS release.
My apologies for the problems in the mean time.
No problem! The workaround using the anonymous user is OK for me in the meantime. :)