[java-idp-plugin-metadatagen] branch main updated: JMETAGEN-5 - Generalize metadata plugin

Scott Cantor cantor.2 at osu.edu
Fri Aug 18 16:19:12 UTC 2023


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

scantor pushed a commit to branch main
in repository java-idp-plugin-metadatagen.

View the commit online:
http://git.shibboleth.net/view/?p=java-idp-plugin-metadatagen.git;a=commit;h=c74543e84722ec9867f5297fba65f6487cc23ef5

The following commit(s) were added to refs/heads/main by this push:
     new c74543e  JMETAGEN-5 - Generalize metadata plugin
c74543e is described below

commit c74543e84722ec9867f5297fba65f6487cc23ef5
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Fri Aug 18 12:19:09 2023 -0400

    JMETAGEN-5 - Generalize metadata plugin
    
    https://shibboleth.atlassian.net/browse/JMETAGEN-5
    
    Add optional module to install copy of Velocity templates.
---
 .../plugin/metadatagen/impl/MetadataGenPlugin.java |  7 ++--
 .../impl/MetadataGenTemplateModule.java            | 38 ++++++++++++++++++++++
 .../services/net.shibboleth.idp.module.IdPModule   |  1 +
 .../idp/plugin/metadatagen/impl/module.properties  | 22 +++++++++++--
 4 files changed, 63 insertions(+), 5 deletions(-)

