[java-sp-server] branch main updated: Update to SI 6, fix some XML issues, and add session modules.

Scott Cantor cantor.2 at osu.edu
Thu Oct 20 14:43:44 UTC 2022


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

scantor pushed a commit to branch main
in repository java-sp-server.

View the commit online:
http://git.shibboleth.net/view/?p=java-sp-server.git;a=commit;h=d5282ed805b1e526ad7552fb6374335220a8cd4c

The following commit(s) were added to refs/heads/main by this push:
     new d5282ed  Update to SI 6, fix some XML issues, and add session modules.
d5282ed is described below

commit d5282ed805b1e526ad7552fb6374335220a8cd4c
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Thu Oct 20 10:43:42 2022 -0400

    Update to SI 6, fix some XML issues, and add session modules.
---
 pom.xml                                            |  11 +--
 sp-conf-impl/pom.xml                               |  15 +++
 .../net/shibboleth/sp/conf/endpoints-system.xml    |   2 +-
 .../net/shibboleth/sp/conf/global-system.xml       |   1 +
 .../net/shibboleth/sp/conf/security-system.xml     | 102 +++++++++++++++++++++
 .../net/shibboleth/sp/conf/services-system.xml     |  13 +--
 .../main/java/net/shibboleth/sp/Application.java   |   7 +-
 .../net/shibboleth/sp/impl/BasicApplication.java   |  14 +--
 sp-session-api/.checkstyle                         |  10 ++
 sp-session-api/.gitignore                          |   1 +
 sp-session-api/pom.xml                             |  46 ++++++++++
 sp-session-impl/.gitignore                         |   1 +
 sp-session-impl/pom.xml                            |  46 ++++++++++
 13 files changed, 245 insertions(+), 24 deletions(-)

diff --git a/pom.xml b/pom.xml
index 9f282f0..8401f70 100644
--- a/pom.xml
+++ b/pom.xml
@@ -20,7 +20,7 @@
         <shib-metadata.version>5.0.0-SNAPSHOT</shib-metadata.version>
         <opensaml.version>5.0.0-SNAPSHOT</opensaml.version>
         <shib-shared.version>9.0.0-SNAPSHOT</shib-shared.version>
-        <spring-int.version>5.5.11</spring-int.version>
+        <spring-int.version>6.0.0-RC1</spring-int.version>
         <checkstyle.configLocation>${project.basedir}/resources/checkstyle.xml</checkstyle.configLocation>
     </properties>
     
@@ -63,6 +63,8 @@
         <module>sp-conf-impl</module>
         <module>sp-server-api</module>
         <module>sp-server-impl</module>
+        <module>sp-session-api</module>
+        <module>sp-session-impl</module>
     </modules>
     
     <dependencies>
@@ -81,13 +83,6 @@
             <artifactId>logback-classic</artifactId>
             <scope>test</scope>
         </dependency>
-        <!--
-        <dependency>
-            <groupId>org.mockito</groupId>
-            <artifactId>mockito-core</artifactId>
-            <scope>test</scope>
-        </dependency>
-        -->
     </dependencies>
     <dependencyManagement>
         <dependencies>
diff --git a/sp-conf-impl/pom.xml b/sp-conf-impl/pom.xml
index 52d00ef..219356d 100644
--- a/sp-conf-impl/pom.xml
+++ b/sp-conf-impl/pom.xml
@@ -35,6 +35,16 @@
             <scope>runtime</scope>
         </dependency>
         
+        <dependency>
+            <groupId>net.shibboleth</groupId>
+            <artifactId>shib-attribute-impl</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>net.shibboleth</groupId>
+            <artifactId>shib-saml-attribute-impl</artifactId>
+            <scope>runtime</scope>
+        </dependency>
         <dependency>
             <groupId>net.shibboleth</groupId>
             <artifactId>shib-attribute-filter-spring</artifactId>
@@ -51,6 +61,11 @@
             <artifactId>opensaml-core-api</artifactId>
             <scope>runtime</scope>
         </dependency>
+        <dependency>
+            <groupId>org.opensaml</groupId>
+            <artifactId>opensaml-core-impl</artifactId>
+            <scope>runtime</scope>
+        </dependency>
         <dependency>
             <groupId>org.opensaml</groupId>
             <artifactId>opensaml-saml-api</artifactId>
