diff --git a/core/src/main/java/hudson/TcpSlaveAgentListener.java b/core/src/main/java/hudson/TcpSlaveAgentListener.java index 3936071de2ef..e7f037652c9b 100644 --- a/core/src/main/java/hudson/TcpSlaveAgentListener.java +++ b/core/src/main/java/hudson/TcpSlaveAgentListener.java @@ -271,14 +271,11 @@ public void run() { String protocol = s.substring(9); AgentProtocol p = AgentProtocol.of(protocol); if (p != null) { - if (Jenkins.get().getAgentProtocols().contains(protocol)) { - LOGGER.log(p instanceof PingAgentProtocol ? Level.FINE : Level.INFO, () -> "Accepted " + protocol + " connection " + connectionInfo); - p.handle(this.s); - } else { - error("Disabled protocol:" + s, this.s); - } - } else + LOGGER.log(p instanceof PingAgentProtocol ? Level.FINE : Level.INFO, () -> "Accepted " + protocol + " connection " + connectionInfo); + p.handle(this.s); + } else { error("Unknown protocol:", this.s); + } } else { error("Unrecognized protocol: " + s, this.s); } @@ -364,21 +361,11 @@ public PingAgentProtocol() { ping = "Ping\n".getBytes(StandardCharsets.UTF_8); } - @Override - public boolean isRequired() { - return true; - } - @Override public String getName() { return "Ping"; } - @Override - public String getDisplayName() { - return Messages.TcpSlaveAgentListener_PingAgentProtocol_displayName(); - } - @Override public void handle(Socket socket) throws IOException, InterruptedException { try (socket) { diff --git a/core/src/main/java/hudson/security/GlobalSecurityConfiguration.java b/core/src/main/java/hudson/security/GlobalSecurityConfiguration.java index a8657df65685..ae90b0428c7b 100644 --- a/core/src/main/java/hudson/security/GlobalSecurityConfiguration.java +++ b/core/src/main/java/hudson/security/GlobalSecurityConfiguration.java @@ -37,15 +37,12 @@ import hudson.util.FormApply; import jakarta.servlet.ServletException; import java.io.IOException; -import java.util.Set; -import java.util.TreeSet; import java.util.function.Predicate; import java.util.logging.Level; import java.util.logging.Logger; import jenkins.model.GlobalConfigurationCategory; import jenkins.model.Jenkins; import jenkins.util.ServerTcpPort; -import net.sf.json.JSONArray; import net.sf.json.JSONException; import net.sf.json.JSONObject; import org.jenkinsci.Symbol; @@ -92,11 +89,6 @@ public boolean isSlaveAgentPortEnforced() { return Jenkins.get().isSlaveAgentPortEnforced(); } - @NonNull - public Set getAgentProtocols() { - return Jenkins.get().getAgentProtocols(); - } - public boolean isDisableRememberMe() { return Jenkins.get().isDisableRememberMe(); } @@ -149,18 +141,6 @@ public boolean configure(StaplerRequest2 req, JSONObject json) throws FormExcept throw new FormException(e, "slaveAgentPortType"); } } - Set agentProtocols = new TreeSet<>(); - if (json.has("agentProtocol")) { - Object protocols = json.get("agentProtocol"); - if (protocols instanceof JSONArray) { - for (int i = 0; i < ((JSONArray) protocols).size(); i++) { - agentProtocols.add(((JSONArray) protocols).getString(i)); - } - } else { - agentProtocols.add(protocols.toString()); - } - } - j.setAgentProtocols(agentProtocols); // persist all the additional security configs boolean result = true; diff --git a/core/src/main/java/jenkins/AgentProtocol.java b/core/src/main/java/jenkins/AgentProtocol.java index d43398985810..1494dc60b183 100644 --- a/core/src/main/java/jenkins/AgentProtocol.java +++ b/core/src/main/java/jenkins/AgentProtocol.java @@ -7,8 +7,6 @@ import hudson.TcpSlaveAgentListener; import java.io.IOException; import java.net.Socket; -import java.util.Set; -import jenkins.model.Jenkins; /** * Pluggable Jenkins TCP agent protocol handler called from {@link TcpSlaveAgentListener}. @@ -18,57 +16,31 @@ * Implementations of this extension point is singleton, and its {@link #handle(Socket)} method * gets invoked concurrently whenever a new connection comes in. * - *

Extending UI

