[java-plugin-storage-jdbc] 04/05: More preparation - primarily getting names correct

Rod Widdowson rdw at steadingsoftware.com
Fri May 20 14:00:57 UTC 2022


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

rdw pushed a commit to branch main
in repository java-plugin-storage-jdbc.

View the commit online:
http://git.shibboleth.net/view/?p=java-plugin-storage-jdbc.git;a=commit;h=5d5a4465dad5f1524a072b06a42a103e77880c76

commit 5d5a4465dad5f1524a072b06a42a103e77880c76
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Mon May 16 16:47:10 2022 +0100

    More preparation - primarily getting names correct
---
 .gitignore                                         |  7 +++-
 jdbc-storage-api/pom.xml                           |  8 ++--
 .../{idp => }/plugin/storage/jdbc/Version.java     |  4 +-
 jdbc-storage-dist/pom.xml                          |  8 ++--
 jdbc-storage-impl/pom.xml                          | 10 ++---
 .../storage/jdbc/impl/JDBCStorageModule.java}      |  8 ++--
 .../storage/jdbc/impl/JDBCStoragePlugin.java}      |  6 +--
 .../plugin/storage/jdbc/impl/package-info.java     | 21 +++++++++++
 .../META-INF/net.shibboleth.idp/postconfig.xml     | 44 ----------------------
 .../idp/flows/authn/myplugin/plugin-beans.xml      | 22 -----------
 .../idp/flows/authn/myplugin/plugin-flow.xml       |  7 ----
 .../services/net.shibboleth.idp.module.IdPModule   |  2 +-
 .../services/net.shibboleth.idp.plugin.IdPPlugin   |  2 +-
 .../idp/plugin/storage/jdbc/conf/placeholder.xml   |  1 +
 .../idp/plugin/storage/jdbc/module.properties      | 16 ++++----
 .../idp/plugin/storage/jdbc/plugin.properties      |  3 +-
 pom.xml                                            |  8 ++--
 17 files changed, 65 insertions(+), 112 deletions(-)

diff --git a/.gitignore b/.gitignore
index 4603305..077f53d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,9 @@
 */target
 */test-output
 *~
-target
+*/.classpath
+*/.settings
+/.settings
+/target
+*/.project
+.project
diff --git a/jdbc-storage-api/pom.xml b/jdbc-storage-api/pom.xml
index 0809570..539cabf 100644
--- a/jdbc-storage-api/pom.xml
+++ b/jdbc-storage-api/pom.xml
@@ -4,14 +4,14 @@
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
-        <groupId>net.shibboleth.idp.plugin.storage.jdbc</groupId>
-        <artifactId>idp-plugin-storage-jdbc-parent</artifactId>
+        <groupId>net.shibboleth.plugin.storage.jdbc</groupId>
+        <artifactId>jdbc-storage-parent</artifactId>
         <version>0.0.1-SNAPSHOT</version>
     </parent>
 
-    <artifactId>idp-plugin-jdbc-storage-api</artifactId>
+    <artifactId>jdbc-storage-api</artifactId>
     <packaging>jar</packaging>
-    <name>Shibboleth IdP :: Plugins :: jdbc-storage API</name>
+    <name>Shibboleth :: Plugins :: jdbc-storage API</name>
     <description>IdP jdbc-storage plugin API.</description>
 
     <properties>
diff --git a/jdbc-storage-api/src/main/java/net/shibboleth/idp/plugin/storage/jdbc/Version.java b/jdbc-storage-api/src/main/java/net/shibboleth/plugin/storage/jdbc/Version.java
similarity index 84%
rename from jdbc-storage-api/src/main/java/net/shibboleth/idp/plugin/storage/jdbc/Version.java
rename to jdbc-storage-api/src/main/java/net/shibboleth/plugin/storage/jdbc/Version.java
index 4ea97c5..7dc236e 100644
--- a/jdbc-storage-api/src/main/java/net/shibboleth/idp/plugin/storage/jdbc/Version.java
+++ b/jdbc-storage-api/src/main/java/net/shibboleth/plugin/storage/jdbc/Version.java
@@ -1,8 +1,8 @@
-package net.shibboleth.idp.plugin.storage.jdbc;
+package net.shibboleth.plugin.storage.jdbc;
 
 import javax.annotation.Nullable;
 
