From d611ba1b9126c1436cc58582bc4bcfc847c3294e Mon Sep 17 00:00:00 2001 From: Jeff Thompson Date: Wed, 4 Dec 2019 13:59:43 -0700 Subject: [PATCH 1/5] Remove deprecated agent protocols. --- .../slaves/DefaultJnlpSlaveReceiver.java | 2 +- .../DeprecatedAgentProtocolMonitor.java | 94 ----------- .../slaves/JnlpSlaveAgentProtocol.java | 40 +---- .../slaves/JnlpSlaveAgentProtocol2.java | 67 -------- .../slaves/JnlpSlaveAgentProtocol3.java | 64 -------- .../message.jelly | 7 - .../message.properties | 5 - .../message_bg.properties | 35 ----- .../message_it.properties | 28 ---- .../deprecationCause.jelly | 4 - .../deprecationCause.properties | 2 - .../deprecationCause_bg.properties | 26 --- .../deprecationCause_it.properties | 24 --- .../JnlpSlaveAgentProtocol/description.jelly | 4 - .../description.properties | 2 - .../description_bg.properties | 30 ---- .../description_de.properties | 24 --- .../description_it.properties | 24 --- .../description_sr.properties | 3 - .../deprecationCause.jelly | 5 - .../deprecationCause.properties | 3 - .../deprecationCause_bg.properties | 30 ---- .../deprecationCause_it.properties | 26 --- .../JnlpSlaveAgentProtocol2/description.jelly | 4 - .../description.properties | 3 - .../description_bg.properties | 33 ---- .../description_de.properties | 23 --- .../description_it.properties | 25 --- .../description_sr.properties | 3 - .../deprecationCause.jelly | 5 - .../deprecationCause.properties | 1 - .../deprecationCause_bg.properties | 26 --- .../deprecationCause_it.properties | 24 --- .../JnlpSlaveAgentProtocol3/description.jelly | 4 - .../description.properties | 1 - .../description_bg.properties | 35 ----- .../description_de.properties | 23 --- .../description_it.properties | 23 --- .../description_sr.properties | 3 - .../test/java/jenkins/AgentProtocolTest.java | 148 ------------------ .../java/jenkins/install/SetupWizardTest.java | 12 -- .../model/QueueTest/load_queue_xml/config.xml | 4 - .../config.xml | 39 ----- .../config.xml | 47 ------ .../fromPreviousCustomSetup/config.xml | 4 - 45 files changed, 3 insertions(+), 1036 deletions(-) delete mode 100644 core/src/main/java/jenkins/slaves/DeprecatedAgentProtocolMonitor.java delete mode 100644 core/src/main/java/jenkins/slaves/JnlpSlaveAgentProtocol2.java delete mode 100644 core/src/main/java/jenkins/slaves/JnlpSlaveAgentProtocol3.java delete mode 100644 core/src/main/resources/jenkins/slaves/DeprecatedAgentProtocolMonitor/message.jelly delete mode 100644 core/src/main/resources/jenkins/slaves/DeprecatedAgentProtocolMonitor/message.properties delete mode 100644 core/src/main/resources/jenkins/slaves/DeprecatedAgentProtocolMonitor/message_bg.properties delete mode 100644 core/src/main/resources/jenkins/slaves/DeprecatedAgentProtocolMonitor/message_it.properties delete mode 100644 core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol/deprecationCause.jelly delete mode 100644 core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol/deprecationCause.properties delete mode 100644 core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol/deprecationCause_bg.properties delete mode 100644 core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol/deprecationCause_it.properties delete mode 100644 core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol/description.jelly delete mode 100644 core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol/description.properties delete mode 100644 core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol/description_bg.properties delete mode 100644 core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol/description_de.properties delete mode 100644 core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol/description_it.properties delete mode 100644 core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol/description_sr.properties delete mode 100644 core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol2/deprecationCause.jelly delete mode 100644 core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol2/deprecationCause.properties delete mode 100644 core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol2/deprecationCause_bg.properties delete mode 100644 core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol2/deprecationCause_it.properties delete mode 100644 core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol2/description.jelly delete mode 100644 core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol2/description.properties delete mode 100644 core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol2/description_bg.properties delete mode 100644 core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol2/description_de.properties delete mode 100644 core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol2/description_it.properties delete mode 100644 core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol2/description_sr.properties delete mode 100644 core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol3/deprecationCause.jelly delete mode 100644 core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol3/deprecationCause.properties delete mode 100644 core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol3/deprecationCause_bg.properties delete mode 100644 core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol3/deprecationCause_it.properties delete mode 100644 core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol3/description.jelly delete mode 100644 core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol3/description.properties delete mode 100644 core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol3/description_bg.properties delete mode 100644 core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol3/description_de.properties delete mode 100644 core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol3/description_it.properties delete mode 100644 core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol3/description_sr.properties delete mode 100644 test/src/test/java/jenkins/AgentProtocolTest.java delete mode 100644 test/src/test/resources/jenkins/AgentProtocolTest/testShouldNotDisableProtocolsForMigratedInstances/config.xml delete mode 100644 test/src/test/resources/jenkins/AgentProtocolTest/testShouldNotOverrideUserConfiguration/config.xml diff --git a/core/src/main/java/jenkins/slaves/DefaultJnlpSlaveReceiver.java b/core/src/main/java/jenkins/slaves/DefaultJnlpSlaveReceiver.java index 125084320ca7..140f466a726d 100644 --- a/core/src/main/java/jenkins/slaves/DefaultJnlpSlaveReceiver.java +++ b/core/src/main/java/jenkins/slaves/DefaultJnlpSlaveReceiver.java @@ -216,5 +216,5 @@ public void setLog(@Nonnull OutputStream log) { private static final Logger LOGGER = Logger.getLogger(DefaultJnlpSlaveReceiver.class.getName()); - private static final String COOKIE_NAME = JnlpSlaveAgentProtocol2.class.getName()+".cookie"; + private static final String COOKIE_NAME = "JnlpAgentProtocol.cookie"; } diff --git a/core/src/main/java/jenkins/slaves/DeprecatedAgentProtocolMonitor.java b/core/src/main/java/jenkins/slaves/DeprecatedAgentProtocolMonitor.java deleted file mode 100644 index b2b5843587b1..000000000000 --- a/core/src/main/java/jenkins/slaves/DeprecatedAgentProtocolMonitor.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * The MIT License - * - * Copyright (c) 2017 CloudBees, Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package jenkins.slaves; - -import hudson.Extension; -import hudson.model.AdministrativeMonitor; -import java.util.ArrayList; -import java.util.List; -import java.util.Set; -import javax.annotation.CheckForNull; -import jenkins.AgentProtocol; -import jenkins.model.Jenkins; -import org.apache.commons.lang.StringUtils; -import org.jenkinsci.Symbol; -import org.kohsuke.accmod.Restricted; -import org.kohsuke.accmod.restrictions.NoExternalUse; - - -/** - * Monitors enabled protocols and warns if an {@link AgentProtocol} is deprecated. - * - * @author Oleg Nenashev - * @since 2.75 - * @see AgentProtocol - */ -@Extension -@Symbol("deprecatedAgentProtocol") -@Restricted(NoExternalUse.class) -public class DeprecatedAgentProtocolMonitor extends AdministrativeMonitor { - - public DeprecatedAgentProtocolMonitor() { - super(); - } - - @Override - public String getDisplayName() { - return Messages.DeprecatedAgentProtocolMonitor_displayName(); - } - - @Override - public boolean isActivated() { - final Set agentProtocols = Jenkins.get().getAgentProtocols(); - for (String name : agentProtocols) { - AgentProtocol pr = AgentProtocol.of(name); - if (pr != null && pr.isDeprecated()) { - return true; - } - } - return false; - } - - @Restricted(NoExternalUse.class) - public String getDeprecatedProtocols() { - String res = getDeprecatedProtocolsString(); - return res != null ? res : "N/A"; - } - - @CheckForNull - public static String getDeprecatedProtocolsString() { - final List deprecatedProtocols = new ArrayList<>(); - final Set agentProtocols = Jenkins.get().getAgentProtocols(); - for (String name : agentProtocols) { - AgentProtocol pr = AgentProtocol.of(name); - if (pr != null && pr.isDeprecated()) { - deprecatedProtocols.add(name); - } - } - if (deprecatedProtocols.isEmpty()) { - return null; - } - return StringUtils.join(deprecatedProtocols, ','); - } -} diff --git a/core/src/main/java/jenkins/slaves/JnlpSlaveAgentProtocol.java b/core/src/main/java/jenkins/slaves/JnlpSlaveAgentProtocol.java index 4a4b55e12d31..a16a6b83360e 100644 --- a/core/src/main/java/jenkins/slaves/JnlpSlaveAgentProtocol.java +++ b/core/src/main/java/jenkins/slaves/JnlpSlaveAgentProtocol.java @@ -42,56 +42,20 @@ * @author Kohsuke Kawaguchi * @since 1.467 */ -@Extension -@Symbol("jnlp") public class JnlpSlaveAgentProtocol extends AgentProtocol { - /** - * Our logger - */ - private static final Logger LOGGER = Logger.getLogger(JnlpSlaveAgentProtocol.class.getName()); /** * This secret value is used as a seed for agents. */ public static final HMACConfidentialKey SLAVE_SECRET = new HMACConfidentialKey(JnlpSlaveAgentProtocol.class, "secret"); - private NioChannelSelector hub; - - private JnlpProtocol1Handler handler; - - @Inject - public void setHub(NioChannelSelector hub) { - this.hub = hub; - this.handler = new JnlpProtocol1Handler(JnlpAgentReceiver.DATABASE, Computer.threadPoolForRemoting, - hub.getHub(), true); - } - - @Override - public boolean isOptIn() { - return true; - } - - @Override - public boolean isDeprecated() { - return true; - } - @Override public String getName() { - return handler.isEnabled() ? handler.getName() : null; - } - - @Override - public String getDisplayName() { - return Messages.JnlpSlaveAgentProtocol_displayName(); + return null; } @Override public void handle(Socket socket) throws IOException, InterruptedException { - handler.handle(socket, - Collections.singletonMap(JnlpConnectionState.COOKIE_KEY, JnlpAgentReceiver.generateCookie()), - ExtensionList.lookup(JnlpAgentReceiver.class)); - } - + } } diff --git a/core/src/main/java/jenkins/slaves/JnlpSlaveAgentProtocol2.java b/core/src/main/java/jenkins/slaves/JnlpSlaveAgentProtocol2.java deleted file mode 100644 index d3bc1a19cb7e..000000000000 --- a/core/src/main/java/jenkins/slaves/JnlpSlaveAgentProtocol2.java +++ /dev/null @@ -1,67 +0,0 @@ -package jenkins.slaves; - -import hudson.Extension; -import hudson.ExtensionList; -import hudson.model.Computer; -import java.io.IOException; -import java.net.Socket; -import java.util.Collections; -import javax.inject.Inject; -import jenkins.AgentProtocol; -import org.jenkinsci.Symbol; -import org.jenkinsci.remoting.engine.JnlpConnectionState; -import org.jenkinsci.remoting.engine.JnlpProtocol2Handler; - -/** - * {@link JnlpSlaveAgentProtocol} Version 2. - * - *

- * This protocol extends the version 1 protocol by adding a per-client cookie, - * so that we can detect a reconnection from the agent and take appropriate action, - * when the connection disappeared without the master noticing. - * - * @author Kohsuke Kawaguchi - * @since 1.467 - */ -@Extension -@Symbol("jnlp2") -public class JnlpSlaveAgentProtocol2 extends AgentProtocol { - private NioChannelSelector hub; - - private JnlpProtocol2Handler handler; - - @Inject - public void setHub(NioChannelSelector hub) { - this.hub = hub; - this.handler = new JnlpProtocol2Handler(JnlpAgentReceiver.DATABASE, Computer.threadPoolForRemoting, - hub.getHub(), true); - } - - @Override - public String getName() { - return handler.isEnabled() ? handler.getName() : null; - } - - @Override - public boolean isOptIn() { - return true; - } - - @Override - public boolean isDeprecated() { - return true; - } - - @Override - public String getDisplayName() { - return Messages.JnlpSlaveAgentProtocol2_displayName(); - } - - @Override - public void handle(Socket socket) throws IOException, InterruptedException { - handler.handle(socket, - Collections.singletonMap(JnlpConnectionState.COOKIE_KEY, JnlpAgentReceiver.generateCookie()), - ExtensionList.lookup(JnlpAgentReceiver.class)); - } - -} diff --git a/core/src/main/java/jenkins/slaves/JnlpSlaveAgentProtocol3.java b/core/src/main/java/jenkins/slaves/JnlpSlaveAgentProtocol3.java deleted file mode 100644 index 686620548023..000000000000 --- a/core/src/main/java/jenkins/slaves/JnlpSlaveAgentProtocol3.java +++ /dev/null @@ -1,64 +0,0 @@ -package jenkins.slaves; - -import hudson.Extension; -import hudson.ExtensionList; -import hudson.model.Computer; -import java.io.IOException; -import java.net.Socket; -import java.util.Collections; -import javax.inject.Inject; -import jenkins.AgentProtocol; -import org.jenkinsci.Symbol; -import org.jenkinsci.remoting.engine.JnlpConnectionState; -import org.jenkinsci.remoting.engine.JnlpProtocol3Handler; - -/** - * Master-side implementation for JNLP3-connect protocol. - * - *

@see {@link org.jenkinsci.remoting.engine.JnlpProtocol3Handler} for more details. - * - * @since 1.653 - */ -@Deprecated -@Extension -@Symbol("jnlp3") -public class JnlpSlaveAgentProtocol3 extends AgentProtocol { - private NioChannelSelector hub; - - private JnlpProtocol3Handler handler; - - @Inject - public void setHub(NioChannelSelector hub) { - this.hub = hub; - this.handler = new JnlpProtocol3Handler(JnlpAgentReceiver.DATABASE, Computer.threadPoolForRemoting, - hub.getHub(), true); - } - - @Override - public boolean isOptIn() { - return true ; - } - - @Override - public String getName() { - return handler.isEnabled() ? handler.getName() : null; - } - - @Override - public String getDisplayName() { - return Messages.JnlpSlaveAgentProtocol3_displayName(); - } - - @Override - public boolean isDeprecated() { - return true; - } - - @Override - public void handle(Socket socket) throws IOException, InterruptedException { - handler.handle(socket, - Collections.singletonMap(JnlpConnectionState.COOKIE_KEY, JnlpAgentReceiver.generateCookie()), - ExtensionList.lookup(JnlpAgentReceiver.class)); - } - -} diff --git a/core/src/main/resources/jenkins/slaves/DeprecatedAgentProtocolMonitor/message.jelly b/core/src/main/resources/jenkins/slaves/DeprecatedAgentProtocolMonitor/message.jelly deleted file mode 100644 index e81dd150c92c..000000000000 --- a/core/src/main/resources/jenkins/slaves/DeprecatedAgentProtocolMonitor/message.jelly +++ /dev/null @@ -1,7 +0,0 @@ - - -