- *
- *
description.jelly
- *
Optional protocol description
- *
deprecationCause.jelly
- *
Optional. If the protocol is marked as {@link #isDeprecated()}, - * clarifies the deprecation reason and provides extra documentation links
- *
- * * @author Kohsuke Kawaguchi * @since 1.467 * @see TcpSlaveAgentListener */ public abstract class AgentProtocol implements ExtensionPoint { /** - * Allow experimental {@link AgentProtocol} implementations to declare being opt-in. - * Note that {@link Jenkins#setAgentProtocols(Set)} only records the protocols where the admin has made a - * conscious decision thus: - * - * Implementations should not transition rapidly from {@code opt-in -> opt-out -> opt-in}. - * Implementations should never flip-flop: {@code opt-in -> opt-out -> opt-in -> opt-out} as that will basically - * clear any preference that an admin has set. This latter restriction should be ok as we only ever will be - * adding new protocols and retiring old ones. - * - * @return {@code true} if the protocol requires explicit opt-in. - * @since 2.16 - * @see Jenkins#setAgentProtocols(Set) + * @deprecated no longer used */ + @Deprecated public boolean isOptIn() { return false; } + /** - * Allow essential {@link AgentProtocol} implementations (basically {@link TcpSlaveAgentListener.PingAgentProtocol}) - * to be always enabled. - * - * @return {@code true} if the protocol can never be disabled. - * @since 2.16 + * @deprecated no longer used */ - + @Deprecated public boolean isRequired() { return false; } /** - * Checks if the protocol is deprecated. - * - * @since 2.75 + * @deprecated no longer used */ + @Deprecated public boolean isDeprecated() { return false; } @@ -79,17 +51,15 @@ public boolean isDeprecated() { * This is a short string that consists of printable ASCII chars. Sent by the client to select the protocol. * * @return - * null to be disabled. This is useful for avoiding getting used - * until the protocol is properly configured. + * null to be disabled */ + @CheckForNull public abstract String getName(); /** - * Returns the human readable protocol display name. - * - * @return the human readable protocol display name. - * @since 2.16 + * @deprecated no longer used */ + @Deprecated public String getDisplayName() { return getName(); } diff --git a/core/src/main/java/jenkins/model/Jenkins.java b/core/src/main/java/jenkins/model/Jenkins.java index 6db36176c6c2..bedbea0af7c4 100644 --- a/core/src/main/java/jenkins/model/Jenkins.java +++ b/core/src/main/java/jenkins/model/Jenkins.java @@ -656,47 +656,6 @@ private static int getSlaveAgentPortInitialValue(int def) { */ private static final boolean SLAVE_AGENT_PORT_ENFORCE = SystemProperties.getBoolean(Jenkins.class.getName() + ".slaveAgentPortEnforce", false); - /** - * The TCP agent protocols that are explicitly disabled (we store the disabled ones so that newer protocols - * are enabled by default). Will be {@code null} instead of empty to simplify XML format. - * - * @since 2.16 - */ - @CheckForNull - @GuardedBy("this") - private List disabledAgentProtocols; - /** - * @deprecated Just a temporary buffer for XSTream migration code from JENKINS-39465, do not use - */ - @Deprecated - private transient String[] _disabledAgentProtocols; - - /** - * The TCP agent protocols that are {@link AgentProtocol#isOptIn()} and explicitly enabled. - * Will be {@code null} instead of empty to simplify XML format. - * - * @since 2.16 - */ - @CheckForNull - @GuardedBy("this") - private List enabledAgentProtocols; - /** - * @deprecated Just a temporary buffer for XSTream migration code from JENKINS-39465, do not use - */ - @Deprecated - private transient String[] _enabledAgentProtocols; - - /** - * The TCP agent protocols that are enabled. Built from {@link #disabledAgentProtocols} and - * {@link #enabledAgentProtocols}. - * - * @since 2.16 - * @see #setAgentProtocols(Set) - * @see #getAgentProtocols() - */ - @GuardedBy("this") - private transient Set agentProtocols; - /** * Whitespace-separated labels assigned to the built-in node as a {@link Node}. */ @@ -1096,18 +1055,6 @@ protected Object readResolve() { if (SLAVE_AGENT_PORT_ENFORCE) { slaveAgentPort = getSlaveAgentPortInitialValue(slaveAgentPort); } - synchronized (this) { - if (disabledAgentProtocols == null && _disabledAgentProtocols != null) { - disabledAgentProtocols = Arrays.asList(_disabledAgentProtocols); - _disabledAgentProtocols = null; - } - if (enabledAgentProtocols == null && _enabledAgentProtocols != null) { - enabledAgentProtocols = Arrays.asList(_enabledAgentProtocols); - _enabledAgentProtocols = null; - } - // Invalidate the protocols cache after the reload - agentProtocols = null; - } // no longer persisted installStateName = null; @@ -1282,81 +1229,15 @@ private void forceSetSlaveAgentPort(int port) throws IOException { */ @NonNull public synchronized Set getAgentProtocols() { - if (agentProtocols == null) { - Set result = new TreeSet<>(); - Set disabled = new TreeSet<>(); - for (String p : Util.fixNull(disabledAgentProtocols)) { - disabled.add(p.trim()); - } - Set enabled = new TreeSet<>(); - for (String p : Util.fixNull(enabledAgentProtocols)) { - enabled.add(p.trim()); - } - for (AgentProtocol p : AgentProtocol.all()) { - String name = p.getName(); - if (name != null && (p.isRequired() - || (!disabled.contains(name) && (!p.isOptIn() || enabled.contains(name))))) { - result.add(name); - } - } - /* - * An empty result is almost never valid, but it can happen due to JENKINS-70206. Since we know the result - * is likely incorrect, at least decline to cache it so that a correct result can be computed later on - * rather than continuing to deliver the incorrect result indefinitely. - */ - if (!result.isEmpty()) { - agentProtocols = result; - } - return result; - } - return agentProtocols; + return AgentProtocol.all().stream().map(AgentProtocol::getName).filter(Objects::nonNull).collect(Collectors.toCollection(TreeSet::new)); } /** - * Sets the enabled agent protocols. - * - * @param protocols the enabled agent protocols. - * @since 2.16 + * @deprecated No longer does anything. */ + @Deprecated public synchronized void setAgentProtocols(@NonNull Set protocols) { - Set disabled = new TreeSet<>(); - Set enabled = new TreeSet<>(); - for (AgentProtocol p : AgentProtocol.all()) { - String name = p.getName(); - if (name != null && !p.isRequired()) { - // we want to record the protocols where the admin has made a conscious decision - // thus, if a protocol is opt-in, we record the admin enabling it - // if a protocol is opt-out, we record the admin disabling it - // We should not transition rapidly from opt-in -> opt-out -> opt-in - // the scenario we want to have work is: - // 1. We introduce a new protocol, it starts off as opt-in. Some admins decide to test and opt-in - // 2. We decide that the protocol is ready for general use. It gets marked as opt-out. Any admins - // that took part in early testing now have their config switched to not mention the new protocol - // at all when they save their config as the protocol is now opt-out. Any admins that want to - // disable it can do so and will have their preference recorded. - // 3. We decide that the protocol needs to be retired. It gets switched back to opt-in. At this point - // the initial opt-in admins, assuming they visited an upgrade to a controller with step 2, will - // have the protocol disabled for them. This is what we want. If they didn't upgrade to a controller - // with step 2, well there is not much we can do to differentiate them from somebody who is upgrading - // from a previous step 3 controller and had needed to keep the protocol turned on. - // - // What we should never do is flip-flop: opt-in -> opt-out -> opt-in -> opt-out as that will basically - // clear any preference that an admin has set, but this should be ok as we only ever will be - // adding new protocols and retiring old ones. - if (p.isOptIn()) { - if (protocols.contains(name)) { - enabled.add(name); - } - } else { - if (!protocols.contains(name)) { - disabled.add(name); - } - } - } - } - disabledAgentProtocols = disabled.isEmpty() ? null : new ArrayList<>(disabled); - enabledAgentProtocols = enabled.isEmpty() ? null : new ArrayList<>(enabled); - agentProtocols = null; + LOGGER.log(Level.WARNING, null, new IllegalStateException("Jenkins.agentProtocols no longer configurable")); } private void launchTcpSlaveAgentListener() throws IOException { @@ -6000,8 +5881,6 @@ public boolean shouldShowStackTrace() { // for backward compatibility with <1.75, recognize the tag name "view" as well. XSTREAM.alias("view", ListView.class); XSTREAM.alias("listView", ListView.class); - XSTREAM.addImplicitArray(Jenkins.class, "_disabledAgentProtocols", "disabledAgentProtocol"); - XSTREAM.addImplicitArray(Jenkins.class, "_enabledAgentProtocols", "enabledAgentProtocol"); XSTREAM2.addCriticalField(Jenkins.class, "securityRealm"); XSTREAM2.addCriticalField(Jenkins.class, "authorizationStrategy"); // this seems to be necessary to force registration of converter early enough diff --git a/core/src/main/java/jenkins/slaves/JnlpSlaveAgentProtocol4.java b/core/src/main/java/jenkins/slaves/JnlpSlaveAgentProtocol4.java index 54c1402927a9..87eb26daeb4c 100644 --- a/core/src/main/java/jenkins/slaves/JnlpSlaveAgentProtocol4.java +++ b/core/src/main/java/jenkins/slaves/JnlpSlaveAgentProtocol4.java @@ -137,16 +137,6 @@ private char[] constructPassword() { return "password".toCharArray(); } - @Override - public boolean isOptIn() { - return false; - } - - @Override - public String getDisplayName() { - return Messages.JnlpSlaveAgentProtocol4_displayName(); - } - @Override public String getName() { return "JNLP4-connect"; // matches JnlpProtocol4Handler.getName diff --git a/core/src/main/resources/hudson/Messages.properties b/core/src/main/resources/hudson/Messages.properties index 99c77ebbed46..a15f31703cd0 100644 --- a/core/src/main/resources/hudson/Messages.properties +++ b/core/src/main/resources/hudson/Messages.properties @@ -127,7 +127,6 @@ PluginWrapper.Plugin.Has.Dependent=The plugin ''{0}'' has, at least, one depende PluginWrapper.Plugin.Disabled=Plugin ''{0}'' disabled PluginWrapper.NoSuchPlugin=No such plugin found with the name ''{0}'' PluginWrapper.Error.Disabling=There was an error disabling the ''{0}'' plugin. Error: ''{1}'' -TcpSlaveAgentListener.PingAgentProtocol.displayName=Ping protocol ProxyConfigurationManager.DisplayName=Proxy Configuration ProxyConfigurationManager.Description=Configure the http proxy used by Jenkins diff --git a/core/src/main/resources/hudson/Messages_bg.properties b/core/src/main/resources/hudson/Messages_bg.properties index 98b816053e44..e741c7400a06 100644 --- a/core/src/main/resources/hudson/Messages_bg.properties +++ b/core/src/main/resources/hudson/Messages_bg.properties @@ -105,9 +105,6 @@ PluginWrapper.disabledAndObsolete=\ # {0} is disabled. To fix, enable it. PluginWrapper.disabled=\ „{0}“ е изключена. Включете я. -# Ping protocol -TcpSlaveAgentListener.PingAgentProtocol.displayName=\ - Протокол „ping“ # {0} v{1} failed to load. Fix this plugin first. PluginWrapper.failed_to_load_dependency=\ „{0}“, версия {1} не се зареди. Оправете приставката. diff --git a/core/src/main/resources/hudson/Messages_de.properties b/core/src/main/resources/hudson/Messages_de.properties index e4068a20b58a..d524a518cd44 100644 --- a/core/src/main/resources/hudson/Messages_de.properties +++ b/core/src/main/resources/hudson/Messages_de.properties @@ -75,5 +75,3 @@ AboutJenkins.DisplayName=Über Jenkins AboutJenkins.Description=Versions- und Lizenzinformationen anzeigen. Functions.NoExceptionDetails=Keine Details zum Ausnahmefehler - -TcpSlaveAgentListener.PingAgentProtocol.displayName=Ping-Protokoll diff --git a/core/src/main/resources/hudson/Messages_es.properties b/core/src/main/resources/hudson/Messages_es.properties index 298ef23821d8..47d3b400c747 100644 --- a/core/src/main/resources/hudson/Messages_es.properties +++ b/core/src/main/resources/hudson/Messages_es.properties @@ -117,4 +117,3 @@ PluginWrapper.Plugin.Has.Dependant=El plugin {0} tiene, al menos, un plugin depe PluginWrapper.Plugin.Disabled=Plugin {0} deshabilitado PluginWrapper.NoSuchPlugin=No se encuentra un plugin con el nombre {0} PluginWrapper.Error.Disabling=Hubo un error al desactivar el plugin ''{0}''. Error: ''{1}'' -TcpSlaveAgentListener.PingAgentProtocol.displayName=Protocolo ping diff --git a/core/src/main/resources/hudson/Messages_fr.properties b/core/src/main/resources/hudson/Messages_fr.properties index 1e0286deddc5..06e739d3b479 100644 --- a/core/src/main/resources/hudson/Messages_fr.properties +++ b/core/src/main/resources/hudson/Messages_fr.properties @@ -126,4 +126,3 @@ PluginWrapper.Plugin.Has.Dependent=Le plugin "{0}" a au moins un plugin dépenda PluginWrapper.Plugin.Disabled=Plugin "{0}" désactivé PluginWrapper.NoSuchPlugin=Aucun plugin trouvé avec le nom "{0}" PluginWrapper.Error.Disabling=Une erreur a été relevée lors de la désactivation du plugin "{0}". Erreur : "{1}" -TcpSlaveAgentListener.PingAgentProtocol.displayName=Protocole de ping diff --git a/core/src/main/resources/hudson/Messages_it.properties b/core/src/main/resources/hudson/Messages_it.properties index 2747e2d39366..d63200aabd1e 100644 --- a/core/src/main/resources/hudson/Messages_it.properties +++ b/core/src/main/resources/hudson/Messages_it.properties @@ -109,7 +109,6 @@ ProxyConfiguration.MalformedTestUrl=URL di prova {0} malformato. ProxyConfiguration.NonTLSWarning=Jenkins supporta solo l''utilizzo di una connessione http al proxy. Le credenziali potrebbero essere esposte a qualcuno sulla stessa rete. ProxyConfiguration.Success=Connessione riuscita (codice {0}) ProxyConfiguration.TestUrlRequired=È richiesto un URL di prova. -TcpSlaveAgentListener.PingAgentProtocol.displayName=Protocollo ping Util.day={0} g Util.hour={0} h Util.millisecond={0} ms diff --git a/core/src/main/resources/hudson/Messages_pt_BR.properties b/core/src/main/resources/hudson/Messages_pt_BR.properties index 0a809578524e..d67bdcba599c 100644 --- a/core/src/main/resources/hudson/Messages_pt_BR.properties +++ b/core/src/main/resources/hudson/Messages_pt_BR.properties @@ -57,7 +57,6 @@ PluginWrapper.missing=Não foi possível encontrar {0} v{1}. Para corrigir, inst Functions.NoExceptionDetails=Sem detalhes da exception FilePath.validateAntFileMask.whitespaceSeparator=Espaços em branco não podem mais serem utilizados como separador. Por \ favor use ", " como separadores. -TcpSlaveAgentListener.PingAgentProtocol.displayName=Protocolo de ping PluginWrapper.PluginWrapperAdministrativeMonitor.DisplayName=Falha ao carregar a extensão ProxyConfiguration.MalformedTestUrl=URL de teste {0} inválida. FilePath.TildaDoesntWork="~" é suportado apenas em um shell Unix e em nenhum outro lugar. diff --git a/core/src/main/resources/hudson/Messages_sr.properties b/core/src/main/resources/hudson/Messages_sr.properties index 3c266c5d67a3..414a84b3a41b 100644 --- a/core/src/main/resources/hudson/Messages_sr.properties +++ b/core/src/main/resources/hudson/Messages_sr.properties @@ -40,4 +40,3 @@ PluginWrapper.disabledAndObsolete={0}, верзија {1} је онемогућ PluginWrapper.disabled={0}, верзија {1} је онемогућено. Молимо вас, омогућите ову модулу. PluginWrapper.obsolete={0}, верзија {1} је старије него што је подржано. Инсталирајте верзију {2} или новије. PluginWrapper.obsoleteCore=Морате ажурирати Jenkins са верзије {0} на {1} или новије да би могли користити ову модулу. -TcpSlaveAgentListener.PingAgentProtocol.displayName=Протокол 'ping' diff --git a/core/src/main/resources/hudson/Messages_sv_SE.properties b/core/src/main/resources/hudson/Messages_sv_SE.properties index fdfa6ee3a524..f4a977e99098 100644 --- a/core/src/main/resources/hudson/Messages_sv_SE.properties +++ b/core/src/main/resources/hudson/Messages_sv_SE.properties @@ -125,7 +125,6 @@ PluginWrapper.Plugin.Has.Dependent=Insticksprogrammet ''{0}'' har minst ett bero PluginWrapper.Plugin.Disabled=Insticksprogrammet ''{0}'' inaktiverades PluginWrapper.NoSuchPlugin=Inget insticksprogram med namnet ''{0}'' hittades PluginWrapper.Error.Disabling=Ett fel uppstod när insticksprogrammet ''{0}'' inaktiverades. Fel: ''{1}'' -TcpSlaveAgentListener.PingAgentProtocol.displayName=Ping-protokoll ProxyConfigurationManager.DisplayName=Proxykonfiguration ProxyConfigurationManager.Description=Konfigurera http-proxyn som Jenkins använder diff --git a/core/src/main/resources/hudson/Messages_zh_TW.properties b/core/src/main/resources/hudson/Messages_zh_TW.properties index 708613e7e603..cc5fb76cb059 100644 --- a/core/src/main/resources/hudson/Messages_zh_TW.properties +++ b/core/src/main/resources/hudson/Messages_zh_TW.properties @@ -96,7 +96,6 @@ PluginWrapper.Plugin.Has.Dependent=外掛「{0}」有至少一個相依性外掛 PluginWrapper.Plugin.Disabled=已停用外掛「{0}」 PluginWrapper.NoSuchPlugin=找不到名為「{0}」的外掛 PluginWrapper.Error.Disabling=停用外掛「{0}」時發生錯誤,錯誤\: 「{1}」 -TcpSlaveAgentListener.PingAgentProtocol.displayName=Ping 協定 PluginManager.emptyUpdateSiteUrl=更新站台網址不得為空,請輸入網址 PluginManager.connectionFailed=無法連線至這個URL diff --git a/core/src/main/resources/hudson/security/GlobalSecurityConfiguration/help-agentProtocol.html b/core/src/main/resources/hudson/security/GlobalSecurityConfiguration/help-agentProtocol.html deleted file mode 100644 index 01bcd8d3b24b..000000000000 --- a/core/src/main/resources/hudson/security/GlobalSecurityConfiguration/help-agentProtocol.html +++ /dev/null @@ -1,4 +0,0 @@ -
- Jenkins uses a TCP port to communicate with various remote agents. This option - allows control over which agent protocols are enabled. -
diff --git a/core/src/main/resources/hudson/security/GlobalSecurityConfiguration/help-agentProtocol_bg.html b/core/src/main/resources/hudson/security/GlobalSecurityConfiguration/help-agentProtocol_bg.html deleted file mode 100644 index 41852a0729a8..000000000000 --- a/core/src/main/resources/hudson/security/GlobalSecurityConfiguration/help-agentProtocol_bg.html +++ /dev/null @@ -1,4 +0,0 @@ -
- Jenkins използва порт па TCP, за да комуникира с подчинените компютри. Тази - опция задава кои протоколи за връзка са включени. -
diff --git a/core/src/main/resources/hudson/security/GlobalSecurityConfiguration/help-agentProtocol_it.html b/core/src/main/resources/hudson/security/GlobalSecurityConfiguration/help-agentProtocol_it.html deleted file mode 100644 index 2adbe90a72a1..000000000000 --- a/core/src/main/resources/hudson/security/GlobalSecurityConfiguration/help-agentProtocol_it.html +++ /dev/null @@ -1,4 +0,0 @@ -
- Jenkins utilizza una porta TCP per comunicare con vari agenti remoti. - Quest'opzione consente di controllare i vari protocolli agente abilitati. -
diff --git a/core/src/main/resources/hudson/security/GlobalSecurityConfiguration/help-agentProtocol_sv_SE.html b/core/src/main/resources/hudson/security/GlobalSecurityConfiguration/help-agentProtocol_sv_SE.html deleted file mode 100644 index adf57097bb6f..000000000000 --- a/core/src/main/resources/hudson/security/GlobalSecurityConfiguration/help-agentProtocol_sv_SE.html +++ /dev/null @@ -1,5 +0,0 @@ -
- Jenkins använder en TCP-port för att kommunicera med olika fjärragenter. Det - här alternativet gör det möjligt att kontrollera vilka agentprotokoll som är - aktiverade. -
diff --git a/core/src/main/resources/hudson/security/GlobalSecurityConfiguration/index.groovy b/core/src/main/resources/hudson/security/GlobalSecurityConfiguration/index.groovy index 2abc4e795cc0..9c3c80607ca8 100644 --- a/core/src/main/resources/hudson/security/GlobalSecurityConfiguration/index.groovy +++ b/core/src/main/resources/hudson/security/GlobalSecurityConfiguration/index.groovy @@ -3,7 +3,6 @@ package hudson.security.GlobalSecurityConfiguration import hudson.security.SecurityRealm import hudson.markup.MarkupFormatterDescriptor import hudson.security.AuthorizationStrategy -import jenkins.AgentProtocol import hudson.Functions import hudson.model.Descriptor @@ -51,33 +50,6 @@ l.layout(permission:app.SYSTEM_READ, title:my.displayName, cssclass:request.getP f.serverTcpPort() } } - f.advanced(title: _("Agent protocols"), align:"left") { - f.entry(title: _("Agent protocols"), help: '/descriptor/hudson.security.GlobalSecurityConfiguration/help/agentProtocol') { - def agentProtocols = my.agentProtocols - div() { - for (AgentProtocol p : AgentProtocol.all()) { - if (p.name != null && !p.required) { - f.block() { - f.checkbox(name: "agentProtocol", - title: p.displayName, - checked: agentProtocols.contains(p.name), - json: p.name) - } - div(class: "tr") { - div(class:"setting-description"){ - st.include(from:p, page: "description", optional:true) - if (p.deprecated) { - br() - text(b(_("Deprecated. "))) - st.include(from:p, page: "deprecationCause", optional:true) - } - } - } - } - } - } - } - } } Functions.getSortedDescriptorsForGlobalConfigByDescriptor(my.FILTER).each { Descriptor descriptor -> diff --git a/core/src/main/resources/hudson/security/GlobalSecurityConfiguration/index_it.properties b/core/src/main/resources/hudson/security/GlobalSecurityConfiguration/index_it.properties index 9b343aab6b5e..ba6cf0fe694f 100644 --- a/core/src/main/resources/hudson/security/GlobalSecurityConfiguration/index_it.properties +++ b/core/src/main/resources/hudson/security/GlobalSecurityConfiguration/index_it.properties @@ -25,7 +25,6 @@ Agent\ protocols=Protocolli agente Agents=Agenti Authentication=Autenticazione Authorization=Autorizzazione -Deprecated.\ =Deprecato. Disable\ remember\ me=Disabilita "Ricordami" LOADING=Caricamento in corso Markup\ Formatter=Componente formattazione markup diff --git a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol4/description.jelly b/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol4/description.jelly deleted file mode 100644 index 55e2c974b5ba..000000000000 --- a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol4/description.jelly +++ /dev/null @@ -1,4 +0,0 @@ - - - ${%summary} - diff --git a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol4/description.properties b/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol4/description.properties deleted file mode 100644 index 4ecb60357fd6..000000000000 --- a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol4/description.properties +++ /dev/null @@ -1 +0,0 @@ -summary=A TLS secured connection between the controller and the agent performed by TLS upgrade of the socket. diff --git a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol4/description_bg.properties b/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol4/description_bg.properties deleted file mode 100644 index 4d13804ebdad..000000000000 --- a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol4/description_bg.properties +++ /dev/null @@ -1,26 +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. - -# A TLS secured connection between the master and the agent performed by TLS upgrade of the socket. -summary=\ - Защитена връзка между управляващия и подчинения компютър чрез преминаване към\ - TLS по гнездото. diff --git a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol4/description_de.properties b/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol4/description_de.properties deleted file mode 100644 index 77064f1441ee..000000000000 --- a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol4/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=Eine TLS-gesicherte Verbindung zwischen Master-Knoten und Agenten über TLS-Upgrade des Sockets. diff --git a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol4/description_fr.properties b/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol4/description_fr.properties deleted file mode 100644 index 26c2dd5b35c8..000000000000 --- a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol4/description_fr.properties +++ /dev/null @@ -1 +0,0 @@ -summary=Une connexion TLS sécurisée entre le contrôleur et l''agent a été effectuée via une mise à jour du TLS du socket. diff --git a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol4/description_it.properties b/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol4/description_it.properties deleted file mode 100644 index 2d9452d7f068..000000000000 --- a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol4/description_it.properties +++ /dev/null @@ -1,25 +0,0 @@ -# The MIT License -# -# Italian localization plugin for Jenkins -# Copyright © 2020 Alessandro Menti -# -# 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=Una connessione fra il master e l''agente protetta da TLS ed \ - eseguita aggiornando il socket a TLS. diff --git a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol4/description_pt_BR.properties b/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol4/description_pt_BR.properties deleted file mode 100644 index 74e67bc910b6..000000000000 --- a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol4/description_pt_BR.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=Uma conexão segura via TLS entre o controlador e o agente realizada por uma atualização de TLS no soquete. diff --git a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol4/description_sv_SE.properties b/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol4/description_sv_SE.properties deleted file mode 100644 index 35b1deaba4fd..000000000000 --- a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol4/description_sv_SE.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=En TLS-säker anslutning mellan styrenheten och agenten utfördes av sockelns TLS-uppgradering. diff --git a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol4/description_zh_TW.properties b/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol4/description_zh_TW.properties deleted file mode 100644 index 949804a0f146..000000000000 --- a/core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol4/description_zh_TW.properties +++ /dev/null @@ -1 +0,0 @@ -summary=透過 TLS 通訊端升級 Controller 和 Agent 間的 TLS 安全連線。 diff --git a/core/src/main/resources/jenkins/slaves/Messages.properties b/core/src/main/resources/jenkins/slaves/Messages.properties deleted file mode 100644 index 41abfc7a302c..000000000000 --- a/core/src/main/resources/jenkins/slaves/Messages.properties +++ /dev/null @@ -1,27 +0,0 @@ -# The MIT License -# -# Copyright 2016 Stephen Connolly -# -# 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. - -JnlpSlaveAgentProtocol.displayName=Inbound TCP Agent Protocol/1 (deprecated, unencrypted) -JnlpSlaveAgentProtocol2.displayName=Inbound TCP Agent Protocol/2 (deprecated, unencrypted) -JnlpSlaveAgentProtocol3.displayName=Inbound TCP Agent Protocol/3 (deprecated, basic encryption) -JnlpSlaveAgentProtocol4.displayName=Inbound TCP Agent Protocol/4 (TLS encryption) -DeprecatedAgentProtocolMonitor.displayName=Deprecated Agent Protocol Monitor diff --git a/core/src/main/resources/jenkins/slaves/Messages_bg.properties b/core/src/main/resources/jenkins/slaves/Messages_bg.properties deleted file mode 100644 index 459672fa3c3d..000000000000 --- a/core/src/main/resources/jenkins/slaves/Messages_bg.properties +++ /dev/null @@ -1,37 +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. - -# Java Web Start Agent Protocol/3 -JnlpSlaveAgentProtocol3.displayName=\ - Протокол за стартиране на агента за Java през уeб, версия 3 -# Java Web Start Agent Protocol/1 -JnlpSlaveAgentProtocol.displayName=\ - Протокол за стартиране на агента за Java през уeб, версия 1 -# Java Web Start Agent Protocol/2 -JnlpSlaveAgentProtocol2.displayName=\ - Протокол за стартиране на агента за Java през уeб, версия 2 -# Java Web Start Agent Protocol/4 (TLS encryption) -JnlpSlaveAgentProtocol4.displayName=\ - Протокол за стартиране на агента за Java през уeб, версия 4 (шифриране с TLS) -# Deprecated Agent Protocol Monitor -DeprecatedAgentProtocolMonitor.displayName=\ - Датчик за остарели протоколи за стартиране на агента за Java през уeб diff --git a/core/src/main/resources/jenkins/slaves/Messages_de.properties b/core/src/main/resources/jenkins/slaves/Messages_de.properties deleted file mode 100644 index cceceebe685f..000000000000 --- a/core/src/main/resources/jenkins/slaves/Messages_de.properties +++ /dev/null @@ -1,27 +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. - -# Java Web Start Agent Protocol/4 (TLS encryption) -JnlpSlaveAgentProtocol4.displayName=Java-Web-Start-Agentenprotokoll Version 4 (TLS-Verschlüsselung) -JnlpSlaveAgentProtocol2.displayName=Java-Web-Start-Agentenprotokoll Version 2 (unverschlüsselt) -JnlpSlaveAgentProtocol.displayName=Java-Web-Start-Agentenprotokoll Version 1 (unverschlüsselt) -JnlpSlaveAgentProtocol3.displayName=Java-Web-Start-Agentenprotokoll Version 3 (einfache Verschlüsselung) diff --git a/core/src/main/resources/jenkins/slaves/Messages_fr.properties b/core/src/main/resources/jenkins/slaves/Messages_fr.properties deleted file mode 100644 index babe83c53fa8..000000000000 --- a/core/src/main/resources/jenkins/slaves/Messages_fr.properties +++ /dev/null @@ -1,27 +0,0 @@ -# The MIT License -# -# Copyright 2016 Stephen Connolly -# -# 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. - -JnlpSlaveAgentProtocol.displayName=Inbound TCP Agent Protocol/1 (obsolète, non chiffré) -JnlpSlaveAgentProtocol2.displayName=Inbound TCP Agent Protocol/2 (obsolète, non chiffré) -JnlpSlaveAgentProtocol3.displayName=Inbound TCP Agent Protocol/3 (obsolète, chiffrement basique) -JnlpSlaveAgentProtocol4.displayName=Inbound TCP Agent Protocol/4 (chiffrement TLS) -DeprecatedAgentProtocolMonitor.displayName=Moniteur de protocole obsolète d''agent diff --git a/core/src/main/resources/jenkins/slaves/Messages_it.properties b/core/src/main/resources/jenkins/slaves/Messages_it.properties deleted file mode 100644 index 15a4fd1854fa..000000000000 --- a/core/src/main/resources/jenkins/slaves/Messages_it.properties +++ /dev/null @@ -1,33 +0,0 @@ -# The MIT License -# -# Italian localization plugin for Jenkins -# Copyright © 2020 Alessandro Menti -# -# 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. - -DeprecatedAgentProtocolMonitor.displayName=Componente di monitoraggio \ - protocolli deprecati agenti -JnlpSlaveAgentProtocol.displayName=Protocollo in ingresso TCP per agenti, \ - versione 1 (deprecato, senza crittografia) -JnlpSlaveAgentProtocol2.displayName=Protocollo in ingresso TCP per agenti, \ - versione 2 (deprecato, senza crittografia) -JnlpSlaveAgentProtocol3.displayName=Protocollo in ingresso TCP per agenti, \ - versione 3 (deprecato, con crittografia di base) -JnlpSlaveAgentProtocol4.displayName=Protocollo in ingresso TCP per agenti, \ - versione 4 (crittografia TLS) diff --git a/core/src/main/resources/jenkins/slaves/Messages_pt_BR.properties b/core/src/main/resources/jenkins/slaves/Messages_pt_BR.properties deleted file mode 100644 index c185388bf156..000000000000 --- a/core/src/main/resources/jenkins/slaves/Messages_pt_BR.properties +++ /dev/null @@ -1,27 +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. - -DeprecatedAgentProtocolMonitor.displayName=Monitor de protocolo de agente descontinuado -JnlpSlaveAgentProtocol3.displayName=Protocolo de agente TCP de entrada/3 (descontinuado, criptografia básica) -JnlpSlaveAgentProtocol2.displayName=Protocolo de agente TCP de entrada/2 (descontinuado, sem criptografia) -JnlpSlaveAgentProtocol.displayName=Protocolo de agente TCP de entrada/1 (descontinuado, sem criptografia) -JnlpSlaveAgentProtocol4.displayName=Protocolo de agente TCP de entrada/4 (criptografia via TLS) diff --git a/core/src/main/resources/jenkins/slaves/Messages_sv_SE.properties b/core/src/main/resources/jenkins/slaves/Messages_sv_SE.properties deleted file mode 100644 index 4274099d00a1..000000000000 --- a/core/src/main/resources/jenkins/slaves/Messages_sv_SE.properties +++ /dev/null @@ -1,27 +0,0 @@ -# The MIT License -# -# Copyright 2016 Stephen Connolly -# -# 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. - -JnlpSlaveAgentProtocol.displayName=Ingående TCP-agentsprotokoll/1 (inaktuell, ej krypterat) -JnlpSlaveAgentProtocol2.displayName=Ingående TCP-agentsprotokoll/2 (inaktuell, ej krypterat) -JnlpSlaveAgentProtocol3.displayName=Ingående TCP-agentsprotokoll/3 (inaktuell, enkel kryptering) -JnlpSlaveAgentProtocol4.displayName=Ingående TCP-agentsprotokoll/4 (TLS-kryptering) -DeprecatedAgentProtocolMonitor.displayName=Inaktuell övervakning av agentsprotokoll diff --git a/core/src/main/resources/jenkins/slaves/Messages_zh_TW.properties b/core/src/main/resources/jenkins/slaves/Messages_zh_TW.properties deleted file mode 100644 index 830e59610c15..000000000000 --- a/core/src/main/resources/jenkins/slaves/Messages_zh_TW.properties +++ /dev/null @@ -1,27 +0,0 @@ -# The MIT License -# -# Copyright 2016 Stephen Connolly -# -# 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. - -JnlpSlaveAgentProtocol.displayName=連入 TCP Agent 通訊協定/1 (棄用、未加密) -JnlpSlaveAgentProtocol2.displayName=連入 TCP Agent 通訊協定/2 (棄用、未加密) -JnlpSlaveAgentProtocol3.displayName=連入 TCP Agent 通訊協定/3 (棄用、基本加密) -JnlpSlaveAgentProtocol4.displayName=連入 TCP Agent 通訊協定/4 (TLS 加密) -DeprecatedAgentProtocolMonitor.displayName=已棄用的 Agent 通訊協定監視器 diff --git a/test/src/test/java/jenkins/AgentProtocolTest.java b/test/src/test/java/jenkins/AgentProtocolTest.java deleted file mode 100644 index 531281109db7..000000000000 --- a/test/src/test/java/jenkins/AgentProtocolTest.java +++ /dev/null @@ -1,93 +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 static org.junit.Assert.fail; - -import edu.umd.cs.findbugs.annotations.CheckForNull; -import java.util.ArrayList; -import java.util.List; -import java.util.Set; -import jenkins.model.Jenkins; -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("JNLP4-connect"); - assertDisabled("JNLP2-connect", "JNLP3-connect"); - assertProtocols(true, "System protocols should be always enabled", "Ping"); - } - - private void assertEnabled(String ... protocolNames) { - assertProtocols(true, null, protocolNames); - } - - private void assertDisabled(String ... protocolNames) { - 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) { - 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", - String.join(",", failedChecks), - why != null ? "Reason: " + why + ". " : "", - String.join(",", agentProtocols)); - fail(message); - } - } - -} diff --git a/test/src/test/java/jenkins/agents/JnlpProtocol4ProxyHandlerTest.java b/test/src/test/java/jenkins/agents/JnlpProtocol4ProxyHandlerTest.java index 76f11d455f4d..e4c031922ded 100644 --- a/test/src/test/java/jenkins/agents/JnlpProtocol4ProxyHandlerTest.java +++ b/test/src/test/java/jenkins/agents/JnlpProtocol4ProxyHandlerTest.java @@ -94,11 +94,6 @@ public String getName() { return JnlpProtocol4ProxyHandler.NAME; } - @Override - public String getDisplayName() { - return "Test handler"; - } - @Override public void handle(Socket socket) throws IOException, InterruptedException { var agentIO = socket.getChannel(); diff --git a/test/src/test/java/jenkins/model/JenkinsTest.java b/test/src/test/java/jenkins/model/JenkinsTest.java index c44b12cdd037..3f3f615a6c5f 100644 --- a/test/src/test/java/jenkins/model/JenkinsTest.java +++ b/test/src/test/java/jenkins/model/JenkinsTest.java @@ -32,19 +32,15 @@ import static org.hamcrest.Matchers.arrayContaining; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; -import static org.hamcrest.Matchers.hasItem; import static org.hamcrest.Matchers.is; -import static org.hamcrest.Matchers.not; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNotSame; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertThrows; import static org.junit.Assert.assertTrue; import static org.junit.Assume.assumeFalse; -import edu.umd.cs.findbugs.annotations.CheckForNull; import hudson.ExtensionList; import hudson.Functions; import hudson.XmlFile; @@ -76,7 +72,6 @@ import java.io.File; import java.io.IOException; import java.net.HttpURLConnection; -import java.net.Socket; import java.net.URI; import java.net.URL; import java.nio.file.Files; @@ -84,7 +79,6 @@ import java.nio.file.attribute.PosixFilePermission; import java.util.ArrayList; import java.util.Arrays; -import java.util.Collections; import java.util.Comparator; import java.util.EnumSet; import java.util.HashSet; @@ -94,7 +88,6 @@ import java.util.Set; import java.util.concurrent.TimeUnit; import java.util.stream.Stream; -import jenkins.AgentProtocol; import org.apache.commons.io.FileUtils; import org.htmlunit.FailingHttpStatusCodeException; import org.htmlunit.HttpMethod; @@ -600,174 +593,6 @@ public void onOnline(Computer c, TaskListener listener) throws IOException, Inte } } - @Test - @Issue("JENKINS-39465") - public void agentProtocols_singleEnable_roundtrip() throws Exception { - final Set defaultProtocols = Collections.unmodifiableSet(j.jenkins.getAgentProtocols()); - - final Set newProtocols = new HashSet<>(defaultProtocols); - newProtocols.add(MockOptInProtocol1.NAME); - j.jenkins.setAgentProtocols(newProtocols); - j.jenkins.save(); - final Set agentProtocolsBeforeReload = j.jenkins.getAgentProtocols(); - assertProtocolEnabled(MockOptInProtocol1.NAME, "before the roundtrip"); - - j.jenkins.reload(); - - final Set reloadedProtocols = j.jenkins.getAgentProtocols(); - assertNotSame("The protocol list must have been really reloaded", agentProtocolsBeforeReload, reloadedProtocols); - assertThat("We should have additional enabled protocol", - reloadedProtocols.size(), equalTo(defaultProtocols.size() + 1)); - assertProtocolEnabled(MockOptInProtocol1.NAME, "after the roundtrip"); - } - - @Test - @Issue("JENKINS-39465") - public void agentProtocols_multipleDisable_roundtrip() throws Exception { - final Set defaultProtocols = Collections.unmodifiableSet(j.jenkins.getAgentProtocols()); - assertProtocolEnabled(MockOptOutProtocol1.NAME, "after startup"); - - final Set newProtocols = new HashSet<>(defaultProtocols); - newProtocols.remove(MockOptOutProtocol1.NAME); - j.jenkins.setAgentProtocols(newProtocols); - j.jenkins.save(); - assertProtocolDisabled(MockOptOutProtocol1.NAME, "before the roundtrip"); - final Set agentProtocolsBeforeReload = j.jenkins.getAgentProtocols(); - j.jenkins.reload(); - - assertNotSame("The protocol list must have been really refreshed", agentProtocolsBeforeReload, j.jenkins.getAgentProtocols()); - assertThat("We should have disabled one protocol", - j.jenkins.getAgentProtocols().size(), equalTo(defaultProtocols.size() - 1)); - - assertProtocolDisabled(MockOptOutProtocol1.NAME, "after the roundtrip"); - } - - @Test - @Issue("JENKINS-39465") - public void agentProtocols_multipleEnable_roundtrip() throws Exception { - final Set defaultProtocols = Collections.unmodifiableSet(j.jenkins.getAgentProtocols()); - final Set newProtocols = new HashSet<>(defaultProtocols); - newProtocols.add(MockOptInProtocol1.NAME); - newProtocols.add(MockOptInProtocol2.NAME); - j.jenkins.setAgentProtocols(newProtocols); - j.jenkins.save(); - - final Set agentProtocolsBeforeReload = j.jenkins.getAgentProtocols(); - assertProtocolEnabled(MockOptInProtocol1.NAME, "before the roundtrip"); - assertProtocolEnabled(MockOptInProtocol2.NAME, "before the roundtrip"); - - j.jenkins.reload(); - - final Set reloadedProtocols = j.jenkins.getAgentProtocols(); - assertNotSame("The protocol list must have been really reloaded", agentProtocolsBeforeReload, reloadedProtocols); - assertThat("There should be two additional enabled protocols", - reloadedProtocols.size(), equalTo(defaultProtocols.size() + 2)); - assertProtocolEnabled(MockOptInProtocol1.NAME, "after the roundtrip"); - assertProtocolEnabled(MockOptInProtocol2.NAME, "after the roundtrip"); - } - - @Test - @Issue("JENKINS-39465") - public void agentProtocols_singleDisable_roundtrip() throws Exception { - final Set defaultProtocols = Collections.unmodifiableSet(j.jenkins.getAgentProtocols()); - final String protocolToDisable1 = MockOptOutProtocol1.NAME; - final String protocolToDisable2 = MockOptOutProtocol2.NAME; - - final Set newProtocols = new HashSet<>(defaultProtocols); - newProtocols.remove(protocolToDisable1); - newProtocols.remove(protocolToDisable2); - j.jenkins.setAgentProtocols(newProtocols); - j.jenkins.save(); - assertProtocolDisabled(protocolToDisable1, "before the roundtrip"); - assertProtocolDisabled(protocolToDisable2, "before the roundtrip"); - final Set agentProtocolsBeforeReload = j.jenkins.getAgentProtocols(); - j.jenkins.reload(); - - assertNotSame("The protocol list must have been really reloaded", agentProtocolsBeforeReload, j.jenkins.getAgentProtocols()); - assertThat("We should have disabled two protocols", - j.jenkins.getAgentProtocols().size(), equalTo(defaultProtocols.size() - 2)); - assertProtocolDisabled(protocolToDisable1, "after the roundtrip"); - assertProtocolDisabled(protocolToDisable2, "after the roundtrip"); - } - - private void assertProtocolDisabled(String protocolName, @CheckForNull String stage) { - assertThat(protocolName + " must be disabled. Stage=" + (stage != null ? stage : "undefined"), - j.jenkins.getAgentProtocols(), not(hasItem(protocolName))); - } - - private void assertProtocolEnabled(String protocolName, @CheckForNull String stage) { - assertThat(protocolName + " must be enabled. Stage=" + (stage != null ? stage : "undefined"), - j.jenkins.getAgentProtocols(), hasItem(protocolName)); - } - - @TestExtension - public static class MockOptInProtocol1 extends MockOptInProtocol { - - static final String NAME = "MOCK-OPTIN-1"; - - @Override - public String getName() { - return NAME; - } - } - - @TestExtension - public static class MockOptInProtocol2 extends MockOptInProtocol { - - static final String NAME = "MOCK-OPTIN-2"; - - @Override - public String getName() { - return NAME; - } - } - - private abstract static class MockOptInProtocol extends AgentProtocol { - @Override - public boolean isOptIn() { - return true; - } - - @Override - public void handle(Socket socket) throws IOException, InterruptedException { - throw new IOException("This is a mock agent protocol. It cannot be used for connection"); - } - } - - @TestExtension - public static class MockOptOutProtocol1 extends MockOptOutProtocol { - - static final String NAME = "MOCK-OPTOUT-1"; - - @Override - public String getName() { - return NAME; - } - } - - @TestExtension - public static class MockOptOutProtocol2 extends MockOptOutProtocol { - - static final String NAME = "MOCK-OPTOUT-2"; - - @Override - public String getName() { - return NAME; - } - } - - private abstract static class MockOptOutProtocol extends AgentProtocol { - @Override - public boolean isOptIn() { - return false; - } - - @Override - public void handle(Socket socket) throws IOException, InterruptedException { - throw new IOException("This is a mock agent protocol. It cannot be used for connection"); - } - } - @Test public void getComputers() throws Exception { List agents = new ArrayList<>(); diff --git a/test/src/test/resources/jenkins/AgentProtocolTest/config.xml b/test/src/test/resources/jenkins/AgentProtocolTest/config.xml deleted file mode 100644 index b072a16fa96e..000000000000 --- a/test/src/test/resources/jenkins/AgentProtocolTest/config.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - 1.0 - 2 - NORMAL - true - - - false - - ${ITEM_ROOTDIR}/workspace - ${ITEM_ROOTDIR}/builds - - - - - - 0 - - - - all - false - false - - - - all - 0 - - JNLP4-connect - - - JNLP2-connect - JNLP3-connect - - - - - \ No newline at end of file