diff --git a/CHANGELOG-2.x.md b/CHANGELOG-2.x.md index ba5797a21..05664edc6 100644 --- a/CHANGELOG-2.x.md +++ b/CHANGELOG-2.x.md @@ -101,7 +101,7 @@ Release date: (Aug 5, 2016) => Jenkins 2.17, 2.19.1 LTS Fixed issues: * [JENKINS-37140](https://issues.jenkins-ci.org/browse/JENKINS-37140) - -JNLP Slave connection issue with *JNLP3-connect* protocol when the generated encrypted cookie contains a newline symbols. +JNLP Agent connection issue with *JNLP3-connect* protocol when the generated encrypted cookie contains a newline symbols. (https://github.com/jenkinsci/remoting/pull/95) * [JENKINS-36991](https://issues.jenkins-ci.org/browse/JENKINS-36991) - Unable to load class when remote classloader gets interrupted. diff --git a/CHANGELOG.md b/CHANGELOG.md index 810910a38..b8a710669 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -629,7 +629,7 @@ Release date: (Aug 5, 2016) => Jenkins 2.17, 2.19.1 LTS Fixed issues: * [JENKINS-37140](https://issues.jenkins-ci.org/browse/JENKINS-37140) - -JNLP Slave connection issue with *JNLP3-connect* protocol when the generated encrypted cookie contains a newline symbols. +JNLP Agent connection issue with *JNLP3-connect* protocol when the generated encrypted cookie contains a newline symbols. (https://github.com/jenkinsci/remoting/pull/95) * [JENKINS-36991](https://issues.jenkins-ci.org/browse/JENKINS-36991) - Unable to load class when remote classloader gets interrupted. diff --git a/README.md b/README.md index 5818e42e2..8312b3b27 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Jenkins Remoting layer Jenkins remoting is an executable JAR, which implements communication layer in [Jenkins](https://jenkins.io) automation server. -It's being used for master <=> agent(fka "slave") and master <=> CLI communications. +It's being used for master <=> agent and master <=> CLI communications. In general, this library contains the bootstrap code to bridge separate JVMs into a single semi-shared space. It includes: TCP-based communication protocols, data serialization, Java classloading. diff --git a/docs/configuration.md b/docs/configuration.md index 20f0b7505..b0f2a94f0 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -38,7 +38,7 @@ These properties require independent configuration on both sides of the channel. 2.0 1.367 JENKINS-35190 - Seconds between ping checks to monitor health of slave nodes; + Seconds between ping checks to monitor health of agent nodes; 0 to disable ping @@ -47,7 +47,7 @@ These properties require independent configuration on both sides of the channel. 2.0 1.367 N/A - If ping of slave node takes longer than this, consider it dead; + If ping of agent node takes longer than this, consider it dead; 0 to disable ping diff --git a/docs/logging.md b/docs/logging.md index a75a45c37..e4b990459 100644 --- a/docs/logging.md +++ b/docs/logging.md @@ -6,7 +6,7 @@ In Remoting logging is powered by the standard `java.util.logging` engine. The default behavior depends on the [Work Directory](workDir.md) mode. :exclamation: Note that `-loggingConfig` option and [Work directories](workDir.md) are available starting from [Remoting 3.8](../CHANGELOG.md#38). -Before this release you have to use the `-slaveLog` option or to redirect STDOUT/STDERR streams. +Before this release you have to use the `-agentLog` option or to redirect STDOUT/STDERR streams. ### Configuration @@ -33,16 +33,16 @@ Logging destinations: * Logs are being automatically rotated. By default, Remoting keeps 5 10MB files * Default logging level - `INFO` - * If the legacy `-agentLog` or `-slaveLog` option is enabled, this file logging will be disabled. + * If the legacy `-agentLog` option is enabled, this file logging will be disabled. -If `-agentLog` or `-slaveLog` are not specified, `${workDir}/${internalDir}/logs` directory will be created during the work directory initialization (if required). +If `-agentLog` are not specified, `${workDir}/${internalDir}/logs` directory will be created during the work directory initialization (if required). ### Default behavior without work directory (legacy mode) * By default, all logs within the system are being sent to _STDOUT/STDERR_ using `java.util.logging`. -* If `-agentLog` or `-slaveLog` option is specified, the log will be also forwarded to the specified file +* If `-agentLog` option is specified, the log will be also forwarded to the specified file * The existing file will be overridden on startup * Remoting does not perform automatic log rotation of this log file diff --git a/docs/protocols.md b/docs/protocols.md index da2d19087..8e8456df2 100644 --- a/docs/protocols.md +++ b/docs/protocols.md @@ -41,7 +41,7 @@ but confirmed protocol-specific issues will be closed and added to Errata. * Status: Replaced by `JNLP2-connect` -The slave sends the master the slave name it wants to register as and the computed HMAC of the slave name. +The agent sends the master the name it wants to register as and the computed HMAC of the agent name. If accepted the master will reply with a confirmation response. Then the channel gets established. @@ -55,9 +55,9 @@ It may cause performance issues on large-scale instances. * Status: Replaced by `JNLP4-connect` This is the advanced versions of the JNLP1-connect protocol. -On successful connection to the master the slave will receive a cookie from the master, which the slave stores. +On successful connection to the master the agent will receive a cookie from the master, which the agent stores. -If the slave needs to reconnect it will send the same cookie as part of the new connection request. +If the agent needs to reconnect it will send the same cookie as part of the new connection request. The master can use the cookie to determine if the incoming request is an initial connection request or a reconnection and take appropriate action. @@ -78,8 +78,8 @@ Check the bugtracker for more issues. * The protocol is disabled by default in Jenkins * **Not recommended** for use since the JNLP4-connect release -This protocol aims to improve security of JNLP-based slaves. -Both the master and the slave securely authenticate each other and then setup an encrypted channel. +This protocol aims to improve security of JNLP-based agent. +Both the master and the agent securely authenticate each other and then setup an encrypted channel. The protocol does not support non-blocking IO. For each connection a new thread is being created, and it leads to the performance degradation or @@ -94,7 +94,7 @@ There is no plan to fix these issues, usage of `JNLP4-connect` is the recommende * [JENKINS-37302](https://issues.jenkins-ci.org/browse/JENKINS-37302) - JNLP3 challenge response generates invalid string encoding, the check may fail randomly. * [JENKINS-33886](https://issues.jenkins-ci.org/browse/JENKINS-33886) - -On some configurations only one JNLP3 slave per IP address can be connected. +On some configurations only one JNLP3 agent per IP address can be connected. * [JENKINS-34121](https://issues.jenkins-ci.org/browse/JENKINS-34121) - JNLP3 cannot be used on IBM Java, which doesn't support AES/CTR/PKCS5Padding. diff --git a/docs/remoting-3-compatibility.md b/docs/remoting-3-compatibility.md index 554461499..6e9343d74 100644 --- a/docs/remoting-3-compatibility.md +++ b/docs/remoting-3-compatibility.md @@ -23,8 +23,8 @@ In Remoting 3 the required Java version is updated from Java 6 to Java 7. In **Jenkins** project: * Nothing changes, starting from 1.610 Java 6 is not supported in Jenkins, - on both master and slaves/agents -* In particular cases it was possible to run Jenkins slaves/agents on Java 6 with Remoting 2.x, + on both master and agents +* In particular cases it was possible to run Jenkins agents on Java 6 with Remoting 2.x, but this configuration was not officially supported In other projects: diff --git a/docs/tcpAgent.md b/docs/tcpAgent.md index a1bbad8e2..004923ca1 100644 --- a/docs/tcpAgent.md +++ b/docs/tcpAgent.md @@ -96,7 +96,7 @@ This allows the Windows Service infrastructure to manage the process lifecycle. To configure the agent this way, first launch the agent using one of the other mechanisms that doesn't run as headless. In the agent GUI, select "File -> Install as a service". -Additional descriptions of configuring this mechanism are located at [Installing Jenkins as a Windows service](https://wiki.jenkins.io/display/JENKINS/Installing+Jenkins+as+a+Windows+service) or [How to Install Several Windows Slaves as a Service?](https://support.cloudbees.com/hc/en-us/articles/217423827-How-to-Install-Several-Windows-Slaves-as-a-Service-) +Additional descriptions of configuring this mechanism are located at [Installing Jenkins as a Windows service](https://wiki.jenkins.io/display/JENKINS/Installing+Jenkins+as+a+Windows+service) or [How to Install Several Windows Agents as a Service?](https://support.cloudbees.com/hc/en-us/articles/217423827-How-to-Install-Several-Windows-Slaves-as-a-Service-) ## Parameters diff --git a/docs/workDir.md b/docs/workDir.md index a98772114..6b7641194 100644 --- a/docs/workDir.md +++ b/docs/workDir.md @@ -10,7 +10,7 @@ all operations were managed by library users (e.g. Jenkins agent workspaces). ### Before Remoting 3.8 (Jenkins 2.68) * There is no work directory management in Remoting itself -* Logs are not being persisted to the disk unless `-slaveLog` option is specified +* Logs are not being persisted to the disk unless `-agentLog` option is specified * JAR Cache is being stored in `${user.home}/.jenkins` unless `-jarCache` option is specified ### After Remoting 3.8 (Jenkins 2.68) diff --git a/src/main/java/org/jenkinsci/remoting/engine/HandshakeCiphers.java b/src/main/java/org/jenkinsci/remoting/engine/HandshakeCiphers.java index a6d6a37e0..b120bc3bc 100644 --- a/src/main/java/org/jenkinsci/remoting/engine/HandshakeCiphers.java +++ b/src/main/java/org/jenkinsci/remoting/engine/HandshakeCiphers.java @@ -98,12 +98,12 @@ public String decrypt(String encrypted) throws IOException { * Create a pair of AES symmetric key {@link Cipher}s that * will be used during the handshake process. * - *

The slave name and slave secret are used to create a + *

The agent name and agent secret are used to create a * {@link PBEKeySpec} and an {@link IvParameterSpec}which is then used to * create the ciphers. * - * @param salt The slave for which the handshake is taking place. - * @param secret The slave secret. + * @param salt The agent for which the handshake is taking place. + * @param secret The agent secret. */ public static HandshakeCiphers create(String salt, String secret) { try { diff --git a/src/main/java/org/jenkinsci/remoting/engine/JnlpProtocol1Handler.java b/src/main/java/org/jenkinsci/remoting/engine/JnlpProtocol1Handler.java index b606094a3..84a294713 100644 --- a/src/main/java/org/jenkinsci/remoting/engine/JnlpProtocol1Handler.java +++ b/src/main/java/org/jenkinsci/remoting/engine/JnlpProtocol1Handler.java @@ -43,11 +43,11 @@ /** * Implementation of the JNLP-connect protocol. * - * The slave sends the master the slave name it wants to register as and the - * computed HMAC of the slave name. If accepted the master will reply with a + * The agent sends the master the agent name it wants to register as and the + * computed HMAC of the agent name. If accepted the master will reply with a * confirmation response. * - * This was the first protocol supported by Jenkins. JNLP slaves will use this + * This was the first protocol supported by Jenkins. JNLP agents will use this * as a last resort when connecting to old versions of Jenkins masters. * * @since 3.0 diff --git a/src/main/java/org/jenkinsci/remoting/engine/JnlpProtocol2Handler.java b/src/main/java/org/jenkinsci/remoting/engine/JnlpProtocol2Handler.java index 8eeee1bcf..f23b26b75 100644 --- a/src/main/java/org/jenkinsci/remoting/engine/JnlpProtocol2Handler.java +++ b/src/main/java/org/jenkinsci/remoting/engine/JnlpProtocol2Handler.java @@ -47,10 +47,10 @@ * Implementation of the JNLP2-connect protocol. * * This is an extension of the JNLP1-connect protocol. On successful - * connection to the master the slave will receive a cookie from the master, - * which the slave stores. + * connection to the master the agent will receive a cookie from the master, + * which the agent stores. * - * If the slave needs to reconnect it will send the same cookie as part of + * If the agent needs to reconnect it will send the same cookie as part of * the new connection request. The master can use the cookie to determine if * the incoming request is an initial connection request or a reconnection * and take appropriate action. diff --git a/src/main/java/org/jenkinsci/remoting/engine/JnlpProtocol3Handler.java b/src/main/java/org/jenkinsci/remoting/engine/JnlpProtocol3Handler.java index d233ca575..841c5d6ee 100644 --- a/src/main/java/org/jenkinsci/remoting/engine/JnlpProtocol3Handler.java +++ b/src/main/java/org/jenkinsci/remoting/engine/JnlpProtocol3Handler.java @@ -59,29 +59,29 @@ * Implementation of the JNLP3-connect protocol. * *

This protocol aims to provide a basic level of security for JNLP based - * slaves. Both the master and the slave securely authenticate each other and + * agents. Both the master and the agent securely authenticate each other and * then setup an encrypted {@link Channel}. * - *

The slave secret is never exchanged, but instead used as a shared secret + *

The agent secret is never exchanged, but instead used as a shared secret * to generate matching symmetric key {@link javax.crypto.Cipher}s by both * sides which are used to perform a secure handshake. During the handshake - * both the slave and the master send each other challenge phrases which can - * only be decrypted with the matching cipher created with the slave secret. + * both the agent and the master send each other challenge phrases which can + * only be decrypted with the matching cipher created with the agent secret. * Once decrypted the SHA-256 hash of the challenge is computed and sent back * to authenticate. * *

Once the handshake is successful another pair of symmetric key ciphers - * are created by the slave using random keys. These are then shared with the + * are created by the agent using random keys. These are then shared with the * master. These ciphers are used to create an encrypted channel by both sides. * *

The following goes over the handshake in more detail: *

  * {@code
  * Client                                                                Master
- *           handshake ciphers = createFrom(slave name, slave secret)
+ *           handshake ciphers = createFrom(agent name, agent secret)
  *
  *   |                                                                     |
- *   |      initiate(slave name, encrypt(challenge), encrypt(cookie))      |
+ *   |      initiate(agent name, encrypt(challenge), encrypt(cookie))      |
  *   |  -------------------------------------------------------------->>>  |
  *   |                                                                     |
  *   |                       encrypt(hash(challenge))                      |
@@ -111,8 +111,8 @@
  * }
  *  
* - *

The entire process assumes the slave secret has not been leaked - * beforehand and the slave obtains it in a secure manner. + *

The entire process assumes the agent secret has not been leaked + * beforehand and the agent obtains it in a secure manner. * *

The key sizes are only 128bit since it cannot be assumed everyone has * the @@ -266,7 +266,7 @@ void receiveHandshake(@Nonnull Jnlp3ConnectionState state, @Nonnull Map * Use the tee command or network packet capturing tool to capture the traffic between the master and - * the slave, then run it through this tool to get the dump of what commands are sent between them. + * the agent, then run it through this tool to get the dump of what commands are sent between them. * * @author Kohsuke Kawaguchi */ diff --git a/src/test/java/org/jenkinsci/remoting/engine/HandshakeCiphersTest.java b/src/test/java/org/jenkinsci/remoting/engine/HandshakeCiphersTest.java index 75e442ee1..033585e56 100644 --- a/src/test/java/org/jenkinsci/remoting/engine/HandshakeCiphersTest.java +++ b/src/test/java/org/jenkinsci/remoting/engine/HandshakeCiphersTest.java @@ -38,7 +38,7 @@ public class HandshakeCiphersTest { @Test public void testEncryptDecrypt() throws Exception { - HandshakeCiphers ciphers = HandshakeCiphers.create("some slave", "some secret"); + HandshakeCiphers ciphers = HandshakeCiphers.create("some agent", "some secret"); assertNotEquals("string 1", ciphers.encrypt("string 1")); assertEquals("string 1", ciphers.decrypt(ciphers.encrypt("string 1"))); @@ -48,8 +48,8 @@ public void testEncryptDecrypt() throws Exception { @Test public void testMatchingWithSameValues() throws Exception { - HandshakeCiphers ciphers1 = HandshakeCiphers.create("some slave", "some secret"); - HandshakeCiphers ciphers2 = HandshakeCiphers.create("some slave", "some secret"); + HandshakeCiphers ciphers1 = HandshakeCiphers.create("some agent", "some secret"); + HandshakeCiphers ciphers2 = HandshakeCiphers.create("some agent", "some secret"); assertEquals("string 1", ciphers2.decrypt(ciphers1.encrypt("string 1"))); assertEquals("string 2", ciphers1.decrypt(ciphers2.encrypt("string 2"))); @@ -57,8 +57,8 @@ public void testMatchingWithSameValues() throws Exception { @Test public void testNotMatchingWithDifferentValues() throws Exception { - HandshakeCiphers ciphers1 = HandshakeCiphers.create("some slave", "some secret"); - HandshakeCiphers ciphers2 = HandshakeCiphers.create("other slave", "other secret"); + HandshakeCiphers ciphers1 = HandshakeCiphers.create("some agent", "some secret"); + HandshakeCiphers ciphers2 = HandshakeCiphers.create("other agent", "other secret"); assertNotEquals("string 1", ciphers2.decrypt(ciphers1.encrypt("string 1"))); assertNotEquals("string 2", ciphers1.decrypt(ciphers2.encrypt("string 2")));