- ${%blurb(it.deprecatedProtocols)} - ${%See Protocol Configuration(rootURL)} -
- diff --git a/core/src/main/resources/jenkins/slaves/DeprecatedAgentProtocolMonitor/message.properties b/core/src/main/resources/jenkins/slaves/DeprecatedAgentProtocolMonitor/message.properties deleted file mode 100644 index a418a180c615..000000000000 --- a/core/src/main/resources/jenkins/slaves/DeprecatedAgentProtocolMonitor/message.properties +++ /dev/null @@ -1,5 +0,0 @@ -blurb=This Jenkins instance uses deprecated protocols: {0}. \ - It may impact stability of the instance. \ - If newer protocol versions are supported by all system components (agents, CLI and other clients), \ - it is highly recommended to disable the deprecated protocols. -Protocol\ Configuration=Protocol Configuration. diff --git a/core/src/main/resources/jenkins/slaves/DeprecatedAgentProtocolMonitor/message_bg.properties b/core/src/main/resources/jenkins/slaves/DeprecatedAgentProtocolMonitor/message_bg.properties deleted file mode 100644 index a001cdd2ab77..000000000000 --- a/core/src/main/resources/jenkins/slaves/DeprecatedAgentProtocolMonitor/message_bg.properties +++ /dev/null @@ -1,35 +0,0 @@ -# The MIT License -# -# Bulgarian translation: Copyright (c) 2017, Alexander Shopov -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -# This Jenkins instance uses deprecated protocols: {0}. \ -# It may impact stability of the instance. \ -# If newer protocol versions are supported by all system components (agents, CLI and other clients), \ -# it is highly recommended to disable the deprecated protocols. -blurb=\ - \u0422\u0430\u0437\u0438 \u0438\u043D\u0441\u0442\u0430\u043B\u0430\u0446\u0438\u044F \u043D\u0430 Jenkins \u0438\u0437\u043F\u043E\u043B\u0437\u0432\u0430 \u043E\u0441\u0442\u0430\u0440\u0435\u043B\u0438 \u043F\u0440\u043E\u0442\u043E\u043A\u043E\u043B\u0438: {0}. \u0422\u043E\u0432\u0430 \u043C\u043E\u0436\u0435 \u0434\u0430 \u0441\u0435\ - \u043E\u0442\u0440\u0430\u0437\u0438 \u043D\u0430 \u0441\u0442\u0430\u0431\u0438\u043B\u043D\u043E\u0441\u0442\u0442\u0430 \u045D. \u0410\u043A\u043E \u0432\u0441\u0438\u0447\u043A\u0438 \u0441\u0438\u0441\u0442\u0435\u043C\u043D\u0438 \u043A\u043E\u043C\u043F\u043E\u043D\u0435\u043D\u0442\u0438, \u043A\u0430\u0442\u043E \u0430\u0433\u0435\u043D\u0442\u0438\u0442\u0435,\ - \u043A\u043E\u043C\u0430\u043D\u0434\u043D\u0438\u044F \u0440\u0435\u0434 \u0438 \u0434\u0440\u0443\u0433\u0438\u0442\u0435 \u043A\u043B\u0438\u0435\u043D\u0442\u0438 \u043F\u043E\u0434\u0434\u044A\u0440\u0436\u0430\u0442 \u043D\u043E\u0432\u0438\u0442\u0435 \u043F\u0440\u043E\u0442\u043E\u043A\u043E\u043B\u0438, \u0441\u0438\u043B\u043D\u043E \u043F\u0440\u0435\u043F\u043E\u0440\u044A\u0447\u0432\u0430\u043C\u0435\ - \u0434\u0430 \u0438\u0437\u043A\u043B\u044E\u0447\u0438\u0442\u0435 \u043E\u0441\u0442\u0430\u0440\u0435\u043B\u0438\u0442\u0435. -# It may impact stability of the instance. \ -# If newer protocol versions are supported by all system components (agents, CLI and other clients), \ -# it is highly recommended to disable the deprecated protocols. - diff --git a/core/src/main/resources/jenkins/slaves/DeprecatedAgentProtocolMonitor/message_it.properties b/core/src/main/resources/jenkins/slaves/DeprecatedAgentProtocolMonitor/message_it.properties deleted file mode 100644 index 78f92b4903f9..000000000000 --- a/core/src/main/resources/jenkins/slaves/DeprecatedAgentProtocolMonitor/message_it.properties +++ /dev/null @@ -1,28 +0,0 @@ -# The MIT License -# -# Copyright (c) 2004-, Kohsuke Kawaguchi, Sun Microsystems, Inc., and a number of other of contributors -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -blurb=Quest''istanza di Jenkins utilizza protocolli deprecati: {0}. \ - Ci\uFFFD potrebbe influenzare la stabilit\uFFFD dell''istanza. \ - Se le nuove versioni dei protocolli sono supportate da tutti i componenti di sistema (agenti, \ - interfaccia da riga di comando e altri client), \uFFFD fortemente raccomandato disabilitare i \ - protocolli deprecati. -See\ Protocol\ Configuration=Vedi Configurazione protocollo. diff --git a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol/deprecationCause.jelly b/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol/deprecationCause.jelly deleted file mode 100644 index 9704ac6557ba..000000000000 --- a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol/deprecationCause.jelly +++ /dev/null @@ -1,4 +0,0 @@ - - - ${%message} - diff --git a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol/deprecationCause.properties b/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol/deprecationCause.properties deleted file mode 100644 index 714d1f68eaf6..000000000000 --- a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol/deprecationCause.properties +++ /dev/null @@ -1,2 +0,0 @@ -message=This protocol is an obsolete protocol, which has been replaced by version 4. \ - It is also not encrypted. diff --git a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol/deprecationCause_bg.properties b/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol/deprecationCause_bg.properties deleted file mode 100644 index 2f66522f0ed0..000000000000 --- a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol/deprecationCause_bg.properties +++ /dev/null @@ -1,26 +0,0 @@ -# The MIT License -# -# Bulgarian translation: Copyright (c) 2017, Alexander Shopov -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -# This protocol is an obsolete protocol, which has been replaced by JNLP2-connect. \ -# It is also not encrypted. -message=\ - \u0422\u043e\u0437\u0438 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u0435 \u043e\u0441\u0442\u0430\u0440\u044f\u043b \u0438 \u0435 \u0431\u0435\u0437 \u0448\u0438\u0444\u0440\u0438\u0440\u0430\u043d\u0435. \u0417\u0430\u043c\u0435\u043d\u0435\u043d \u0435 \u043e\u0442 JNLP2-connect. diff --git a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol/deprecationCause_it.properties b/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol/deprecationCause_it.properties deleted file mode 100644 index bd2140b93483..000000000000 --- a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol/deprecationCause_it.properties +++ /dev/null @@ -1,24 +0,0 @@ -# The MIT License -# -# Copyright (c) 2004-, Kohsuke Kawaguchi, Sun Microsystems, Inc., and a number of other of contributors -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -message=Questo protocollo è un protocollo obsoleto rimpiazzato da JNLP2-connect. \ - Inoltre, non è criptato. diff --git a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol/description.jelly b/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol/description.jelly deleted file mode 100644 index 55e2c974b5ba..000000000000 --- a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol/description.jelly +++ /dev/null @@ -1,4 +0,0 @@ - - - ${%summary} - diff --git a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol/description.properties b/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol/description.properties deleted file mode 100644 index f4a0f9073c87..000000000000 --- a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol/description.properties +++ /dev/null @@ -1,2 +0,0 @@ -summary=Accepts connections from remote clients so that they can be used as additional agents. \ - This protocol is unencrypted. diff --git a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol/description_bg.properties b/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol/description_bg.properties deleted file mode 100644 index 4e35de871c55..000000000000 --- a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol/description_bg.properties +++ /dev/null @@ -1,30 +0,0 @@ -# The MIT License -# -# Bulgarian translation: Copyright (c) 2016, 2017, Alexander Shopov -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -Accepts\ connections\ from\ remote\ clients\ so\ that\ they\ can\ be\ used\ as\ additional\ build\ agents=\ - \u041f\u0440\u0438\u0435\u043c\u0430\u043d\u0435 \u043d\u0430 \u0432\u0440\u044a\u0437\u043a\u0438 \u043e\u0442 \u043e\u0442\u0434\u0430\u043b\u0435\u0447\u0435\u043d\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0438, \u0442\u0430\u043a\u0430 \u0447\u0435 \u0442\u0435 \u0434\u0430 \u0441\u0435 \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0442 \u043a\u0430\u0442\u043e\ - \u0434\u043e\u043f\u044a\u043b\u043d\u0438\u0442\u0435\u043b\u043d\u0438 \u043c\u0430\u0448\u0438\u043d\u0438 \u0437\u0430 \u0438\u0437\u0433\u0440\u0430\u0436\u0434\u0430\u043d\u0435. -# Accepts connections from remote clients so that they can be used as additional agents. \ -# This protocol is unencrypted. -summary=\ - \u041f\u0440\u0438\u0435\u043c\u0430\u043d\u0435 \u043d\u0430 \u0432\u0440\u044a\u0437\u043a\u0438 \u043e\u0442 \u043e\u0442\u0434\u0430\u043b\u0435\u0447\u0435\u043d\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0438, \u0442\u0430\u043a\u0430 \u0447\u0435 \u0442\u0435 \u0434\u0430 \u0441\u0435 \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0442 \u043a\u0430\u0442\u043e\ - \u0434\u043e\u043f\u044a\u043b\u043d\u0438\u0442\u0435\u043b\u043d\u0438 \u043c\u0430\u0448\u0438\u043d\u0438 \u0437\u0430 \u0438\u0437\u0433\u0440\u0430\u0436\u0434\u0430\u043d\u0435. \u041f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u044a\u0442 \u043d\u0435 \u0435 \u0437\u0430\u0449\u0438\u0442\u0435\u043d \u0441 \u0448\u0438\u0444\u0440\u0438\u0440\u0430\u043d\u0435. diff --git a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol/description_de.properties b/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol/description_de.properties deleted file mode 100644 index 61f21fa183ef..000000000000 --- a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol/description_de.properties +++ /dev/null @@ -1,24 +0,0 @@ -# The MIT License -# -# Copyright (c) 2017 Daniel Beck and a number of other of contributors -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -summary=Bedient Verbindungen von entfernten Clients, damit diese als Agenten verwendet werden k\u00F6nnen. \ - Dieses Protokoll ist unverschl\u00FCsselt. diff --git a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol/description_it.properties b/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol/description_it.properties deleted file mode 100644 index c42ad94e0c9f..000000000000 --- a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol/description_it.properties +++ /dev/null @@ -1,24 +0,0 @@ -# The MIT License -# -# Copyright (c) 2004-, Kohsuke Kawaguchi, Sun Microsystems, Inc., and a number of other of contributors -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -summary=Accetta connessioni dai client remoti in modo che questi possano essere utilizzati \ - come agenti di compilazione aggiuntivi. Questo protocollo non è criptato. diff --git a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol/description_sr.properties b/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol/description_sr.properties deleted file mode 100644 index 3f5c9d27c2c3..000000000000 --- a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol/description_sr.properties +++ /dev/null @@ -1,3 +0,0 @@ -# This file is under the MIT License by authors - -summary=\u041f\u0440\u0438\u0445\u0432\u0430\u0442\u0430 \u0432\u0435\u0437\u0435 \u043e\u0434 \u043a\u043b\u0438\u0458\u0435\u043d\u0442\u0438\u043c\u0430 \u0434\u0430 \u0431\u0438 \u043c\u043e\u0433\u043b\u0438 \u0441\u0435 \u0443\u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0438 \u043a\u0430\u043e \u0434\u043e\u0434\u0430\u0442\u043d\u0435 \u0430\u0433\u0435\u043d\u0442\u0435 \u0437\u0430 \u0438\u0437\u0433\u0440\u0430\u0434\u045a\u0443. diff --git a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol2/deprecationCause.jelly b/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol2/deprecationCause.jelly deleted file mode 100644 index 17138fc4fed2..000000000000 --- a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol2/deprecationCause.jelly +++ /dev/null @@ -1,5 +0,0 @@ - - - ${%message} - ${%TCP Agent Protocol 2 Errata} - diff --git a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol2/deprecationCause.properties b/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol2/deprecationCause.properties deleted file mode 100644 index e84662a073dd..000000000000 --- a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol2/deprecationCause.properties +++ /dev/null @@ -1,3 +0,0 @@ -message=This protocol has known stability issues, and it is replaced by version 4. \ - It is also not encrypted. \ - See more information in the protocol Errata. diff --git a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol2/deprecationCause_bg.properties b/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol2/deprecationCause_bg.properties deleted file mode 100644 index 35fdea705a71..000000000000 --- a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol2/deprecationCause_bg.properties +++ /dev/null @@ -1,30 +0,0 @@ -# The MIT License -# -# Bulgarian translation: Copyright (c) 2017, Alexander Shopov -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -JNLP2\ Protocol\ Errata=\ - \u0413\u0440\u0435\u0448\u043a\u0438 \u0432 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 JNLP2 -# This protocol has known stability issues, and it is replaced by JNLP4. \ -# It is also not encrypted. \ -# See more information in the protocol Errata. -message=\ - \u0422\u043e\u0437\u0438 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u043d\u0435 \u0435 \u0441\u0442\u0430\u0431\u0438\u043b\u0435\u043d \u0438 \u0435 \u0437\u0430\u043c\u0435\u043d\u0435\u043d \u043e\u0442 JNLP4. \u0412 JNLP2 \u043b\u0438\u043f\u0441\u0432\u0430 \u0448\u0438\u0444\u0440\u0438\u0440\u0430\u043d\u0435.\ - \u0417\u0430 \u043f\u043e\u0432\u0435\u0447\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0432\u0438\u0436\u0442\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f\u0442\u0430 \u0437\u0430 \u0433\u0440\u0435\u0448\u043a\u0438\u0442\u0435 \u0432 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430. diff --git a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol2/deprecationCause_it.properties b/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol2/deprecationCause_it.properties deleted file mode 100644 index 8ae8437b4363..000000000000 --- a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol2/deprecationCause_it.properties +++ /dev/null @@ -1,26 +0,0 @@ -# The MIT License -# -# Copyright (c) 2004-, Kohsuke Kawaguchi, Sun Microsystems, Inc., and a number of other of contributors -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -message=Questo protocollo ha problemi di stabilità noti ed è stato sostituito da JNLP4. \ - Non è inoltre criptato. \ - Si vedano ulteriori informazioni nell''Errata corrige del protocollo. -JNLP2\ Protocol\ Errata=Errata corrige protocollo JNLP2 diff --git a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol2/description.jelly b/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol2/description.jelly deleted file mode 100644 index 55e2c974b5ba..000000000000 --- a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol2/description.jelly +++ /dev/null @@ -1,4 +0,0 @@ - - - ${%summary} - diff --git a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol2/description.properties b/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol2/description.properties deleted file mode 100644 index edb6b96c467e..000000000000 --- a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol2/description.properties +++ /dev/null @@ -1,3 +0,0 @@ -summary=Extends the version 1 protocol by adding a per-client cookie, \ -so that we can detect a reconnection from the agent and take appropriate action. \ -This protocol is unencrypted. diff --git a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol2/description_bg.properties b/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol2/description_bg.properties deleted file mode 100644 index e49efb0715e8..000000000000 --- a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol2/description_bg.properties +++ /dev/null @@ -1,33 +0,0 @@ -# The MIT License -# -# Bulgarian translation: Copyright (c) 2016, 2017, Alexander Shopov -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -Extends\ the\ version\ 1\ protocol\ by\ adding\ a\ per-client\ cookie,\ so\ that\ we\ can\ detect\ a\ reconnection\ from\ the\ agent\ and\ take\ appropriate\ action=\ - \u0420\u0430\u0437\u0448\u0438\u0440\u044f\u0432\u0430\u043d\u0435 \u043d\u0430 \u0432\u0435\u0440\u0441\u0438\u044f 1 \u043d\u0430 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430, \u043a\u0430\u0442\u043e \u0441\u0435 \u0434\u043e\u0431\u0430\u0432\u044f \u0431\u0438\u0441\u043a\u0432\u0438\u0442\u043a\u0430 \u0437\u0430 \u0432\u0441\u0435\u043a\u0438\ - \u043a\u043b\u0438\u0435\u043d\u0442. \u0422\u043e\u0432\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0432\u0430 \u043e\u0442\u043a\u0440\u0438\u0432\u0430\u043d\u0435\u0442\u043e \u043d\u0430 \u0432\u044a\u0437\u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0432\u0430\u043d\u0435\u0442\u043e \u043d\u0430 \u0432\u0440\u044a\u0437\u043a\u0438\u0442\u0435 \u043e\u0442\ - \u0430\u0433\u0435\u043d\u0442\u0438\u0442\u0435 \u0438 \u043f\u0440\u0435\u0434\u043f\u0440\u0438\u0435\u043c\u0430\u043d\u0435 \u043d\u0430 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u043e\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435. -# Extends the version 1 protocol by adding a per-client cookie, \ -# so that we can detect a reconnection from the agent and take appropriate action. \ -# This protocol is unencrypted. -summary=\ - \u0420\u0430\u0437\u0448\u0438\u0440\u044f\u0432\u0430\u043d\u0435 \u043d\u0430 \u0432\u0435\u0440\u0441\u0438\u044f 1 \u043d\u0430 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430, \u043a\u0430\u0442\u043e \u0441\u0435 \u0434\u043e\u0431\u0430\u0432\u044f \u0431\u0438\u0441\u043a\u0432\u0438\u0442\u043a\u0430 \u0437\u0430 \u0432\u0441\u0435\u043a\u0438\ - \u043a\u043b\u0438\u0435\u043d\u0442. \u0422\u043e\u0432\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0432\u0430 \u043e\u0442\u043a\u0440\u0438\u0432\u0430\u043d\u0435\u0442\u043e \u043d\u0430 \u0432\u044a\u0437\u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0432\u0430\u043d\u0435\u0442\u043e \u043d\u0430 \u0432\u0440\u044a\u0437\u043a\u0438\u0442\u0435 \u043e\u0442\ - \u0430\u0433\u0435\u043d\u0442\u0438\u0442\u0435 \u0438 \u043f\u0440\u0435\u0434\u043f\u0440\u0438\u0435\u043c\u0430\u043d\u0435 \u043d\u0430 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u043e\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435. \u0422\u043e\u0437\u0438 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u0435 \u043d\u0435\u0437\u0430\u0449\u0438\u0442\u0435\u043d. diff --git a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol2/description_de.properties b/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol2/description_de.properties deleted file mode 100644 index b4b1383d45da..000000000000 --- a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol2/description_de.properties +++ /dev/null @@ -1,23 +0,0 @@ -# The MIT License -# -# Copyright (c) 2017 Daniel Beck and a number of other of contributors -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -summary=Erweitert das Protokoll Version 1 um Identifikations-Cookies f\u00FCr Clients, so dass erneute Verbindungsversuche desselben Agenten identifiziert und entsprechend behandelt werden k\u00F6nnen. Dieses Protkoll ist unverschl\u00FCsselt. diff --git a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol2/description_it.properties b/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol2/description_it.properties deleted file mode 100644 index 3c298bbc1218..000000000000 --- a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol2/description_it.properties +++ /dev/null @@ -1,25 +0,0 @@ -# The MIT License -# -# Copyright (c) 2004-, Kohsuke Kawaguchi, Sun Microsystems, Inc., and a number of other of contributors -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -summary=Estende la versione 1 del protocollo aggiungendo un cookie per ogni client \ - in modo da rilevare una nuova connessione da parte dell''agent e intraprendere le azioni opportune. \ - Questo protocollo non è criptato. diff --git a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol2/description_sr.properties b/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol2/description_sr.properties deleted file mode 100644 index f96b74e2e01d..000000000000 --- a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol2/description_sr.properties +++ /dev/null @@ -1,3 +0,0 @@ -# This file is under the MIT License by authors - -summary=\u041d\u0430\u0434\u0433\u0440\u0430\u0452\u0443\u0458\u0435 \u0432\u0435\u0440\u0437\u0438\u0458\u0443 1 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 \u0434\u043e\u0434\u0430\u0432\u0430\u045b\u0438 cookie \u0441\u0432\u0430\u043a\u043e\u043c \u043a\u043b\u0438\u0458\u0435\u043d\u0442\u0443, \u0448\u0442\u043e \u043e\u043c\u043e\u0433\u0443\u0458\u0443\u045b\u0435 \u043f\u043e\u043d\u043e\u0432\u043e \u043f\u043e\u0432\u0435\u0437\u0438\u0432\u0430\u045a\u0435 \u0441\u0430 \u0430\u0433\u0435\u043d\u0442\u043e\u043c. diff --git a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol3/deprecationCause.jelly b/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol3/deprecationCause.jelly deleted file mode 100644 index 780b7239dbdd..000000000000 --- a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol3/deprecationCause.jelly +++ /dev/null @@ -1,5 +0,0 @@ - - - ${%This protocol is unstable. See the protocol documentation for more info.} - ${%TCP Agent Protocol 3 Errata} - diff --git a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol3/deprecationCause.properties b/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol3/deprecationCause.properties deleted file mode 100644 index 8b137891791f..000000000000 --- a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol3/deprecationCause.properties +++ /dev/null @@ -1 +0,0 @@ - diff --git a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol3/deprecationCause_bg.properties b/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol3/deprecationCause_bg.properties deleted file mode 100644 index c0ffc666021d..000000000000 --- a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol3/deprecationCause_bg.properties +++ /dev/null @@ -1,26 +0,0 @@ -# The MIT License -# -# Bulgarian translation: Copyright (c) 2017, Alexander Shopov -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -JNLP3\ Protocol\ Errata=\ - \u0413\u0440\u0435\u0448\u043a\u0438 \u0432 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 JNLP3 -This\ protocol\ is\ unstable.\ See\ the\ protocol\ documentation\ for\ more\ info.=\ - \u0422\u043e\u0437\u0438 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u0435 \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u0435\u043d. \u0417\u0430 \u043f\u043e\u0432\u0435\u0447\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0432\u0438\u0436\u0442\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f\u0442\u0430 \u043c\u0443. diff --git a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol3/deprecationCause_it.properties b/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol3/deprecationCause_it.properties deleted file mode 100644 index 9032ff199cd2..000000000000 --- a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol3/deprecationCause_it.properties +++ /dev/null @@ -1,24 +0,0 @@ -# The MIT License -# -# Copyright (c) 2004-, Kohsuke Kawaguchi, Sun Microsystems, Inc., and a number of other of contributors -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -JNLP3\ Protocol\ Errata=Errata corrige protocollo JNLP3 -This\ protocol\ is\ unstable.\ See\ the\ protocol\ documentation\ for\ more\ info.=Questo protocollo non è stabile. Si veda la documentazione del protocollo per ulteriori informazioni. diff --git a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol3/description.jelly b/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol3/description.jelly deleted file mode 100644 index 55e2c974b5ba..000000000000 --- a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol3/description.jelly +++ /dev/null @@ -1,4 +0,0 @@ - - - ${%summary} - diff --git a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol3/description.properties b/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol3/description.properties deleted file mode 100644 index ec1f6a2c89a4..000000000000 --- a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol3/description.properties +++ /dev/null @@ -1 +0,0 @@ -summary=Extends the version 2 protocol by adding basic encryption but requires a thread per client. diff --git a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol3/description_bg.properties b/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol3/description_bg.properties deleted file mode 100644 index 2a41070810a3..000000000000 --- a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol3/description_bg.properties +++ /dev/null @@ -1,35 +0,0 @@ -# The MIT License -# -# Bulgarian translation: Copyright (c) 2016, 2017 Alexander Shopov -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -Extends\ the\ version\ 2\ protocol\ by\ adding\ basic\ encryption\ but\ requires\ a\ thread\ per\ client=\ - \u0420\u0430\u0437\u0448\u0438\u0440\u044f\u0432\u0430\u043d\u0435 \u043d\u0430 \u0432\u0435\u0440\u0441\u0438\u044f 2 \u043d\u0430 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 \u043a\u0430\u0442\u043e \u0441\u0435 \u0434\u043e\u0431\u0430\u0432\u044f \u0448\u0438\u0444\u0440\u0438\u0440\u0430\u043d\u0435, \u043d\u043e \u0442\u043e\u0432\u0430\ - \u0438\u0437\u0438\u0441\u043a\u0432\u0430 \u043f\u043e \u0435\u0434\u043d\u0430 \u043d\u0438\u0448\u043a\u0430 \u0437\u0430 \u0432\u0441\u0435\u043a\u0438 \u043a\u043b\u0438\u0435\u043d\u0442 -# Extends the version 2 protocol by adding basic encryption but requires a thread per client. \ -# This protocol falls back to Java Web Start Agent Protocol/2 (unencrypted) when it can't create a secure connection. \ -# This protocol is not recommended. \ -# Use Java Web Start Agent Protocol/4 instead. -summary=\ - \u0420\u0430\u0437\u0448\u0438\u0440\u044f\u0432\u0430\u043d\u0435 \u043d\u0430 \u0432\u0435\u0440\u0441\u0438\u044f 2 \u043d\u0430 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 \u043a\u0430\u0442\u043e \u0441\u0435 \u0434\u043e\u0431\u0430\u0432\u044f \u0448\u0438\u0444\u0440\u0438\u0440\u0430\u043d\u0435, \u043d\u043e \u0442\u043e\u0432\u0430\ - \u0438\u0437\u0438\u0441\u043a\u0432\u0430 \u043f\u043e \u0435\u0434\u043d\u0430 \u043d\u0438\u0448\u043a\u0430 \u0437\u0430 \u0432\u0441\u0435\u043a\u0438 \u043a\u043b\u0438\u0435\u043d\u0442. \u041a\u043e\u0433\u0430\u0442\u043e \u043d\u0435 \u043c\u043e\u0436\u0435 \u0434\u0430 \u0441\u0435 \u0441\u044a\u0437\u0434\u0430\u0434\u0435 \u0437\u0430\u0449\u0438\u0442\u0435\u043d\u0430\ - \u0432\u0440\u044a\u0437\u043a\u0430, \u0442\u043e\u0437\u0438 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u043f\u0440\u0438\u0431\u044f\u0433\u0432\u0430 \u0434\u043e Java Web Start Agent Protocol/2, \u043a\u043e\u0439\u0442\u043e \u043d\u0435 \u0435\ - \u0448\u0438\u0444\u0440\u0438\u0440\u0430\u043d. \u0422\u043e\u0432\u0430 \u043d\u0435 \u0435 \u043f\u0440\u0435\u043f\u043e\u0440\u044a\u0447\u0438\u0442\u0435\u043b\u043d\u043e \u2014 \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0439\u0442e Java Web Start Agent\ - Protocol/4 \u0432\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0432\u0430. diff --git a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol3/description_de.properties b/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol3/description_de.properties deleted file mode 100644 index 6280077683ae..000000000000 --- a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol3/description_de.properties +++ /dev/null @@ -1,23 +0,0 @@ -# The MIT License -# -# Copyright (c) 2017 Daniel Beck and a number of other of contributors -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -summary=Erweitert das Protokoll Version 2 um einfache Verschl\u00fcsselung, aber erfordert einen Thread pro Client. diff --git a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol3/description_it.properties b/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol3/description_it.properties deleted file mode 100644 index d62d8a0aea24..000000000000 --- a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol3/description_it.properties +++ /dev/null @@ -1,23 +0,0 @@ -# The MIT License -# -# Copyright (c) 2004-, Kohsuke Kawaguchi, Sun Microsystems, Inc., and a number of other of contributors -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -summary=Estende la versione 2 del protocollo aggiungendo crittografia di base ma richiede un thread per client. diff --git a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol3/description_sr.properties b/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol3/description_sr.properties deleted file mode 100644 index 8c185f3e4bb7..000000000000 --- a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol3/description_sr.properties +++ /dev/null @@ -1,3 +0,0 @@ -# This file is under the MIT License by authors -#TODO: Summary is outdated, needs to be modified -summary=\u041d\u0430\u0434\u0433\u0440\u0430\u0452\u0443\u0458\u0435 \u0432\u0435\u0440\u0437\u0438\u0458\u0443 2 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 \u0434\u043e\u0434\u0430\u0432\u0430\u0458\u0443\u045b\u0438 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u045a\u0435 (\u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e \u0458\u0435\u0434\u0430\u043d \u043d\u0438\u0437 \u0437\u0430 \u0441\u0432\u0430\u043a\u043e\u0433 \u043a\u043b\u0438\u0458\u0435\u043d\u0442\u0430) diff --git a/test/src/test/java/jenkins/AgentProtocolTest.java b/test/src/test/java/jenkins/AgentProtocolTest.java deleted file mode 100644 index dbd4479c5a65..000000000000 --- a/test/src/test/java/jenkins/AgentProtocolTest.java +++ /dev/null @@ -1,148 +0,0 @@ -/* - * The MIT License - * - * Copyright (c) 2017 CloudBees, Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package jenkins; - -import java.util.ArrayList; -import java.util.List; -import java.util.Set; -import javax.annotation.CheckForNull; -import jenkins.install.SetupWizardTest; -import jenkins.model.Jenkins; -import jenkins.slaves.DeprecatedAgentProtocolMonitor; -import org.apache.commons.lang.StringUtils; -import static org.hamcrest.Matchers.not; -import static org.hamcrest.Matchers.nullValue; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertThat; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -import org.junit.Ignore; -import org.junit.Rule; -import org.junit.Test; -import org.jvnet.hudson.test.Issue; -import org.jvnet.hudson.test.JenkinsRule; -import org.jvnet.hudson.test.recipes.LocalData; - -/** - * Tests for {@link AgentProtocol}. - * - * @author Oleg Nenashev - */ -public class AgentProtocolTest { - - @Rule - public JenkinsRule j = new JenkinsRule(); - - //TODO: Test is unstable on CI due to the race condition, needs to be reworked - /** - * Checks that Jenkins does not disable agent protocols by default after the upgrade. - * - * @throws Exception Test failure - * @see SetupWizardTest#shouldDisableUnencryptedProtocolsByDefault() - */ - @Test - @Ignore - @LocalData - @Issue("JENKINS-45841") - public void testShouldNotDisableProtocolsForMigratedInstances() throws Exception { - assertProtocols(true, "Legacy Non-encrypted JNLP protocols should be enabled", - "JNLP-connect", "JNLP2-connect", "JNLP4-connect"); - assertProtocols(true, "Default encrypted protocols should be enabled", "JNLP4-connect"); - assertProtocols(false, "JNLP3-connect protocol should be disabled by default", "JNLP3-connect"); - assertMonitorTriggered("JNLP-connect", "JNLP2-connect"); - } - - @Test - @LocalData - @Issue("JENKINS-45841") - public void testShouldNotOverrideUserConfiguration() throws Exception { - assertEnabled("JNLP-connect", "JNLP3-connect"); - assertDisabled("JNLP2-connect", "JNLP4-connect"); - assertProtocols(true, "System protocols should be always enabled", "Ping"); - assertMonitorTriggered("JNLP-connect", "JNLP3-connect"); - } - - private void assertEnabled(String ... protocolNames) throws AssertionError { - assertProtocols(true, null, protocolNames); - } - - private void assertDisabled(String ... protocolNames) throws AssertionError { - assertProtocols(false, null, protocolNames); - } - - private void assertProtocols(boolean shouldBeEnabled, @CheckForNull String why, String ... protocolNames) { - assertProtocols(j.jenkins, shouldBeEnabled, why, protocolNames); - } - - public static void assertProtocols(Jenkins jenkins, boolean shouldBeEnabled, @CheckForNull String why, String ... protocolNames) - throws AssertionError { - Set agentProtocols = jenkins.getAgentProtocols(); - List failedChecks = new ArrayList<>(); - for (String protocol : protocolNames) { - if (shouldBeEnabled && !(agentProtocols.contains(protocol))) { - failedChecks.add(protocol); - } - if (!shouldBeEnabled && agentProtocols.contains(protocol)) { - failedChecks.add(protocol); - } - } - - if (!failedChecks.isEmpty()) { - String message = String.format("Protocol(s) are not %s: %s. %sEnabled protocols: %s", - shouldBeEnabled ? "enabled" : "disabled", - StringUtils.join(failedChecks, ','), - why != null ? "Reason: " + why + ". " : "", - StringUtils.join(agentProtocols, ',')); - fail(message); - } - } - - public static void assertMonitorNotActive(JenkinsRule j) { - DeprecatedAgentProtocolMonitor monitor = new DeprecatedAgentProtocolMonitor(); - assertFalse("Deprecated Agent Protocol Monitor should not be activated. Current protocols: " - + StringUtils.join(j.jenkins.getAgentProtocols(), ","), monitor.isActivated()); - } - - public static void assertMonitorTriggered(String ... expectedProtocols) { - DeprecatedAgentProtocolMonitor monitor = new DeprecatedAgentProtocolMonitor(); - assertTrue("Deprecated Agent Protocol Monitor should be activated", monitor.isActivated()); - String protocolList = monitor.getDeprecatedProtocols(); - assertThat("List of the protocols should not be null", protocolList, not(nullValue())); - - List failedChecks = new ArrayList<>(); - for(String protocol : expectedProtocols) { - if (!protocolList.contains(protocol)) { - failedChecks.add(protocol); - } - } - - if (!failedChecks.isEmpty()) { - String message = String.format( - "Protocol(s) should in the deprecated protocol list: %s. Current list: %s", - StringUtils.join(expectedProtocols, ','), protocolList); - fail(message); - } - } -} diff --git a/test/src/test/java/jenkins/install/SetupWizardTest.java b/test/src/test/java/jenkins/install/SetupWizardTest.java index 6afe562779bd..fd495e9ea13e 100644 --- a/test/src/test/java/jenkins/install/SetupWizardTest.java +++ b/test/src/test/java/jenkins/install/SetupWizardTest.java @@ -32,7 +32,6 @@ import java.io.File; import java.io.IOException; import java.net.MalformedURLException; -import jenkins.AgentProtocolTest; import org.apache.commons.io.FileUtils; import static org.hamcrest.Matchers.*; import org.junit.Before; @@ -115,17 +114,6 @@ public void shouldProhibitAccessToPluginListWithoutAuth() throws Exception { wc.assertFails("setupWizard/completeInstall", 403); } - @Test - @Issue("JENKINS-45841") - public void shouldDisableUnencryptedProtocolsByDefault() throws Exception { - AgentProtocolTest.assertProtocols(j.jenkins, true, - "Encrypted JNLP4-protocols protocol should be enabled", "JNLP4-connect"); - AgentProtocolTest.assertProtocols(j.jenkins, false, - "Non-encrypted JNLP protocols should be disabled by default", - "JNLP-connect", "JNLP2-connect"); - AgentProtocolTest.assertMonitorNotActive(j); - } - private String jsonRequest(JenkinsRule.WebClient wc, String path) throws Exception { // Try to call the actions method to retrieve the data final Page res; diff --git a/test/src/test/resources/hudson/model/QueueTest/load_queue_xml/config.xml b/test/src/test/resources/hudson/model/QueueTest/load_queue_xml/config.xml index d18cae81c545..011c4941a025 100644 --- a/test/src/test/resources/hudson/model/QueueTest/load_queue_xml/config.xml +++ b/test/src/test/resources/hudson/model/QueueTest/load_queue_xml/config.xml @@ -35,10 +35,6 @@ all -1 - - JNLP-connect - JNLP2-connect - false diff --git a/test/src/test/resources/jenkins/AgentProtocolTest/testShouldNotDisableProtocolsForMigratedInstances/config.xml b/test/src/test/resources/jenkins/AgentProtocolTest/testShouldNotDisableProtocolsForMigratedInstances/config.xml deleted file mode 100644 index 16c467b8076a..000000000000 --- a/test/src/test/resources/jenkins/AgentProtocolTest/testShouldNotDisableProtocolsForMigratedInstances/config.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - 1.0 - 2 - NORMAL - true - - - false - - ${ITEM_ROOTDIR}/workspace - ${ITEM_ROOTDIR}/builds - - - - - - 0 - - - - all - false - false - - - - all - 0 - - - - - \ No newline at end of file diff --git a/test/src/test/resources/jenkins/AgentProtocolTest/testShouldNotOverrideUserConfiguration/config.xml b/test/src/test/resources/jenkins/AgentProtocolTest/testShouldNotOverrideUserConfiguration/config.xml deleted file mode 100644 index fc694340f5dc..000000000000 --- a/test/src/test/resources/jenkins/AgentProtocolTest/testShouldNotOverrideUserConfiguration/config.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - 1.0 - 2 - NORMAL - true - - - false - - ${ITEM_ROOTDIR}/workspace - ${ITEM_ROOTDIR}/builds - - - - - - 0 - - - - all - false - false - - - - all - 0 - - - - CLI-connect - JNLP-connect - JNLP3-connect - - - JNLP4-connect - JNLP2-connect - - CLI2-connect - - - - - \ No newline at end of file diff --git a/test/src/test/resources/jenkins/model/JenkinsBuildsAndWorkspacesDirectoriesTest/fromPreviousCustomSetup/config.xml b/test/src/test/resources/jenkins/model/JenkinsBuildsAndWorkspacesDirectoriesTest/fromPreviousCustomSetup/config.xml index 230b8e49f090..415be22b697a 100644 --- a/test/src/test/resources/jenkins/model/JenkinsBuildsAndWorkspacesDirectoriesTest/fromPreviousCustomSetup/config.xml +++ b/test/src/test/resources/jenkins/model/JenkinsBuildsAndWorkspacesDirectoriesTest/fromPreviousCustomSetup/config.xml @@ -36,10 +36,6 @@ all -1 - - JNLP-connect - JNLP2-connect - false From 659f38886c7f1e95b0f75756aef24227f2df757b Mon Sep 17 00:00:00 2001 From: Jeff Thompson Date: Fri, 20 Dec 2019 15:26:15 -0700 Subject: [PATCH 2/5] Cleanup JavaDoc from references to removed classes. --- core/src/main/java/jenkins/slaves/JnlpAgentReceiver.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/jenkins/slaves/JnlpAgentReceiver.java b/core/src/main/java/jenkins/slaves/JnlpAgentReceiver.java index 39473d75d658..5787759a2e9a 100644 --- a/core/src/main/java/jenkins/slaves/JnlpAgentReceiver.java +++ b/core/src/main/java/jenkins/slaves/JnlpAgentReceiver.java @@ -10,7 +10,7 @@ import org.jenkinsci.remoting.engine.JnlpConnectionStateListener; /** - * Receives incoming agents connecting through {@link JnlpSlaveAgentProtocol2}, {@link JnlpSlaveAgentProtocol3}, {@link JnlpSlaveAgentProtocol4}. + * Receives incoming agents connecting through {@link JnlpSlaveAgentProtocol4}. * *

