Connecting agent to jenkins node with invalid secret key

Hi,
Agents establish a connection using the jnlp command when the secret key first 32 characters are provided instead of the all 64-characters secret key.
e.g.
following is command line provided by jenkins to connect agent to jenkins node

java -jar [agent.jar](Jenkins URL/jnlpJars/agent.jar) -jnlpUrl Jenkins URL/computer//jenkins-agent.jnlp -secret 9b52b3f7ad1fb603bee7315d0644adc98965038fcf44672be9dc053c59ee0448

but if I remove last 32 charector of secret key, It still getting connected.

java -jar [agent.jar](Jenkins URL/jnlpJars/agent.jar) -jnlpUrl Jenkins URL/computer//jenkins-agent.jnlp -secret 9b52b3f7ad1fb603bee7315d0644adc9

using jenkins version 2.332.3.

Is there any fix to this issue?

1 Like

Iā€™m not aware of any fix to that behavior. I believe that I see the same behavior with Jenkins 2.401.2, the most recent LTS release. If I pass the first 32 bytes of the secret string, the inbound agent connects from my Windows 11 machine to my Linux controller.

Probably worth raising an issue in the Jenkins issue tracker, since that is a surprising behavior.

1 Like