[java-idp-jetty-base] 17/18: IDP-2334 Determine sensible defaults for the server's root page.

Rod Widdowson rdw at steadingsoftware.com
Tue Oct 15 15:15:04 UTC 2024


This is an automated email from the git hooks/post-receive script.

rdw pushed a commit to branch dev/IDP-2297
in repository java-idp-jetty-base.

View the commit online:
http://git.shibboleth.net/view/?p=java-idp-jetty-base.git;a=commit;h=cbb66842751be32961bfb536fee85b87c51e016e

commit cbb66842751be32961bfb536fee85b87c51e016e
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Fri Oct 11 10:56:11 2024 +0100

    IDP-2334 Determine sensible defaults for the server's root page.
    
    https://shibboleth.atlassian.net/browse/IDP-2334
    
    * Set jetty.server.default.showContexts to false
    * Create an empty index.html in static
    
    For ease this checking also stops copying the p12 file.  Creating that file will be addede in the
    next checkin.
---
 .../java/net/shibboleth/idp/plugin/jettybase/JettyBaseModule.java | 3 +--
 .../net/shibboleth/idp/plugin/jettybase/module.properties         | 4 ++--
 .../idp/plugin/jettybase/module/start.d/idp.ini-windows           | 4 +++-
 .../net/shibboleth/idp/plugin/jettybase/module/static/index.html  | 8 ++++++++
 4 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/jetty-base-impl/src/main/java/net/shibboleth/idp/plugin/jettybase/JettyBaseModule.java b/jetty-base-impl/src/main/java/net/shibboleth/idp/plugin/jettybase/JettyBaseModule.java
index d71b5e9..ff0ba34 100644
--- a/jetty-base-impl/src/main/java/net/shibboleth/idp/plugin/jettybase/JettyBaseModule.java
+++ b/jetty-base-impl/src/main/java/net/shibboleth/idp/plugin/jettybase/JettyBaseModule.java
@@ -50,9 +50,8 @@ public class JettyBaseModule extends PluginIdPModule {
         final Map<ModuleResource, ResourceResult> result = super.enable(moduleContext);
         final Path idpHome = Path.of(moduleContext.getInstallLocation());
         final Path jettyBase = idpHome.resolve("jetty-base");
-        log.debug("Creating directories (if needed): '{}' '{}'\n", idpHome.resolve("static"), jettyBase.resolve("tmp"));
+        log.debug("Creating directories (if needed): '{}' '{}'\n", jettyBase.resolve("tmp"));
         try {
-            Files.createDirectories(idpHome.resolve("static"));
             Files.createDirectories(jettyBase.resolve("tmp"));
         } catch (final IOException e) {
             log.error("Create Directory failed", e);
diff --git a/jetty-base-impl/src/main/resources/net/shibboleth/idp/plugin/jettybase/module.properties b/jetty-base-impl/src/main/resources/net/shibboleth/idp/plugin/jettybase/module.properties
index c96f36e..aa7b4b2 100644
--- a/jetty-base-impl/src/main/resources/net/shibboleth/idp/plugin/jettybase/module.properties
+++ b/jetty-base-impl/src/main/resources/net/shibboleth/idp/plugin/jettybase/module.properties
@@ -24,8 +24,8 @@ jetty.base.module.4.dest = jetty-base/webapps/idp.xml
 jetty.base.module.5.src = /net/shibboleth/idp/plugin/jettybase/module/webapps/static.xml
 jetty.base.module.5.dest = jetty-base/webapps/static.xml
 
-jetty.base.module.6.src = /net/shibboleth/idp/plugin/jettybase/module/credentials/idp-userfacing.p12
-jetty.base.module.6.dest = credentials/idp-userfacing.p12
+jetty.base.module.6.src = /net/shibboleth/idp/plugin/jettybase/module/static/index.html
+jetty.base.module.6.dest = jetty-base/static/index.html
 
 
 # For legacy reasons we separate Windows and non windows start.d
diff --git a/jetty-base-impl/src/main/resources/net/shibboleth/idp/plugin/jettybase/module/start.d/idp.ini-windows b/jetty-base-impl/src/main/resources/net/shibboleth/idp/plugin/jettybase/module/start.d/idp.ini-windows
index 3c2e7a4..107c1a8 100644
--- a/jetty-base-impl/src/main/resources/net/shibboleth/idp/plugin/jettybase/module/start.d/idp.ini-windows
+++ b/jetty-base-impl/src/main/resources/net/shibboleth/idp/plugin/jettybase/module/start.d/idp.ini-windows
@@ -16,6 +16,8 @@ jetty.sslContext.keyStorePath=../credentials/idp-userfacing.p12
 jetty.sslContext.keyStorePassword=changeit
 
 #
-# Keystore type: you ahould not need to change this
+# Keystore type: you should not need to change this
 #
 jetty.sslContext.keyStoreType=PKCS12
+
+jetty.server.default.showContexts=false
diff --git a/jetty-base-impl/src/main/resources/net/shibboleth/idp/plugin/jettybase/module/static/index.html b/jetty-base-impl/src/main/resources/net/shibboleth/idp/plugin/jettybase/module/static/index.html
new file mode 100644
index 0000000..04b3dc1
--- /dev/null
+++ b/jetty-base-impl/src/main/resources/net/shibboleth/idp/plugin/jettybase/module/static/index.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+
+<html>
+
+<head>
+<title>Add your stuff here</title>
+</head>
+</html>

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list