[java-identity-provider] branch main updated: IDP-2138 update CLI could be more informative
Rod Widdowson
rdw at steadingsoftware.com
Tue Jul 4 12:57:00 UTC 2023
This is an automated email from the git hooks/post-receive script.
rdw pushed a commit to branch main
in repository java-identity-provider.
View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=49497cb4b26d7d111cb4b1916a04152862b6caaf
The following commit(s) were added to refs/heads/main by this push:
new 49497cb4b IDP-2138 update CLI could be more informative
49497cb4b is described below
commit 49497cb4b26d7d111cb4b1916a04152862b6caaf
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Tue Jul 4 13:55:56 2023 +0100
IDP-2138 update CLI could be more informative
https://shibboleth.atlassian.net/browse/IDP-2138
---
.../idp/admin/impl/ReportUpdateStatus.java | 2 +-
.../shibboleth/idp/installer/impl/UpdateIdPCLI.java | 20 ++++++++++++++++++++
2 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/idp-admin-impl/src/main/java/net/shibboleth/idp/admin/impl/ReportUpdateStatus.java b/idp-admin-impl/src/main/java/net/shibboleth/idp/admin/impl/ReportUpdateStatus.java
index 1c9474f0e..c178dbf92 100644
--- a/idp-admin-impl/src/main/java/net/shibboleth/idp/admin/impl/ReportUpdateStatus.java
+++ b/idp-admin-impl/src/main/java/net/shibboleth/idp/admin/impl/ReportUpdateStatus.java
@@ -147,7 +147,7 @@ public class ReportUpdateStatus extends AbstractIdentifiableInitializableCompone
final SupportLevel sl = verInfo.getSupportLevel();
switch (sl) {
case Current:
- log.debug("Version {} is current");
+ log.info("Version {} is current");
break;
case Secadv:
log.error("Version {} has known security vulnerabilities", version);
diff --git a/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/UpdateIdPCLI.java b/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/UpdateIdPCLI.java
index 3176515c2..a13345e86 100644
--- a/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/UpdateIdPCLI.java
+++ b/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/UpdateIdPCLI.java
@@ -52,6 +52,8 @@ import net.shibboleth.idp.installer.plugin.impl.TrustStore.Signature;
import net.shibboleth.profile.installablecomponent.InstallableComponentInfo;
import net.shibboleth.profile.installablecomponent.InstallableComponentSupport;
import net.shibboleth.profile.installablecomponent.InstallableComponentVersion;
+import net.shibboleth.profile.installablecomponent.InstallableComponentInfo.VersionInfo;
+import net.shibboleth.profile.installablecomponent.InstallableComponentSupport.SupportLevel;
import net.shibboleth.shared.cli.AbstractCommandLine;
import net.shibboleth.shared.collection.CollectionSupport;
import net.shibboleth.shared.component.ComponentInitializationException;
@@ -154,6 +156,24 @@ public class UpdateIdPCLI extends AbstractIdPHomeAwareCommandLine<UpdateIdPArgum
private int checkUpdate(@Nonnull UpdateIdPArguments args, @Nonnull final InstallableComponentInfo info, boolean doDownload) {
final InstallableComponentVersion from = args.getUpdateFromVersion();
+ final VersionInfo currInfo = info.getAvailableVersions().get(from);
+ if (currInfo == null) {
+ getLogger().warn("Could not locate version info for version {}", from);
+ } else {
+ final SupportLevel sl = currInfo.getSupportLevel();
+ switch (sl) {
+ case Current:
+ getLogger().info("Version {} is current");
+ break;
+ case Secadv:
+ getLogger().error("Version {} has known security vulnerabilities", from);
+ break;
+ default:
+ getLogger().warn("Support level for {} is {}", from, sl);
+ break;
+ }
+ }
+
InstallableComponentVersion newIdPVersion = args.getUpdateToVersion();
boolean versionSpecified = newIdPVersion != null;
if (!versionSpecified) {
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list