diff --git a/metadatagen-impl/src/main/java/net/shibboleth/idp/plugin/metadatagen/impl/MetadataGenPlugin.java b/metadatagen-impl/src/main/java/net/shibboleth/idp/plugin/metadatagen/impl/MetadataGenPlugin.java
index 82c0e44..901f38a 100644
--- a/metadatagen-impl/src/main/java/net/shibboleth/idp/plugin/metadatagen/impl/MetadataGenPlugin.java
+++ b/metadatagen-impl/src/main/java/net/shibboleth/idp/plugin/metadatagen/impl/MetadataGenPlugin.java
@@ -36,9 +36,10 @@ public class MetadataGenPlugin extends FirstPartyIdPPlugin {
     public MetadataGenPlugin() throws IOException, PluginException {
         super(MetadataGenPlugin.class);
         try {
-            final IdPModule module = new MetadataGenModule();
-            setEnableOnInstall(CollectionSupport.singleton(module));
-            setDisableOnRemoval(CollectionSupport.singleton(module));
+            final IdPModule required = new MetadataGenModule();
+            final IdPModule optional = new MetadataGenTemplateModule();
+            setEnableOnInstall(CollectionSupport.singleton(required));
+            setDisableOnRemoval(CollectionSupport.setOf(required, optional));
         } catch (final IOException e) {
             throw e;
         } catch (final ModuleException e) {
diff --git a/metadatagen-impl/src/main/java/net/shibboleth/idp/plugin/metadatagen/impl/MetadataGenTemplateModule.java b/metadatagen-impl/src/main/java/net/shibboleth/idp/plugin/metadatagen/impl/MetadataGenTemplateModule.java
new file mode 100644
index 0000000..b40b89e
--- /dev/null
+++ b/metadatagen-impl/src/main/java/net/shibboleth/idp/plugin/metadatagen/impl/MetadataGenTemplateModule.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.shibboleth.idp.plugin.metadatagen.impl;
+
+import java.io.IOException;
+
+import net.shibboleth.idp.module.impl.PluginIdPModule;
+import net.shibboleth.profile.module.ModuleException;
+
+
+/**
+ * {@link net.shibboleth.idp.module.IdPModule} implementation for the metadatagen plugin's templates.
+ */
+public class MetadataGenTemplateModule extends PluginIdPModule{
+    
+    /**
+     * Constructor.
+     *  
+     * @throws ModuleException on error
+     * @throws IOException on error
+     */
+    public MetadataGenTemplateModule() throws IOException, ModuleException {
+        super(MetadataGenTemplateModule.class);
+    }
+    
+}
\ No newline at end of file
diff --git a/metadatagen-impl/src/main/resources/META-INF/services/net.shibboleth.idp.module.IdPModule b/metadatagen-impl/src/main/resources/META-INF/services/net.shibboleth.idp.module.IdPModule
index 31d3f43..b0849b5 100644
--- a/metadatagen-impl/src/main/resources/META-INF/services/net.shibboleth.idp.module.IdPModule
+++ b/metadatagen-impl/src/main/resources/META-INF/services/net.shibboleth.idp.module.IdPModule
@@ -1 +1,2 @@
 net.shibboleth.idp.plugin.metadatagen.impl.MetadataGenModule
+net.shibboleth.idp.plugin.metadatagen.impl.MetadataGenTemplateModule
\ No newline at end of file
diff --git a/metadatagen-impl/src/main/resources/net/shibboleth/idp/plugin/metadatagen/impl/module.properties b/metadatagen-impl/src/main/resources/net/shibboleth/idp/plugin/metadatagen/impl/module.properties
index 8c85e1e..8b0b3a1 100644
--- a/metadatagen-impl/src/main/resources/net/shibboleth/idp/plugin/metadatagen/impl/module.properties
+++ b/metadatagen-impl/src/main/resources/net/shibboleth/idp/plugin/metadatagen/impl/module.properties
@@ -2,12 +2,14 @@
 
 # Class to Module ID mappings
 net.shibboleth.idp.plugin.metadatagen.impl.MetadataGenModule = idp.plugin.MetadataGen
+net.shibboleth.idp.plugin.metadatagen.impl.MetadataGenTemplateModule = idp.plugin.MetadataGen.Templates
 
 # Module Owner
 idp.plugin.MetadataGen.plugin = net.shibboleth.idp.plugin.metadatagen
+idp.plugin.MetadataGen.Templates.plugin = net.shibboleth.idp.plugin.metadatagen
 
-idp.plugin.MetadataGen.name = Metadata Generator (Beta)
-idp.plugin.MetadataGen.desc = A test Metadata Generator
+idp.plugin.MetadataGen.name = SAML Metadata Generator
+idp.plugin.MetadataGen.desc = A command line utility to drive the OpenSAML Velocity-based SAML metadata generator.
 idp.plugin.MetadataGen.url = /Metadatagen
 idp.plugin.MetadataGen.1.src = /net/shibboleth/idp/plugin/metadatagen/bin/metadatagen.sh
 idp.plugin.MetadataGen.1.dest = bin/metadatagen.sh
@@ -21,3 +23,19 @@ idp.plugin.MetadataGen.2.nonwindows = false
 idp.plugin.MetadataGen.3.src = /net/shibboleth/idp/plugin/metadatagen/conf/examples/shibmd-layout.xml
 idp.plugin.MetadataGen.3.dest = conf/examples/shibmd-layout.xml
 idp.plugin.MetadataGen.3.replace = true
+
+idp.plugin.MetadataGen.Templates.name = SAML Metadata Generator Velocity Templates
+idp.plugin.MetadataGen.Templates.desc = Installs the Velocity templates used by OpenSAML for metadata generation.
+idp.plugin.MetadataGen.Templates.url = /Metadatagen
+idp.plugin.MetadataGen.Templates.1.src = /templates/metadata/EntityDescriptor.vm
+idp.plugin.MetadataGen.Templates.1.dest = views/templates/metadata/EntityDescriptor.vm
+idp.plugin.MetadataGen.Templates.2.src = /templates/metadata/KeyDescriptors.vm
+idp.plugin.MetadataGen.Templates.2.dest = views/templates/metadata/KeyDescriptors.vm
+idp.plugin.MetadataGen.Templates.3.src = /templates/metadata/IDPSSODescriptor.vm
+idp.plugin.MetadataGen.Templates.3.dest = views/templates/metadata/IDPSSODescriptor.vm
+idp.plugin.MetadataGen.Templates.4.src = /templates/metadata/SPSSODescriptor.vm
+idp.plugin.MetadataGen.Templates.4.dest = views/templates/metadata/SPSSODescriptor.vm
+idp.plugin.MetadataGen.Templates.5.src = /templates/metadata/AttributeAuthorityDescriptor.vm
+idp.plugin.MetadataGen.Templates.5.dest = views/templates/metadata/AttributeAuthorityDescriptor.vm
+idp.plugin.MetadataGen.Templates.6.src = /templates/metadata/Extensions.vm
+idp.plugin.MetadataGen.Templates.6.dest = views/templates/metadata/Extensions.vm

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


More information about the commits mailing list