[java-plugin-shibd] branch main updated: Lay out initial parent beans for storage-based credential resolvers.

Codeberg noreply at shibboleth.net
Mon Aug 31 19:11:20 UTC 2026


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

codeberg pushed a commit to branch main
in repository java-plugin-shibd.

View the commit online:
https://codeberg.org/Shibboleth/java-plugin-shibd/commit/8d41d77630bef347a70a4fcde4ddf0c6c8d1a5f0

The following commit(s) were added to refs/heads/main by this push:
     new 8d41d77  Lay out initial parent beans for storage-based credential resolvers.
8d41d77 is described below

commit 8d41d77630bef347a70a4fcde4ddf0c6c8d1a5f0
Author: Scott Cantor <scott at restingparrotsoftware.com>
AuthorDate: Mon Aug 31 15:11:11 2026 -0400

    Lay out initial parent beans for storage-based credential resolvers.
---
 .../resources/META-INF/net.shibboleth.idp/postconfig.xml    |  6 ++++++
 .../net/shibboleth/idp/module/conf/sp/credentials.xml       |  4 +++-
 .../net/shibboleth/idp/module/conf/sp/sp.properties         |  2 ++
 .../resources/net/shibboleth/sp/conf/credentials-system.xml | 13 +++++++++++++
 .../impl/X509CredentialStorageServiceResolverTest.java      |  3 ---
 5 files changed, 24 insertions(+), 4 deletions(-)

diff --git a/sp-conf-impl/src/main/resources/META-INF/net.shibboleth.idp/postconfig.xml b/sp-conf-impl/src/main/resources/META-INF/net.shibboleth.idp/postconfig.xml
index 493341d..d7561f0 100644
--- a/sp-conf-impl/src/main/resources/META-INF/net.shibboleth.idp/postconfig.xml
+++ b/sp-conf-impl/src/main/resources/META-INF/net.shibboleth.idp/postconfig.xml
@@ -69,6 +69,12 @@
         c:metricName="net.shibboleth.sp.credential"
         p:service-ref="shibboleth.sp.CredentialResolverService" />
 
+    <!-- TODO: Migratre to IdP with source code. -->
+    <bean id="shibboleth.FilesystemStorageService.ReadOnly"
+        class="net.shibboleth.sp.storage.impl.FilesystemStorageService" abstract="true" />
+    <bean id="shibboleth.FilesystemStorageService.ReadWrite"
+        class="net.shibboleth.sp.storage.impl.FilesystemStorageService" abstract="true"
+        p:readOnly="false" />
     
     <bean id="shibboleth.RemotedHttpServletRequestSupplier" class="net.shibboleth.sp.messaging.impl.RemotedHttpServletRequestSupplier" />
     <bean id="shibboleth.RemotedHttpServletResponseSupplier" class="net.shibboleth.sp.messaging.impl.RemotedlHttpServletResponseSupplier" />
diff --git a/sp-conf-impl/src/main/resources/net/shibboleth/idp/module/conf/sp/credentials.xml b/sp-conf-impl/src/main/resources/net/shibboleth/idp/module/conf/sp/credentials.xml
index ee50782..aabbae3 100644
--- a/sp-conf-impl/src/main/resources/net/shibboleth/idp/module/conf/sp/credentials.xml
+++ b/sp-conf-impl/src/main/resources/net/shibboleth/idp/module/conf/sp/credentials.xml
@@ -4,10 +4,12 @@
        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:resolver="urn:mace:shibboleth:2.0:resolver"
        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"
+                           http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
+                           urn:mace:shibboleth:2.0:resolver http://shibboleth.net/schema/idp/shibboleth-attribute-resolver.xsd"
                            
        default-init-method="initialize"
        default-destroy-method="destroy">