diff --git a/sp-conf-impl/src/main/resources/net/shibboleth/sp/conf/endpoints-system.xml b/sp-conf-impl/src/main/resources/net/shibboleth/sp/conf/endpoints-system.xml
index 4ad0e2c..8800f99 100644
--- a/sp-conf-impl/src/main/resources/net/shibboleth/sp/conf/endpoints-system.xml
+++ b/sp-conf-impl/src/main/resources/net/shibboleth/sp/conf/endpoints-system.xml
@@ -38,7 +38,7 @@
         p:metadataResolver-ref="shibboleth.MetadataResolverService"
         p:attributeTranscoderRegistry-ref="shibboleth.AttributeRegistryService"
         p:attributeResolver-ref="shibboleth.AttributeResolverService"
-        p:attributeFilter-ref="shibboleth.AttributeFilterService" /> />
+        p:attributeFilter-ref="shibboleth.AttributeFilterService" />
 
     <import resource="${sp.home}/conf/applications.xml" />
 
diff --git a/sp-conf-impl/src/main/resources/net/shibboleth/sp/conf/global-system.xml b/sp-conf-impl/src/main/resources/net/shibboleth/sp/conf/global-system.xml
index 3969049..f6e954d 100644
--- a/sp-conf-impl/src/main/resources/net/shibboleth/sp/conf/global-system.xml
+++ b/sp-conf-impl/src/main/resources/net/shibboleth/sp/conf/global-system.xml
@@ -47,6 +47,7 @@
     <import resource="http-client.xml" />
     <import resource="sealer.xml" />
     <import resource="integration.xml" />
+    <import resource="security-system.xml" />
     <import resource="services-system.xml" />
 
     <bean id="systemPrereqs" class="org.springframework.beans.factory.config.MethodInvokingBean"
