[java-identity-provider] 01/01: IDP-2464 Allow the Installer to *not* update plugin modules.
Codeberg
noreply at shibboleth.net
Mon Jul 6 12:06:35 UTC 2026
This is an automated email from the git hooks/post-receive script.
codeberg pushed a commit to branch dev/IDP-2462
in repository java-identity-provider.
View the commit online:
https://codeberg.org/Shibboleth/java-identity-provider/commit/5419272706cb2e664a9e4f8e66c1ef81a9b2a80c
commit 5419272706cb2e664a9e4f8e66c1ef81a9b2a80c
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Mon Jul 6 13:06:16 2026 +0100
IDP-2464 Allow the Installer to *not* update plugin modules.
https://shibboleth.atlassian.net/browse/IDP-2464
Add a new qualified --noPluginUpdate
---
.../idp/installer/InstallerProperties.java | 3 +++
.../idp/installer/impl/IdPInstallerArguments.java | 13 +++++++++++++
.../idp/installer/impl/IdPInstallerCLI.java | 4 ++++
.../idp/installer/impl/InstallerPropertiesImpl.java | 14 ++++++++++++++
.../net/shibboleth/idp/installer/impl/V5Install.java | 20 ++++++++++++++++++--
5 files changed, 52 insertions(+), 2 deletions(-)
diff --git a/idp-installer/src/main/java/net/shibboleth/idp/installer/InstallerProperties.java b/idp-installer/src/main/java/net/shibboleth/idp/installer/InstallerProperties.java
index 978632099..97630e8c5 100644
--- a/idp-installer/src/main/java/net/shibboleth/idp/installer/InstallerProperties.java
+++ b/idp-installer/src/main/java/net/shibboleth/idp/installer/InstallerProperties.java
@@ -76,6 +76,9 @@ public final class InstallerProperties {
/** Whether to tidy up after ourselves. */
@Nonnull @NotEmpty public static final String NO_TIDY = "idp.no.tidy";
+ /** Whether to update plugin modules. */
+ @Nonnull @NotEmpty public static final String NO_UPDATE_PLUGIN_MODULES = "idp.no.update.plugin.modules";
+
/** The base URL for IdP endpoints. */
@Nonnull @NotEmpty public static final String CONTEXT_PATH = "idp.context.path";
diff --git a/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/IdPInstallerArguments.java b/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/IdPInstallerArguments.java
index a3c92b083..82114f0ab 100644
--- a/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/IdPInstallerArguments.java
+++ b/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/IdPInstallerArguments.java
@@ -48,6 +48,10 @@ public class IdPInstallerArguments extends AbstractCommandLineArguments {
@Parameter(names= {"--noPrompt"})
private boolean noPrompt;
+ /** Suppress Prompts. */
+ @Parameter(names= {"--noPluginUpdate"})
+ private boolean noPluginModuleUpdate;
+
/** DNS name of the IdP. */
@Parameter(names= {"-h", "--hostName"})
private String hostName;
@@ -97,6 +101,14 @@ public class IdPInstallerArguments extends AbstractCommandLineArguments {
return noPrompt;
}
+ /** Are we suppressing plugin module updates ?
+ *
+ * @return true if we are not updating plugin module updates.
+ */
+ public boolean isNoPluginModuleUpdate() {
+ return noPluginModuleUpdate;
+ }
+
/** Get the target Directory.
*
* @return {@link #targetDir}
@@ -192,6 +204,7 @@ public class IdPInstallerArguments extends AbstractCommandLineArguments {
out.println(String.format(" %-22s %s", "-kp, --keystorePassword", "Password for the generated KeyStore"));
out.println(String.format(" %-22s %s", "-sp, --sealerPassword", "Password for the generated Data Sealer"));
out.println(String.format(" %-22s %s", "--noPrompt", "Unattended Install"));
+ out.println(String.format(" %-22s %s", "--noPluginUpdate", "Do NOT update the modules contributes by plugins"));
out.println(String.format(" %-22s %s", "-hc, --http-client",
"Bean name for an http client (for Module and Plugin Operations"));
diff --git a/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/IdPInstallerCLI.java b/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/IdPInstallerCLI.java
index 717e7807f..7c23886cc 100644
--- a/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/IdPInstallerCLI.java
+++ b/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/IdPInstallerCLI.java
@@ -119,6 +119,10 @@ public class IdPInstallerCLI extends AbstractCommandLine<IdPInstallerArguments>
System.setProperty(InstallerProperties.NO_PROMPT, "true");
}
+ if (args.isNoPluginModuleUpdate()) {
+ System.setProperty(InstallerProperties.NO_UPDATE_PLUGIN_MODULES, "true");
+ }
+
setIfNotNull(args.getPropertyFile(), InstallerProperties.PROPERTY_SOURCE_FILE);
setIfNotNull(args.getTargetDirectory(), InstallerProperties.TARGET_DIR);
setIfNotNull(args.getHostName(), InstallerProperties.HOST_NAME);
diff --git a/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/InstallerPropertiesImpl.java b/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/InstallerPropertiesImpl.java
index a900b5157..6bb23208c 100644
--- a/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/InstallerPropertiesImpl.java
+++ b/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/InstallerPropertiesImpl.java
@@ -107,6 +107,9 @@ public class InstallerPropertiesImpl {
/** whether to tidy up. */
private boolean tidy = true;
+ /** whether to update plugin modules. */
+ private boolean updatePluginModules = true;
+
/** whether to tidy up. */
private boolean setGroupAndMode = true;
@@ -188,6 +191,10 @@ public class InstallerPropertiesImpl {
String value = installerProperties.getProperty(InstallerProperties.NO_PROMPT);
noPrompt = value != null;
+ value = installerProperties.getProperty(InstallerProperties.NO_UPDATE_PLUGIN_MODULES);
+ // Note we swap here from "NO<thing>" to "Is<thing>
+ updatePluginModules = value == null;
+
value = installerProperties.getProperty(InstallerProperties.KEY_SIZE);
if (value == null) {
keySize = InstallerProperties.DEFAULT_KEY_SIZE;
@@ -363,6 +370,13 @@ public class InstallerPropertiesImpl {
return setGroupAndMode;
}
+ /** Do we update modules for discovered plugins?
+ * @return true (default) if we want to.
+ */
+ public boolean isUpdatePluginModules() {
+ return updatePluginModules;
+ }
+
/**
* Evaluate the default scope value.
*
diff --git a/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/V5Install.java b/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/V5Install.java
index f2ded2f1b..3a584abac 100644
--- a/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/V5Install.java
+++ b/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/V5Install.java
@@ -27,6 +27,7 @@ import java.io.Writer;
import java.nio.file.Files;
import java.nio.file.Path;
import java.time.Instant;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.Properties;
import java.util.ServiceConfigurationError;
@@ -428,13 +429,20 @@ public class V5Install {
*/
protected void enableModules() throws BuildException {
final ModuleContext moduleContext = ensureModuleContext();
- final Iterator<IdPModule> modules = ServiceLoader.load(IdPModule.class, currentState.getInstalledPluginsLoader()).iterator();
+ final Iterator<IdPModule> modules;
+ if (installerProps.isUpdatePluginModules()) {
+ modules = ServiceLoader.load(IdPModule.class, currentState.getInstalledPluginsLoader()).iterator();
+ } else {
+ modules = ServiceLoader.load(IdPModule.class).iterator();
+ }
+ final Set<String> enabledModules = new HashSet<>(currentState.getEnabledModules());
+ log.info("Enabled Modules {}", enabledModules);
while (modules.hasNext()) {
try {
final IdPModule module = modules.next();
final String id = module.getId();
- if (currentState.getEnabledModules().contains(id)) {
+ if (enabledModules.contains(id)) {
log.debug("Re-enabling Module {}", id);
try {
module.enable(moduleContext, true);
@@ -442,6 +450,7 @@ public class V5Install {
log.error("Error re-enabling module {}", id, e);
throw new BuildException(e);
}
+ enabledModules.remove(id);
}
if (currentState.getInstalledVersion() == null && installerProps.getModulesToEnable().contains(id)) {
try {
@@ -455,6 +464,13 @@ public class V5Install {
log.error("Error loading modules", e);
}
}
+ log.info("Enabled Modules {}", enabledModules);
+ if (!enabledModules.isEmpty()) {
+ log.info("The following modules have not been re-enabled");
+ for (final String moduleId : enabledModules) {
+ log.info("\t{}", moduleId);
+ }
+ }
}
/** Delete those files which were created but not needed.
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list