diff --git a/sp-conf-impl/src/main/resources/net/shibboleth/idp/module/conf/sp/sp.properties b/sp-conf-impl/src/main/resources/net/shibboleth/idp/module/conf/sp/sp.properties
index c33cd39..8f87b64 100644
--- a/sp-conf-impl/src/main/resources/net/shibboleth/idp/module/conf/sp/sp.properties
+++ b/sp-conf-impl/src/main/resources/net/shibboleth/idp/module/conf/sp/sp.properties
@@ -17,6 +17,8 @@ sp.service.agents.checkInterval = PT5M
 #sp.service.credential.resources = shibboleth.sp.CredentialResolverResources
 #sp.service.credential.failFast = false
 sp.service.credential.checkInterval = PT5M
+# Default storage root for file-backed credential resolvers 
+#sp.service.credential.storageBase = %{idp.home}/credentials/sp
 
 # General SP cookie properties
 #sp.cookie.secure = true
diff --git a/sp-conf-impl/src/main/resources/net/shibboleth/sp/conf/credentials-system.xml b/sp-conf-impl/src/main/resources/net/shibboleth/sp/conf/credentials-system.xml
index a7e7249..1bc83c4 100644
--- a/sp-conf-impl/src/main/resources/net/shibboleth/sp/conf/credentials-system.xml
+++ b/sp-conf-impl/src/main/resources/net/shibboleth/sp/conf/credentials-system.xml
@@ -23,6 +23,19 @@
     <bean id="shibboleth.sp.CredentialResolver.MapBased"
         class="net.shibboleth.sp.credential.impl.StaticMapCredentialResolver" abstract="true" />
 
+    <bean id="shibboleth.sp.CredentialStorage.ReadOnly"
+        parent="shibboleth.FilesystemStorageService.ReadOnly" lazy-init="true"
+        p:storageBase="%{sp.service.credential.storageBase:%{idp.home}/credentials/sp}" />
+        
+    <bean id="shibboleth.sp.CredentialStorage.ReadWrite"
+        parent="shibboleth.FilesystemStorageService.ReadWrite" lazy-init="true"
+        p:storageBase="%{sp.service.credential.storageBase:%{idp.home}/credentials/sp}" />
+    
+    <bean id="shibboleth.sp.CredentialResolver.StorageBased.X509"
+        class="net.shibboleth.sp.credential.impl.X509CredentialStorageServiceResolver" abstract="true"
+        p:storageService-ref="shibboleth.sp.CredentialStorage.ReadOnly"
+        p:velocityEngine-ref="shibboleth.VelocityEngine" />
+
     <!-- Wildcard import hook for plugins. -->
     <import resource="classpath*:/META-INF/net/shibboleth/sp/service/credentials/postconfig.xml" />
 
diff --git a/sp-server-impl/src/test/java/net/shibboleth/sp/credential/impl/X509CredentialStorageServiceResolverTest.java b/sp-server-impl/src/test/java/net/shibboleth/sp/credential/impl/X509CredentialStorageServiceResolverTest.java
index 7aebb00..47d16f6 100644
--- a/sp-server-impl/src/test/java/net/shibboleth/sp/credential/impl/X509CredentialStorageServiceResolverTest.java
+++ b/sp-server-impl/src/test/java/net/shibboleth/sp/credential/impl/X509CredentialStorageServiceResolverTest.java
@@ -24,14 +24,12 @@ import java.nio.file.attribute.BasicFileAttributes;
 import java.security.PrivateKey;
 import java.security.cert.X509Certificate;
 import java.time.Duration;
-import java.util.List;
 import java.util.Map;
 
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
 
 import org.opensaml.core.criterion.EntityIdCriterion;
-import org.opensaml.security.credential.Credential;
 import org.opensaml.security.credential.UsageType;
 import org.opensaml.security.criteria.UsageCriterion;
 import org.opensaml.security.crypto.KeySupport;
@@ -41,7 +39,6 @@ import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
 
-import com.google.common.cache.Cache;
 import com.google.common.cache.CacheBuilder;
 
 import net.shibboleth.shared.collection.CollectionSupport;

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


More information about the commits mailing list