* This is useful to establish the communication with other JVMs and use them From bd0d9560dc695e8195ebdb88149d55efb4193bc8 Mon Sep 17 00:00:00 2001 From: Jeff Thompson Date: Fri, 3 Jan 2020 11:06:06 -0700 Subject: [PATCH 3/5] Update to Remoting without protocols. --- .../slaves/JnlpSlaveAgentProtocol.java | 22 +------------------ pom.xml | 2 +- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/core/src/main/java/jenkins/slaves/JnlpSlaveAgentProtocol.java b/core/src/main/java/jenkins/slaves/JnlpSlaveAgentProtocol.java index a16a6b83360e..e905d16e91c2 100644 --- a/core/src/main/java/jenkins/slaves/JnlpSlaveAgentProtocol.java +++ b/core/src/main/java/jenkins/slaves/JnlpSlaveAgentProtocol.java @@ -1,18 +1,7 @@ package jenkins.slaves; -import hudson.Extension; -import hudson.ExtensionList; -import hudson.model.Computer; -import java.io.IOException; -import java.net.Socket; -import java.util.Collections; -import java.util.logging.Logger; -import javax.inject.Inject; import jenkins.AgentProtocol; import jenkins.security.HMACConfidentialKey; -import org.jenkinsci.Symbol; -import org.jenkinsci.remoting.engine.JnlpConnectionState; -import org.jenkinsci.remoting.engine.JnlpProtocol1Handler; /** * {@link AgentProtocol} that accepts connection from agents. @@ -42,20 +31,11 @@ * @author Kohsuke Kawaguchi * @since 1.467 */ -public class JnlpSlaveAgentProtocol extends AgentProtocol { +public class JnlpSlaveAgentProtocol { /** * This secret value is used as a seed for agents. */ public static final HMACConfidentialKey SLAVE_SECRET = new HMACConfidentialKey(JnlpSlaveAgentProtocol.class, "secret"); - @Override - public String getName() { - return null; - } - - @Override - public void handle(Socket socket) throws IOException, InterruptedException { - - } } diff --git a/pom.xml b/pom.xml index ecc45c78347e..c797d08a3638 100755 --- a/pom.xml +++ b/pom.xml @@ -102,7 +102,7 @@ THE SOFTWARE. 3.2.3 - 3.36 + 3.40 3.14 From 50921ccbec5a06142fbacd9c4294fe26051baaec Mon Sep 17 00:00:00 2001 From: Jeff Thompson Date: Fri, 3 Jan 2020 12:08:24 -0700 Subject: [PATCH 4/5] Reduce JnlpSlaveAgentProtocol to minimum. Remove anything unnecessary. Move SLAVE_SECRET to JnlpAgentReceiver and alias it for existing usages. --- .../java/hudson/slaves/SlaveComputer.java | 4 +- .../jenkins/security/ConfidentialKey.java | 5 ++- .../slaves/EncryptedSlaveAgentJnlpFile.java | 2 +- .../jenkins/slaves/JnlpAgentReceiver.java | 10 ++++- .../slaves/JnlpSlaveAgentProtocol.java | 39 ++++--------------- 5 files changed, 22 insertions(+), 38 deletions(-) diff --git a/core/src/main/java/hudson/slaves/SlaveComputer.java b/core/src/main/java/hudson/slaves/SlaveComputer.java index 095ced543b74..a6c108bf113a 100644 --- a/core/src/main/java/hudson/slaves/SlaveComputer.java +++ b/core/src/main/java/hudson/slaves/SlaveComputer.java @@ -58,7 +58,7 @@ import jenkins.security.ChannelConfigurator; import jenkins.security.MasterToSlaveCallable; import jenkins.slaves.EncryptedSlaveAgentJnlpFile; -import jenkins.slaves.JnlpSlaveAgentProtocol; +import jenkins.slaves.JnlpAgentReceiver; import jenkins.slaves.RemotingVersionInfo; import jenkins.slaves.systemInfo.SlaveSystemInfo; import jenkins.util.SystemProperties; @@ -180,7 +180,7 @@ public boolean isAcceptingTasks() { * @since 1.498 */ public String getJnlpMac() { - return JnlpSlaveAgentProtocol.SLAVE_SECRET.mac(getName()); + return JnlpAgentReceiver.SLAVE_SECRET.mac(getName()); } /** diff --git a/core/src/main/java/jenkins/security/ConfidentialKey.java b/core/src/main/java/jenkins/security/ConfidentialKey.java index f428a5a42dac..8ef998a376c3 100644 --- a/core/src/main/java/jenkins/security/ConfidentialKey.java +++ b/core/src/main/java/jenkins/security/ConfidentialKey.java @@ -6,7 +6,8 @@ import javax.annotation.CheckForNull; import java.io.IOException; -import jenkins.slaves.JnlpSlaveAgentProtocol; + +import jenkins.slaves.JnlpAgentReceiver; /** * Confidential information that gets stored as a singleton in Jenkins, mostly some random token value. @@ -25,7 +26,7 @@ * for the secret to leak. * *

- * The {@link ConfidentialKey} subtypes are expected to be used as a singleton, like {@link JnlpSlaveAgentProtocol#SLAVE_SECRET}. + * The {@link ConfidentialKey} subtypes are expected to be used as a singleton, like {@link JnlpAgentReceiver#SLAVE_SECRET}. * For code that relies on XStream for persistence (such as {@link Builder}s, {@link SCM}s, and other fragment objects * around builds and jobs), {@link Secret} provides more convenient way of storing secrets. * diff --git a/core/src/main/java/jenkins/slaves/EncryptedSlaveAgentJnlpFile.java b/core/src/main/java/jenkins/slaves/EncryptedSlaveAgentJnlpFile.java index bbf6570a13cd..1c5f13279e4c 100644 --- a/core/src/main/java/jenkins/slaves/EncryptedSlaveAgentJnlpFile.java +++ b/core/src/main/java/jenkins/slaves/EncryptedSlaveAgentJnlpFile.java @@ -92,7 +92,7 @@ public void generateResponse(StaplerRequest req, final StaplerResponse res, Obje if(it instanceof SlaveComputer) { jnlpMac = Util.fromHexString(((SlaveComputer)it).getJnlpMac()); } else { - jnlpMac = JnlpSlaveAgentProtocol.SLAVE_SECRET.mac(slaveName.getBytes(StandardCharsets.UTF_8)); + jnlpMac = JnlpAgentReceiver.SLAVE_SECRET.mac(slaveName.getBytes(StandardCharsets.UTF_8)); } SecretKey key = new SecretKeySpec(jnlpMac, 0, /* export restrictions */ 128 / 8, "AES"); byte[] encrypted; diff --git a/core/src/main/java/jenkins/slaves/JnlpAgentReceiver.java b/core/src/main/java/jenkins/slaves/JnlpAgentReceiver.java index 5787759a2e9a..5464056fdbbe 100644 --- a/core/src/main/java/jenkins/slaves/JnlpAgentReceiver.java +++ b/core/src/main/java/jenkins/slaves/JnlpAgentReceiver.java @@ -6,6 +6,8 @@ import hudson.model.Slave; import java.security.SecureRandom; import javax.annotation.Nonnull; + +import jenkins.security.HMACConfidentialKey; import org.jenkinsci.remoting.engine.JnlpClientDatabase; import org.jenkinsci.remoting.engine.JnlpConnectionStateListener; @@ -29,6 +31,12 @@ */ public abstract class JnlpAgentReceiver extends JnlpConnectionStateListener implements ExtensionPoint { + /** + * This secret value is used as a seed for agents. + */ + public static final HMACConfidentialKey SLAVE_SECRET = + new HMACConfidentialKey(JnlpSlaveAgentProtocol.class, "secret"); + private static final SecureRandom secureRandom = new SecureRandom(); public static final JnlpClientDatabase DATABASE = new JnlpAgentDatabase(); @@ -62,7 +70,7 @@ public boolean exists(String clientName) { @Override public String getSecretOf(@Nonnull String clientName) { - return JnlpSlaveAgentProtocol.SLAVE_SECRET.mac(clientName); + return SLAVE_SECRET.mac(clientName); } } } diff --git a/core/src/main/java/jenkins/slaves/JnlpSlaveAgentProtocol.java b/core/src/main/java/jenkins/slaves/JnlpSlaveAgentProtocol.java index e905d16e91c2..f1c3e7d2fac6 100644 --- a/core/src/main/java/jenkins/slaves/JnlpSlaveAgentProtocol.java +++ b/core/src/main/java/jenkins/slaves/JnlpSlaveAgentProtocol.java @@ -1,41 +1,16 @@ package jenkins.slaves; -import jenkins.AgentProtocol; import jenkins.security.HMACConfidentialKey; /** - * {@link AgentProtocol} that accepts connection from agents. - * - *

Security

- *

- * Once connected, remote agents can send in commands to be - * executed on the master, so in a way this is like an rsh service. - * Therefore, it is important that we reject connections from - * unauthorized remote agents. - * - *

- * We do this by computing HMAC of the agent name. - * This code is sent to the agent inside the {@code .jnlp} file - * (this file itself is protected by HTTP form-based authentication that - * we use everywhere else in Jenkins), and the agent sends this - * token back when it connects to the master. - * Unauthorized agents can't access the protected {@code .jnlp} file, - * so it can't impersonate a valid agent. - * - *

- * We don't want to force the inbound agents to be restarted - * whenever the server restarts, so right now this secret master key - * is generated once and used forever, which makes this whole scheme - * less secure. - * - * @author Kohsuke Kawaguchi - * @since 1.467 + * This class was part of the old JNLP1 protocol, which has been removed. + * The SLAVE_SECRET was still used by some plugins. It has been moved to + * JnlpAgentReceiver as a more suitable location, but this alias retained + * for compatibility. References should be updated to the new location. */ +@Deprecated public class JnlpSlaveAgentProtocol { - /** - * This secret value is used as a seed for agents. - */ - public static final HMACConfidentialKey SLAVE_SECRET = - new HMACConfidentialKey(JnlpSlaveAgentProtocol.class, "secret"); + + public static final HMACConfidentialKey SLAVE_SECRET = JnlpAgentReceiver.SLAVE_SECRET; } From 69dcf231fc108d906328ba0f7eae36ae140651c2 Mon Sep 17 00:00:00 2001 From: Jeff Thompson Date: Mon, 6 Jan 2020 14:19:56 -0700 Subject: [PATCH 5/5] Add back in AgentProtocolTest. Add back what was actually being used and remains. --- .../test/java/jenkins/AgentProtocolTest.java | 94 +++++++++++++++++++ .../jenkins/TestJnlpSlaveAgentProtocol.java | 58 ++++++++++++ .../jenkins/TestJnlpSlaveAgentProtocol2.java | 59 ++++++++++++ .../jenkins/TestJnlpSlaveAgentProtocol3.java | 59 ++++++++++++ .../jenkins/AgentProtocolTest/config.xml | 47 ++++++++++ 5 files changed, 317 insertions(+) create mode 100644 test/src/test/java/jenkins/AgentProtocolTest.java create mode 100644 test/src/test/java/jenkins/TestJnlpSlaveAgentProtocol.java create mode 100644 test/src/test/java/jenkins/TestJnlpSlaveAgentProtocol2.java create mode 100644 test/src/test/java/jenkins/TestJnlpSlaveAgentProtocol3.java create mode 100644 test/src/test/resources/jenkins/AgentProtocolTest/config.xml diff --git a/test/src/test/java/jenkins/AgentProtocolTest.java b/test/src/test/java/jenkins/AgentProtocolTest.java new file mode 100644 index 000000000000..68548c7bfdf3 --- /dev/null +++ b/test/src/test/java/jenkins/AgentProtocolTest.java @@ -0,0 +1,94 @@ +/* + * The MIT License + * + * Copyright (c) 2017 CloudBees, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package jenkins; + +import java.util.ArrayList; +import java.util.List; +import java.util.Set; +import javax.annotation.CheckForNull; +import jenkins.model.Jenkins; +import org.apache.commons.lang.StringUtils; +import static org.junit.Assert.fail; + +import org.junit.Rule; +import org.junit.Test; +import org.jvnet.hudson.test.Issue; +import org.jvnet.hudson.test.JenkinsRule; +import org.jvnet.hudson.test.recipes.LocalData; + +/** + * Tests for {@link AgentProtocol}. + * + * @author Oleg Nenashev + */ +public class AgentProtocolTest { + + @Rule + public JenkinsRule j = new JenkinsRule(); + + @Test + @LocalData + @Issue("JENKINS-45841") + public void testShouldNotOverrideUserConfiguration() throws Exception { + assertEnabled("JNLP-connect", "JNLP3-connect"); + assertDisabled("JNLP2-connect", "JNLP4-connect"); + assertProtocols(true, "System protocols should be always enabled", "Ping"); + } + + private void assertEnabled(String ... protocolNames) throws AssertionError { + assertProtocols(true, null, protocolNames); + } + + private void assertDisabled(String ... protocolNames) throws AssertionError { + assertProtocols(false, null, protocolNames); + } + + private void assertProtocols(boolean shouldBeEnabled, @CheckForNull String why, String ... protocolNames) { + assertProtocols(j.jenkins, shouldBeEnabled, why, protocolNames); + } + + public static void assertProtocols(Jenkins jenkins, boolean shouldBeEnabled, @CheckForNull String why, String ... protocolNames) + throws AssertionError { + Set agentProtocols = jenkins.getAgentProtocols(); + List failedChecks = new ArrayList<>(); + for (String protocol : protocolNames) { + if (shouldBeEnabled && !(agentProtocols.contains(protocol))) { + failedChecks.add(protocol); + } + if (!shouldBeEnabled && agentProtocols.contains(protocol)) { + failedChecks.add(protocol); + } + } + + if (!failedChecks.isEmpty()) { + String message = String.format("Protocol(s) are not %s: %s. %sEnabled protocols: %s", + shouldBeEnabled ? "enabled" : "disabled", + StringUtils.join(failedChecks, ','), + why != null ? "Reason: " + why + ". " : "", + StringUtils.join(agentProtocols, ',')); + fail(message); + } + } + +} diff --git a/test/src/test/java/jenkins/TestJnlpSlaveAgentProtocol.java b/test/src/test/java/jenkins/TestJnlpSlaveAgentProtocol.java new file mode 100644 index 000000000000..b228e111c2f2 --- /dev/null +++ b/test/src/test/java/jenkins/TestJnlpSlaveAgentProtocol.java @@ -0,0 +1,58 @@ +/* + * The MIT License + * + * Copyright (c) 2020 CloudBees, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package jenkins; + +import hudson.Extension; +import java.net.Socket; +import org.jenkinsci.Symbol; + +@Extension +@Symbol("jnlp") +public class TestJnlpSlaveAgentProtocol extends AgentProtocol { + + @Override + public boolean isOptIn() { + return true; + } + + @Override + public boolean isDeprecated() { + return true; + } + + @Override + public String getName() { + return "JNLP-connect"; + } + + @Override + public String getDisplayName() { + return "JNLP-connect"; + } + + @Override + public void handle(Socket socket) { + } + +} diff --git a/test/src/test/java/jenkins/TestJnlpSlaveAgentProtocol2.java b/test/src/test/java/jenkins/TestJnlpSlaveAgentProtocol2.java new file mode 100644 index 000000000000..adc936104db7 --- /dev/null +++ b/test/src/test/java/jenkins/TestJnlpSlaveAgentProtocol2.java @@ -0,0 +1,59 @@ +/* + * The MIT License + * + * Copyright (c) 2020 CloudBees, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package jenkins; + +import hudson.Extension; +import org.jenkinsci.Symbol; + +import java.net.Socket; + +@Extension +@Symbol("jnlp2") +public class TestJnlpSlaveAgentProtocol2 extends AgentProtocol { + + @Override + public boolean isOptIn() { + return true; + } + + @Override + public boolean isDeprecated() { + return true; + } + + @Override + public String getName() { + return "JNLP2-connect"; + } + + @Override + public String getDisplayName() { + return "JNLP2-connect"; + } + + @Override + public void handle(Socket socket) { + } + +} diff --git a/test/src/test/java/jenkins/TestJnlpSlaveAgentProtocol3.java b/test/src/test/java/jenkins/TestJnlpSlaveAgentProtocol3.java new file mode 100644 index 000000000000..e5a1376c748c --- /dev/null +++ b/test/src/test/java/jenkins/TestJnlpSlaveAgentProtocol3.java @@ -0,0 +1,59 @@ +/* + * The MIT License + * + * Copyright (c) 2020 CloudBees, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package jenkins; + +import hudson.Extension; +import org.jenkinsci.Symbol; + +import java.net.Socket; + +@Extension +@Symbol("jnlp3") +public class TestJnlpSlaveAgentProtocol3 extends AgentProtocol { + + @Override + public boolean isOptIn() { + return true; + } + + @Override + public boolean isDeprecated() { + return true; + } + + @Override + public String getName() { + return "JNLP3-connect"; + } + + @Override + public String getDisplayName() { + return "JNLP3-connect"; + } + + @Override + public void handle(Socket socket) { + } + +} diff --git a/test/src/test/resources/jenkins/AgentProtocolTest/config.xml b/test/src/test/resources/jenkins/AgentProtocolTest/config.xml new file mode 100644 index 000000000000..fc694340f5dc --- /dev/null +++ b/test/src/test/resources/jenkins/AgentProtocolTest/config.xml @@ -0,0 +1,47 @@ + + + + 1.0 + 2 + NORMAL + true + + + false + + ${ITEM_ROOTDIR}/workspace + ${ITEM_ROOTDIR}/builds + + + + + + 0 + + + + all + false + false + + + + all + 0 + + + + CLI-connect + JNLP-connect + JNLP3-connect + + + JNLP4-connect + JNLP2-connect + + CLI2-connect + + + + + \ No newline at end of file