-/** Class for getting and printing the version of the IdP. */
+/** Class for getting and printing the version of the plugin. */
 public final class Version {
 
     /** IdP version. */
diff --git a/jdbc-storage-dist/pom.xml b/jdbc-storage-dist/pom.xml
index 3618375..5680b09 100644
--- a/jdbc-storage-dist/pom.xml
+++ b/jdbc-storage-dist/pom.xml
@@ -3,13 +3,13 @@
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
-        <groupId>net.shibboleth.idp.plugin.storage.jdbc</groupId>
-        <artifactId>idp-plugin-storage-jdbc-parent</artifactId>
+        <groupId>net.shibboleth.plugin.storage.jdbc</groupId>
+        <artifactId>jdbc-storage-parent</artifactId>
         <version>0.0.1-SNAPSHOT</version>
     </parent>
 
-    <artifactId>idp-plugin-jdbc-storage-dist</artifactId>
-    <name>Shibboleth IdP :: Plugins :: jdbc-storage Distribution</name>
+    <artifactId>jdbc-storage-dist</artifactId>
+    <name>Shibboleth :: Plugins :: jdbc-storage Distribution</name>
     <description>IdP jdbc-storage plugin packaging.</description>
     <packaging>pom</packaging>
 
diff --git a/jdbc-storage-impl/pom.xml b/jdbc-storage-impl/pom.xml
index 70064ce..9492b36 100644
--- a/jdbc-storage-impl/pom.xml
+++ b/jdbc-storage-impl/pom.xml
@@ -3,15 +3,15 @@
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
-        <groupId>net.shibboleth.idp.plugin.storage.jdbc</groupId>
-        <artifactId>idp-plugin-storage-jdbc-parent</artifactId>
+        <groupId>net.shibboleth.plugin.storage.jdbc</groupId>
+        <artifactId>jdbc-storage-parent</artifactId>
         <version>0.0.1-SNAPSHOT</version>
     </parent>
 
-    <artifactId>idp-plugin-jdbc-storage-impl</artifactId>
+    <artifactId>jdbc-storage-impl</artifactId>
     <packaging>jar</packaging>    
-    <name>Shibboleth IdP :: Plugins :: jdbc-storage Impl</name>
-    <description>IdP jdbc-storage plugin implementation.</description>
+    <name>Shibboleth :: Plugins :: jdbc-storage Impl</name>
+    <description>jdbc-storage plugin implementation.</description>
     
     <properties>
         <checkstyle.configLocation>${project.basedir}/../checkstyle.xml</checkstyle.configLocation>
diff --git a/jdbc-storage-impl/src/main/java/net/shibboleth/idp/plugin/storage/jdbc/ExampleModule.java b/jdbc-storage-impl/src/main/java/net/shibboleth/plugin/storage/jdbc/impl/JDBCStorageModule.java
similarity index 60%
rename from jdbc-storage-impl/src/main/java/net/shibboleth/idp/plugin/storage/jdbc/ExampleModule.java
rename to jdbc-storage-impl/src/main/java/net/shibboleth/plugin/storage/jdbc/impl/JDBCStorageModule.java
index 8f4653c..3e6978d 100644
--- a/jdbc-storage-impl/src/main/java/net/shibboleth/idp/plugin/storage/jdbc/ExampleModule.java
+++ b/jdbc-storage-impl/src/main/java/net/shibboleth/plugin/storage/jdbc/impl/JDBCStorageModule.java
@@ -1,4 +1,4 @@
-package net.shibboleth.idp.plugin.storage.jdbc;
+package net.shibboleth.plugin.storage.jdbc.impl;
 
 import java.io.IOException;
 
@@ -9,7 +9,7 @@ import net.shibboleth.idp.module.impl.PluginIdPModule;
 /**
  * {@link IdPModule IdP Module} implementation.
  */
-public class ExampleModule extends PluginIdPModule{
+public class JDBCStorageModule extends PluginIdPModule{
     
     /**
      * Constructor.
@@ -17,8 +17,8 @@ public class ExampleModule extends PluginIdPModule{
      * @throws ModuleException on error
      * @throws IOException on error
      */
-    public ExampleModule() throws IOException, ModuleException {
-        super(ExampleModule.class);
+    public JDBCStorageModule() throws IOException, ModuleException {
+        super(JDBCStorageModule.class);
     }
     
 
diff --git a/jdbc-storage-impl/src/main/java/net/shibboleth/idp/plugin/storage/jdbc/ExamplePlugin.java b/jdbc-storage-impl/src/main/java/net/shibboleth/plugin/storage/jdbc/impl/JDBCStoragePlugin.java
similarity index 68%
rename from jdbc-storage-impl/src/main/java/net/shibboleth/idp/plugin/storage/jdbc/ExamplePlugin.java
rename to jdbc-storage-impl/src/main/java/net/shibboleth/plugin/storage/jdbc/impl/JDBCStoragePlugin.java
index 51ae639..3b7498b 100644
--- a/jdbc-storage-impl/src/main/java/net/shibboleth/idp/plugin/storage/jdbc/ExamplePlugin.java
+++ b/jdbc-storage-impl/src/main/java/net/shibboleth/plugin/storage/jdbc/impl/JDBCStoragePlugin.java
@@ -1,4 +1,4 @@
-package net.shibboleth.idp.plugin.storage.jdbc;
+package net.shibboleth.plugin.storage.jdbc.impl;
 
 import java.io.IOException;
 import javax.annotation.Nonnull;
@@ -10,7 +10,7 @@ import net.shibboleth.idp.plugin.PropertyDrivenIdPPlugin;
 /**
  * Plugin description about the webauthn plugin.
  */
-public class ExamplePlugin extends PropertyDrivenIdPPlugin {
+public class JDBCStoragePlugin extends PropertyDrivenIdPPlugin {
 
     /**
      * Constructor.
@@ -20,7 +20,7 @@ public class ExamplePlugin extends PropertyDrivenIdPPlugin {
      * @throws IOException if properties can't be loaded
      * @throws PluginException if another error occurs
      */
-    public ExamplePlugin(@Nonnull final Class<? extends IdPPlugin> claz) throws IOException, PluginException {
+    public JDBCStoragePlugin(@Nonnull final Class<? extends IdPPlugin> claz) throws IOException, PluginException {
         super(claz);
     }
 
diff --git a/jdbc-storage-impl/src/main/java/net/shibboleth/plugin/storage/jdbc/impl/package-info.java b/jdbc-storage-impl/src/main/java/net/shibboleth/plugin/storage/jdbc/impl/package-info.java
new file mode 100644
index 0000000..2079a37
--- /dev/null
+++ b/jdbc-storage-impl/src/main/java/net/shibboleth/plugin/storage/jdbc/impl/package-info.java
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the University Corporation for Advanced Internet Development,
+ * Inc. (UCAID) under one or more contributor license agreements.  See the
+ * NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The UCAID licenses this file to You 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 to contain classes to do with the JDBC Storage service provider.
+ */
+
+package net.shibboleth.plugin.storage.jdbc.impl;
diff --git a/jdbc-storage-impl/src/main/resources/META-INF/net.shibboleth.idp/postconfig.xml b/jdbc-storage-impl/src/main/resources/META-INF/net.shibboleth.idp/postconfig.xml
deleted file mode 100644
index 403cea0..0000000
--- a/jdbc-storage-impl/src/main/resources/META-INF/net.shibboleth.idp/postconfig.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-    xmlns:context="http://www.springframework.org/schema/context"
-    xmlns:util="http://www.springframework.org/schema/util" xmlns:p="http://www.springframework.org/schema/p"
-    xmlns:c="http://www.springframework.org/schema/c" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
-                           http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
-                           http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd"
-
-    default-init-method="initialize" default-destroy-method="destroy">
-
-    <!-- 
-    System beans needed for extension to function, loaded after global.xml.
-    The default template shows an incomplete example authentication flow descriptor which can be
-    removed if not needed 
-    -->
-  
-    <bean id="authn/jdbc-storage" parent="shibboleth.AuthenticationFlow"
-            p:order="%{xxx.order:1000}"
-            p:nonBrowserSupported="%{xxx.nonBrowserSupported:true}"
-            p:passiveAuthenticationSupported="%{xxx.passiveAuthenticationSupported:true}"
-            p:forcedAuthenticationSupported="%{xxx.forcedAuthenticationSupported:true}"
-            p:proxyRestrictionsEnforced="%{xxx.proxyRestrictionsEnforced:%{idp.authn.enforceProxyRestrictions:true}}"
-            p:proxyScopingEnforced="%{xxx.proxyScopingEnforced:false}"
-            p:discoveryRequired="%{xxx.discoveryRequired:false}"
-            p:lifetime="%{xxx.lifetime:%{idp.authn.defaultLifetime:PT1H}}"
-            p:inactivityTimeout="%{xxx.inactivityTimeout:%{idp.authn.defaultTimeout:PT30M}}"
-            p:reuseCondition-ref="#{'%{xxx.reuseCondition:shibboleth.Conditions.TRUE}'.trim()}"
-            p:activationCondition-ref="#{'%{xxx.activationCondition:shibboleth.Conditions.TRUE}'.trim()}">
-        <property name="supportedPrincipals">
-            <list>
-                <bean parent="shibboleth.SAML2AuthnContextClassRef"
-                    c:classRef="class-ref" />
-                <bean parent="shibboleth.SAML1AuthenticationMethod"
-                    c:method="auth-ref" />
-            </list>
-        </property>
-        <property name="supportedPrincipalsByString">
-            <bean parent="shibboleth.CommaDelimStringArray"
-                c:_0="#{'%{xxx.supportedPrincipals:}'.trim()}" />
-        </property>
-    </bean>
-  
-</beans>
\ No newline at end of file
diff --git a/jdbc-storage-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/authn/myplugin/plugin-beans.xml b/jdbc-storage-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/authn/myplugin/plugin-beans.xml
deleted file mode 100644
index 15560b0..0000000
--- a/jdbc-storage-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/authn/myplugin/plugin-beans.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:context="http://www.springframework.org/schema/context"
-       xmlns:util="http://www.springframework.org/schema/util"
-       xmlns:p="http://www.springframework.org/schema/p"
-       xmlns:c="http://www.springframework.org/schema/c"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
-                           http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
-                           http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd"
-                           
-       default-init-method="initialize"
-       default-destroy-method="destroy">
-       
-    <bean class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer"
-        p:placeholderPrefix="%{" p:placeholderSuffix="}" />
-
-    <bean class="net.shibboleth.ext.spring.config.IdentifiableBeanPostProcessor" />
-    <bean class="net.shibboleth.idp.profile.impl.ProfileActionBeanPostProcessor" />
-
-    
-</beans>
diff --git a/jdbc-storage-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/authn/myplugin/plugin-flow.xml b/jdbc-storage-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/authn/myplugin/plugin-flow.xml
deleted file mode 100644
index 98e318a..0000000
--- a/jdbc-storage-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/authn/myplugin/plugin-flow.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<flow xmlns="http://www.springframework.org/schema/webflow" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://www.springframework.org/schema/webflow http://www.springframework.org/schema/webflow/spring-webflow.xsd"
-	parent="authn.abstract, authn/conditions">
-
-	
-
-</flow>
diff --git a/jdbc-storage-impl/src/main/resources/META-INF/services/net.shibboleth.idp.module.IdPModule b/jdbc-storage-impl/src/main/resources/META-INF/services/net.shibboleth.idp.module.IdPModule
index 7961ee5..09130d4 100644
--- a/jdbc-storage-impl/src/main/resources/META-INF/services/net.shibboleth.idp.module.IdPModule
+++ b/jdbc-storage-impl/src/main/resources/META-INF/services/net.shibboleth.idp.module.IdPModule
@@ -1 +1 @@
-net.shibboleth.idp.plugin.storage.jdbc.ExampleModule
+net.shibboleth.plugin.storage.jdbc.impl.JDBCStorageModule
diff --git a/jdbc-storage-impl/src/main/resources/META-INF/services/net.shibboleth.idp.plugin.IdPPlugin b/jdbc-storage-impl/src/main/resources/META-INF/services/net.shibboleth.idp.plugin.IdPPlugin
index 96dea07..5335c7e 100644
--- a/jdbc-storage-impl/src/main/resources/META-INF/services/net.shibboleth.idp.plugin.IdPPlugin
+++ b/jdbc-storage-impl/src/main/resources/META-INF/services/net.shibboleth.idp.plugin.IdPPlugin
@@ -1,2 +1,2 @@
-net.shibboleth.idp.plugin.storage.jdbc.ExamplePlugin
+net.shibboleth.plugin.storage.jdbc.impl.JDBCStoragePlugin
   
\ No newline at end of file
diff --git a/jdbc-storage-impl/src/main/resources/net/shibboleth/idp/plugin/storage/jdbc/conf/placeholder.xml b/jdbc-storage-impl/src/main/resources/net/shibboleth/idp/plugin/storage/jdbc/conf/placeholder.xml
new file mode 100644
index 0000000..1746f0a
--- /dev/null
+++ b/jdbc-storage-impl/src/main/resources/net/shibboleth/idp/plugin/storage/jdbc/conf/placeholder.xml
@@ -0,0 +1 @@
+<empty/>
\ No newline at end of file
diff --git a/jdbc-storage-impl/src/main/resources/net/shibboleth/idp/plugin/storage/jdbc/module.properties b/jdbc-storage-impl/src/main/resources/net/shibboleth/idp/plugin/storage/jdbc/module.properties
index 425d9a5..de18216 100644
--- a/jdbc-storage-impl/src/main/resources/net/shibboleth/idp/plugin/storage/jdbc/module.properties
+++ b/jdbc-storage-impl/src/main/resources/net/shibboleth/idp/plugin/storage/jdbc/module.properties
@@ -1,14 +1,14 @@
 # Example Properties defining an authentication module.
 
 # Class to Module ID mappings
-net.shibboleth.idp.plugin.storage.jdbc.ExampleModule = idp.authn.jdbc-storage
+net.shibboleth.plugin.storage.jdbc.impl.JDBCStorageModule = net.shibboleth.storage.jdbc
 
 # Module Owner
-idp.authn.jdbc-storage.plugin = net.shibboleth.idp.plugin.authn.jdbc-storage
+net.shibboleth.storage.jdbc.plugin = net.shibboleth.idp.plugin.storage.jdbc
 
-idp.authn.jdbc-storage.name = jdbc-storage Authentication
-idp.authn.jdbc-storage.desc = Login flow for jdbc-storage
-idp.authn.jdbc-storage.url = /jdbc-storageConfiguration
-idp.authn.jdbc-storage.1.src = somefile
-idp.authn.jdbc-storage.1.dest = conf/to-somefile
-idp.authn.jdbc-storage.1.replace = true
+net.shibboleth.storage.jdbc.name = JDBC Storage Service
+net.shibboleth.storage.jdbc.desc = Implementation of a Login flow for jdbc-storage
+net.shibboleth.storage.jdbc.url = /jdbc-storageConfiguration
+net.shibboleth.storage.jdbc.1.src = /net/shibboleth/idp/plugin/storage/jdbc/conf/placeholder.xml
+net.shibboleth.storage.jdbc.1.dest = conf/placeholder.xml
+net.shibboleth.storage.jdbc.1.replace = true
diff --git a/jdbc-storage-impl/src/main/resources/net/shibboleth/idp/plugin/storage/jdbc/plugin.properties b/jdbc-storage-impl/src/main/resources/net/shibboleth/idp/plugin/storage/jdbc/plugin.properties
index bb5baf5..72a63e9 100644
--- a/jdbc-storage-impl/src/main/resources/net/shibboleth/idp/plugin/storage/jdbc/plugin.properties
+++ b/jdbc-storage-impl/src/main/resources/net/shibboleth/idp/plugin/storage/jdbc/plugin.properties
@@ -1,9 +1,8 @@
 # Example properties defining this plugin
 
-plugin.id = net.shibboleth.idp.plugin.storage.jdbc.jdbc-storage
+plugin.id = net.shibboleth.idp.plugin.storage.jdbc
 # Only used when package manifest is not available
 plugin.version = 0.0.1
-plugin.license = licence.txt
 
 # No prereqs
 #plugin.modules.required =
diff --git a/pom.xml b/pom.xml
index 7c1b5f2..9a7a2ed 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,12 +6,12 @@
     <artifactId>parent</artifactId>
     <version>11.3.2</version>
   </parent>
-  <groupId>net.shibboleth.idp.plugin.storage.jdbc</groupId>
-  <artifactId>idp-plugin-storage-jdbc-parent</artifactId>
+  <groupId>net.shibboleth.plugin.storage.jdbc</groupId>
+  <artifactId>jdbc-storage-parent</artifactId>
   <version>0.0.1-SNAPSHOT</version>
-  <name>Shibboleth IdP :: Plugins :: jdbc-storage</name>
+  <name>Shibboleth :: Plugins :: jdbc-storage</name>
   <packaging>pom</packaging>
-  <description>jdbc-storage plugin for the Shibboleth IdP.</description>
+  <description>jdbc-storage plugin for the Shibboleth Projects.</description>
   <properties>
     <idp.groupId>net.shibboleth.idp</idp.groupId>
     <idp.version>4.1.0</idp.version>

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


More information about the commits mailing list