diff --git a/sp-conf-impl/src/main/resources/net/shibboleth/sp/conf/security-system.xml b/sp-conf-impl/src/main/resources/net/shibboleth/sp/conf/security-system.xml
new file mode 100644
index 0000000..31c147f
--- /dev/null
+++ b/sp-conf-impl/src/main/resources/net/shibboleth/sp/conf/security-system.xml
@@ -0,0 +1,102 @@
+<?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 id="shibboleth.DefaultIdentifierGenerationStrategy"
+            class="net.shibboleth.shared.security.IdentifierGenerationStrategy" factory-method="getInstance">
+        <constructor-arg>
+            <util:constant
+                static-field="net.shibboleth.shared.security.IdentifierGenerationStrategy.ProviderType.SECURE" />
+        </constructor-arg>
+    </bean>
+
+    <!-- Principally used in relying-party.xml to define new security configurations. -->
+
+    <bean id="shibboleth.BasicSignatureValidationConfiguration" abstract="true"
+        class="org.opensaml.xmlsec.impl.BasicSignatureValidationConfiguration"
+        p:includedAlgorithms="#{getObject('shibboleth.IncludedSignatureAlgorithms')}"
+        p:excludedAlgorithms="#{getObject('shibboleth.ExcludedSignatureAlgorithms')}" />
+    
+    <bean id="shibboleth.BasicClientTLSValidationConfiguration" abstract="true"
+        class="org.opensaml.security.x509.tls.impl.BasicClientTLSValidationConfiguration" />
+    
+    <bean id="shibboleth.BasicHttpClientSecurityConfiguration" abstract="true"
+        class="org.opensaml.security.httpclient.impl.BasicHttpClientSecurityConfiguration" />
+    
+    <bean id="shibboleth.BasicSignatureSigningConfiguration" abstract="true"
+        class="org.opensaml.xmlsec.impl.BasicSignatureSigningConfiguration"
+        p:includedAlgorithms="#{getObject('shibboleth.IncludedSignatureAlgorithms')}"
+        p:excludedAlgorithms="#{getObject('shibboleth.ExcludedSignatureAlgorithms')}" />
+    
+    <bean id="shibboleth.BasicEncryptionConfiguration" abstract="true"
+        class="org.opensaml.xmlsec.impl.BasicEncryptionConfiguration"
+        p:includedAlgorithms="#{getObject('shibboleth.IncludedSignatureAlgorithms')}"
+        p:excludedAlgorithms="#{getObject('shibboleth.ExcludedSignatureAlgorithms')}" />
+
+    <bean id="shibboleth.BasicDecryptionConfiguration" abstract="true"
+        class="org.opensaml.xmlsec.impl.BasicDecryptionConfiguration"
+        p:includedAlgorithms="#{getObject('shibboleth.IncludedSignatureAlgorithms')}"
+        p:excludedAlgorithms="#{getObject('shibboleth.ExcludedSignatureAlgorithms')}" />
+
+    <!-- Lookup functions to locate security configurations on profile beans. -->
+    <!--
+    <bean id="shibboleth.SignatureValidationConfigurationLookup" lazy-init="true"
+        class="net.shibboleth.idp.profile.config.navigate.SignatureValidationConfigurationLookupFunction"
+        p:relyingPartyConfigurationResolver-ref="shibboleth.RelyingPartyConfigurationResolver" />
+    <bean id="shibboleth.SignatureSigningConfigurationLookup" lazy-init="true"
+        class="net.shibboleth.idp.profile.config.navigate.SignatureSigningConfigurationLookupFunction"
+        p:relyingPartyConfigurationResolver-ref="shibboleth.RelyingPartyConfigurationResolver" />
+    <bean id="shibboleth.DecryptionConfigurationLookup" lazy-init="true"
+        class="net.shibboleth.idp.profile.config.navigate.DecryptionConfigurationLookupFunction"
+        p:relyingPartyConfigurationResolver-ref="shibboleth.RelyingPartyConfigurationResolver" />
+    <bean id="shibboleth.EncryptionConfigurationLookup" lazy-init="true"
+        class="net.shibboleth.idp.profile.config.navigate.EncryptionConfigurationLookupFunction"
+        p:relyingPartyConfigurationResolver-ref="shibboleth.RelyingPartyConfigurationResolver" />
+    <bean id="shibboleth.ClientTLSValidationConfigurationLookup" lazy-init="true"
+        class="net.shibboleth.idp.profile.config.navigate.ClientTLSValidationConfigurationLookupFunction"
+        p:relyingPartyConfigurationResolver-ref="shibboleth.RelyingPartyConfigurationResolver" />
+     -->
+
+    <!-- Beans that implement the mashing of security configurations into final parameter sets. -->
+    
+    <bean id="shibboleth.SignatureValidationParametersResolver"
+        class="org.opensaml.xmlsec.impl.BasicSignatureValidationParametersResolver" />
+    <bean id="shibboleth.SignatureSigningParametersResolver"
+        class="org.opensaml.saml.security.impl.SAMLMetadataSignatureSigningParametersResolver" />
+    <bean id="shibboleth.DecryptionParametersResolver"
+        class="org.opensaml.xmlsec.impl.BasicDecryptionParametersResolver" />
+    <bean id="shibboleth.EncryptionParametersResolver"
+        class="org.opensaml.saml.security.impl.SAMLMetadataEncryptionParametersResolver"
+        c:resolver-ref="shibboleth.MetadataCredentialResolver"
+        p:defaultKeyAgreementUseKeyWrap="%{idp.encryption.keyagreement.metadata.defaultUseKeyWrap:Default}" />
+    <bean id="shibboleth.ClientTLSValidationParametersResolver"
+        class="org.opensaml.security.x509.tls.impl.BasicClientTLSValidationParametersResolver" />
+    <bean id="shibboleth.HttpClientSecurityParametersResolver"
+        class="org.opensaml.security.httpclient.impl.BasicHttpClientSecurityParametersResolver" />
+
+    <!--
+    The beans below are primarily used by trust engines in relying-party-system.xml, but also in the
+    resolver for encryption parameters above.
+    -->
+
+    <bean id="shibboleth.MetadataCredentialResolver"
+        class="org.opensaml.saml.security.impl.MetadataCredentialResolver"
+         p:roleDescriptorResolver-ref="shibboleth.RoleDescriptorResolver"
+         p:keyInfoCredentialResolver-ref="shibboleth.KeyInfoCredentialResolver">
+    </bean>
+
+    <bean id="shibboleth.KeyInfoCredentialResolver"
+        class="org.opensaml.xmlsec.config.impl.DefaultSecurityConfigurationBootstrap"
+        factory-method="buildBasicInlineKeyInfoCredentialResolver" />
+
+ </beans>
diff --git a/sp-conf-impl/src/main/resources/net/shibboleth/sp/conf/services-system.xml b/sp-conf-impl/src/main/resources/net/shibboleth/sp/conf/services-system.xml
index 4d31f8a..fcf4245 100644
--- a/sp-conf-impl/src/main/resources/net/shibboleth/sp/conf/services-system.xml
+++ b/sp-conf-impl/src/main/resources/net/shibboleth/sp/conf/services-system.xml
@@ -56,7 +56,7 @@
     <!-- Attribute Filter Service -->
 
     <bean id="shibboleth.AttributeFilterService" parent="shibboleth.ReloadableService"
