5

Yesterday, my jenkins master (v 1.646, linux debian Jessie 8.3) was working and several slaves was connecting on it via the jnlp command:

java -jar slave.jar -jnlpUrl http://myhost:8080/computer/bob-pc.local/slave-agent.jnlp

Now I guess something changed (war update ? plugin update ? security option changed ?) because now my slaves cant connect anymore since the jnlp command is now :

java -jar slave.jar -jnlpUrl http://myhost:8080/computer/bob-pc.local/slave-agent.jnlp -secret rt435te435a208c7201d99f7b1e5dd9c044da86d12efd8527

The -secret ... part of the command is new and I cant figure out which change added this option.

How to allow slaves to connect to jenkins master without "-secret" jnlp option ?

norisknofun
  • 859
  • 1
  • 8
  • 24
  • 1
    Have you checked *Enable security* in *Manage Jenkins > Global Security*? You can try to turn it off. – Dominik Gebhart Apr 08 '16 at 18:02
  • I switched "Configure Global Security > Authorization" to "Anyone can do anything" and it worked ! Best approach globally is to switch all security off and then reactivate them one by one. Post this as an answer if u want. – norisknofun Apr 11 '16 at 08:30
  • Try if mainframer's answer works first, as he indeed has a point in not having security enabled should only be used in rare cases as it poses high risks. – Dominik Gebhart Apr 11 '16 at 09:25

1 Answers1

12

This credential behavior is controlled by Matrix Authorization Strategy Plugin, this plugin is shipped with jenkins by default.

If you are the jenkins administrator, you can turn this off by following these steps:

Manage Jenkins -->Configure Global Security-->Access Control-->Authorization

Either in Matrix-based security or Project-based Matrix Authorization Strategy, make sure you you have checked the Connect options of Slave for Anonymous role.

enter image description here

mainframer
  • 20,411
  • 12
  • 49
  • 68
  • "Matrix-based security" was activated but then I desactivated it : Manage Jenkins -->Configure Global Security-->Access Control-->Authorization ==> "Logged-in users can do anything". Jenkins restarted, nothing changed ! – norisknofun Apr 11 '16 at 08:29
  • You should either activate "Matrix-based security" or activate "Project-based Matrix Authorization Strategy" , not "Logged-in users can do anything". And in addition, no need to restart jenkins. – mainframer Apr 11 '16 at 09:14
  • it worked ! It activated "Matrix Authorization Strategy" and followed the mainframer tip. – norisknofun Apr 11 '16 at 10:55