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

norisknofun picture norisknofun · Apr 8, 2016 · Viewed 11k times · Source

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 ?

Answer

mainframer picture mainframer · Apr 10, 2016

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