-            depends-on="shibboleth.VelocityEngine"
+            depends-on="shibboleth.LoggingService"
             p:serviceConfigurations-ref="ExtendedAttributeFilterResources"
             p:failFast="%{sp.service.attribute.filter.failFast:%{sp.service.failFast:false}}"
             p:reloadCheckDelay="%{sp.service.attribute.filter.checkInterval:PT0S}">
@@ -102,7 +102,8 @@
 
     <!-- Attribute Registry Service -->
 
-    <bean id="shibboleth.AttributeRegistryService" parent="shibboleth.ReloadableService" 
+    <bean id="shibboleth.AttributeRegistryService" parent="shibboleth.ReloadableService"
+            depends-on="shibboleth.OpenSAMLConfig"
             p:serviceConfigurations-ref="ExtendedAttributeRegistryResources"
             p:failFast="%{sp.service.attribute.registry.failFast:%{sp.service.failFast:false}}"
             p:reloadCheckDelay="%{sp.service.attribute.registry.checkInterval:PT0S}">
@@ -150,13 +151,13 @@
         </property>
     </bean>
 
-    <!-- May not need this? -->
-    <!--
     <bean id="shibboleth.MetadataResolver"
         class="net.shibboleth.idp.saml.metadata.impl.ReloadableMetadataResolver"
         c:resolverService-ref="shibboleth.MetadataResolverService" />
-    -->
-
+        
+    <bean id="shibboleth.RoleDescriptorResolver"
+        class="org.opensaml.saml.metadata.resolver.impl.PredicateRoleDescriptorResolver"
+        c:mdResolver-ref="shibboleth.MetadataResolver" />
 
     <import resource="conditional:%{sp.home}/conf/services.xml" />
 
diff --git a/sp-server-api/src/main/java/net/shibboleth/sp/Application.java b/sp-server-api/src/main/java/net/shibboleth/sp/Application.java
index 92cd1c0..e36753f 100644
--- a/sp-server-api/src/main/java/net/shibboleth/sp/Application.java
+++ b/sp-server-api/src/main/java/net/shibboleth/sp/Application.java
@@ -37,12 +37,15 @@ import net.shibboleth.sp.remoting.Endpoint;
  * 
  * <p>Applications are an endpoint for messages from agents and are expected to handle a
  * large range of messages by dispatching them internally to other components.</p>
+ * 
+ * <p>Components and services that are not "SP-aware" are instead injected into
+ * and made accessible from this interface.</p>
  */
 @ThreadSafe
 public interface Application extends IdentifiedComponent, Endpoint {
 
-    /** Name of common "operation" member to signal receiving component. */
-    @Nonnull @NotEmpty static String OPERATION = "op";
+    /** Name of common member to signal receiving component. */
+    @Nonnull @NotEmpty static String COMPONENT = "this";
     
     // TODO: Expose various injected services for use by ApplicationEndpoints.
     
diff --git a/sp-server-impl/src/main/java/net/shibboleth/sp/impl/BasicApplication.java b/sp-server-impl/src/main/java/net/shibboleth/sp/impl/BasicApplication.java
index ddd3874..b53412b 100644
--- a/sp-server-impl/src/main/java/net/shibboleth/sp/impl/BasicApplication.java
+++ b/sp-server-impl/src/main/java/net/shibboleth/sp/impl/BasicApplication.java
@@ -156,17 +156,17 @@ public class BasicApplication extends AbstractEndpoint implements Application {
     @Nonnull public DDF doReceive(@Nonnull final DDF input) throws RemoteProcessingException {
         checkComponentActive();
         
-        final DDF operation = input.getmember(OPERATION);
-        if (!operation.isstring()) {
-            log.warn("{}: Received message without string-valued {} member", getId(), OPERATION);
-            throw new RemoteProcessingException("No operation found in message");
+        final DDF component = input.getmember(COMPONENT);
+        if (!component.isstring()) {
+            log.warn("{}: Received message without string-valued {} member", getId(), COMPONENT);
+            throw new RemoteProcessingException("No component identified in message");
         }
         
-        final ApplicationEndpoint endpoint = endpointManager.getApplicationEndpoint(operation.string());
+        final ApplicationEndpoint endpoint = endpointManager.getApplicationEndpoint(component.string());
         
         if (endpoint == null) {
-            log.warn("{}: No registered target for operation {}", getId(), operation.string());
-            throw new RemoteProcessingException("No registered target for operation " + operation.string());
+            log.warn("{}: No registered component {}", getId(), component.string());
+            throw new RemoteProcessingException("No registered component " + component.string());
         }
         
         return endpoint.receive(this, input);
diff --git a/sp-session-api/.checkstyle b/sp-session-api/.checkstyle
new file mode 100644
index 0000000..5bae456
--- /dev/null
+++ b/sp-session-api/.checkstyle
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false">
+  <local-check-config name="Shibboleth Checkstyle" location="/java-sp-server/resources/checkstyle.xml" type="project" description="">
+    <additional-data name="protect-config-file" value="false"/>
+  </local-check-config>
+  <fileset name="all" enabled="true" check-config-name="Shibboleth Checkstyle" local="true">
+    <file-match-pattern match-pattern="." include-pattern="true"/>
+  </fileset>
+</fileset-config>
diff --git a/sp-session-api/.gitignore b/sp-session-api/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/sp-session-api/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/sp-session-api/pom.xml b/sp-session-api/pom.xml
new file mode 100644
index 0000000..c064e97
--- /dev/null
+++ b/sp-session-api/pom.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- See LICENSE.txt file in the root directory of this repository for the copyright/license information. -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>net.shibboleth.sp</groupId>
+        <artifactId>sp-server-parent</artifactId>
+        <version>0.0.1-SNAPSHOT</version>
+    </parent>
+    
+    <artifactId>sp-session-api</artifactId>
+    <description>SP Session API.</description>
+    <name>Shibboleth SP :: Processing Hub :: Session API</name>
+    <packaging>jar</packaging>
+    
+    <properties>
+        <checkstyle.configLocation>${project.basedir}/../resources/checkstyle.xml</checkstyle.configLocation>
+        <automatic.module.name>net.shibboleth.sp.session</automatic.module.name>
+    </properties>
+        
+    <dependencies>
+        <!-- Compile dependencies -->
+        <dependency>
+            <groupId>net.shibboleth</groupId>
+            <artifactId>shib-attribute-api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>net.shibboleth</groupId>
+            <artifactId>shib-metadata-api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>net.shibboleth</groupId>
+            <artifactId>shib-support</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        
+        <!-- Provided dependencies -->
+        
+        <!-- Test Dependencies -->
+    </dependencies>
+
+</project>
diff --git a/sp-session-impl/.gitignore b/sp-session-impl/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/sp-session-impl/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/sp-session-impl/pom.xml b/sp-session-impl/pom.xml
new file mode 100644
index 0000000..1487723
--- /dev/null
+++ b/sp-session-impl/pom.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- See LICENSE.txt file in the root directory of this repository for the copyright/license information. -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>net.shibboleth.sp</groupId>
+        <artifactId>sp-server-parent</artifactId>
+        <version>0.0.1-SNAPSHOT</version>
+    </parent>
+    
+    <artifactId>sp-session-impl</artifactId>
+    <description>SP Session Implememntation.</description>
+    <name>Shibboleth SP :: Processing Hub :: Session Implementation</name>
+    <packaging>jar</packaging>
+    
+    <properties>
+        <checkstyle.configLocation>${project.basedir}/../resources/checkstyle.xml</checkstyle.configLocation>
+        <automatic.module.name>net.shibboleth.sp.session.impl</automatic.module.name>
+    </properties>
+        
+    <dependencies>
+        <!-- Compile dependencies -->
+        <dependency>
+            <groupId>net.shibboleth</groupId>
+            <artifactId>shib-attribute-api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>net.shibboleth</groupId>
+            <artifactId>shib-metadata-api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>net.shibboleth</groupId>
+            <artifactId>shib-support</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        
+        <!-- Provided dependencies -->
+        
+        <!-- Test Dependencies -->
+    </dependencies>
+
+</project>

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


More information about the commits mailing list