[java-idp-oidc] 01/02: JOIDC-61 - Support metadata policies in the dyn. reg. profile configuration

Henri Mikkonen henri.mikkonen at iki.fi
Wed Mar 9 13:32:58 UTC 2022


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

hjmikkon pushed a commit to branch main
in repository java-idp-oidc.

View the commit online:
http://git.shibboleth.net/view/?p=java-idp-oidc.git;a=commit;h=6834dad8aec884637ba1339d591f09f26bfbfc3b

commit 6834dad8aec884637ba1339d591f09f26bfbfc3b
Author: Henri Mikkonen <henri.mikkonen at iki.fi>
AuthorDate: Wed Mar 9 15:29:39 2022 +0200

    JOIDC-61 - Support metadata policies in the dyn. reg. profile configuration
    
    https://shibboleth.atlassian.net/browse/JOIDC-61
    
    Simplified the setting of profile configuration -specific metadata policy file
    by exploiting new classes from java-oidc-common.
---
 .../idp/service/relying-party/postconfig.xml       | 52 +++++++---------------
 1 file changed, 17 insertions(+), 35 deletions(-)

diff --git a/idp-oidc-extension-impl/src/main/resources/META-INF/net/shibboleth/idp/service/relying-party/postconfig.xml b/idp-oidc-extension-impl/src/main/resources/META-INF/net/shibboleth/idp/service/relying-party/postconfig.xml
index 6711e91e..62274f3e 100644
--- a/idp-oidc-extension-impl/src/main/resources/META-INF/net/shibboleth/idp/service/relying-party/postconfig.xml
+++ b/idp-oidc-extension-impl/src/main/resources/META-INF/net/shibboleth/idp/service/relying-party/postconfig.xml
@@ -795,40 +795,16 @@
     <bean id="shibboleth.oidc.PublishKeySetRequestObjectDecryptionConfiguration" parent="shibboleth.BasicEncryptionConfiguration"
         p:keyTransportEncryptionCredentials="#{getObject('shibboleth.oidc.EncryptionCredentialsToPublish') ?: getObject('shibboleth.oidc.EncryptionCredentials')}"/>
 
-    <bean id="shibboleth.oidc.dynreg.DefaultMetadataPolicyLookupStrategy"
-        class="net.shibboleth.oidc.profile.config.navigate.ResolverBasedRegistrationMetadataPolicyLookupFunction"
-        p:metadataPolicyResolver-ref="shibboleth.oidc.dynreg.DefaultMetadataPolicyResolver" />
-
-    <bean id="shibboleth.oidc.dynreg.BaseMetadataPolicyResolver" abstract="true"
-        class="net.shibboleth.oidc.metadata.policy.impl.OIDCMetadataPolicyResolver" />
-
     <bean id="shibboleth.oidc.dyngreg.DefaultMetadataPolicyFilename" class="java.lang.String" factory-method="valueOf">
         <constructor-arg value="%{idp.oidc.dynreg.defaultMetadataPolicyFile:}" />
     </bean>
 
-    <bean id="shibboleth.oidc.dynreg.DefaultMetadataPolicyResolver"
-        parent="shibboleth.oidc.dynreg.BaseMetadataPolicyResolver">
-        <constructor-arg>
-            <bean parent="shibboleth.oidc.dynreg.BatchCacheBuilder">
-                <constructor-arg>
-                    <bean p:cacheId="DefaultPolicyFileCache" parent="shibboleth.oidc.dynreg.BatchMetadataCacheBuilderSpec">
-                        <property name="loadingStrategy">
-                            <bean class="net.shibboleth.oidc.metadata.cache.impl.DefaultFileLoadingStrategy"
-                                c:metadata-ref="shibboleth.oidc.dyngreg.DefaultMetadataPolicyFilename" />
-                        </property>
-                    </bean>
-                </constructor-arg>
-            </bean>
-        </constructor-arg>
-    </bean>
-
-    <!--  Batch OIDC provider cache builder factory and template specification -->
-    <bean id="batchCacheFactory" class="net.shibboleth.oidc.metadata.cache.impl.BatchMetadataCacheBuilder$Builder"/>
-
-    <bean id="shibboleth.oidc.dynreg.BatchCacheBuilder" factory-bean="batchCacheFactory" factory-method="build"
-        abstract="true"/>
+    <bean id="shibboleth.oidc.dynreg.DefaultMetadataPolicyLookupStrategy"
+        parent="shibboleth.oidc.dynreg.MetadataPolicyLookupStrategy"
+        c:resource-ref="shibboleth.oidc.dyngreg.DefaultMetadataPolicyFilename"
+        c:id="DefaultProfileMetadataPolicyCache" />
 
-    <bean id="shibboleth.oidc.dynreg.BatchMetadataCacheBuilderSpec" abstract="true"
+    <bean id="shibboleth.oidc.dynreg.BatchMetadataCacheBuilderSpec"
         class="net.shibboleth.oidc.metadata.cache.impl.BatchMetadataCacheBuilderSpec"
         p:parsingStrategy-ref="shibboleth.oidc.dynreg.DefaultJSONMapParsingStrategy"
         p:criteriaToIdentifierStrategy-ref="shibboleth.oidc.dynreg.DefaultMetadataCriteriaToIdentifierStrategy"
@@ -852,13 +828,19 @@
     <bean id="shibboleth.oidc.dynreg.DefaultMetadataPolicyIdentifierExtractionStrategy"
        parent="shibboleth.Functions.Constant" c:target="#{getObject('shibboleth.oidc.dyngreg.DefaultMetadataPolicyFilename') ?: 'undefined'}" />
 
+    <bean id="shibboleth.oidc.dynreg.MetadataPolicyLookupStrategyFactory"
+        class="net.shibboleth.oidc.metadata.cache.impl.MetadataPolicyLookupStrategyFactory" />
+
+    <bean id="shibboleth.oidc.dynreg.MetadataPolicyLookupStrategy" abstract="true"
+        factory-bean="shibboleth.oidc.dynreg.MetadataPolicyLookupStrategyFactory" 
+        factory-method="buildFileLoadingMetadataPolicyResolver"
+        c:cacheSpec-ref="shibboleth.oidc.dynreg.BatchMetadataCacheBuilderSpec" 
+        c:criteriaSetLookupStrategy="#{null}"/>
+
     <bean id="shibboleth.oidc.dynreg.DefaultMetadataPolicy"
-            factory-bean="shibboleth.oidc.dynreg.DefaultMetadataPolicyResolver"
-            factory-method="resolveSingle">
-        <constructor-arg>
-            <!-- Empty criteria set is assumed to be ok for the resolver -->
-            <bean class="net.shibboleth.utilities.java.support.resolver.CriteriaSet" />
-        </constructor-arg>
+        factory-bean="shibboleth.oidc.dynreg.DefaultMetadataPolicyLookupStrategy"
+        factory-method="apply" c:_0="#{null}">
+        <!--  PRC given to the apply-method can be null as the default function doesn't exploit that -->
     </bean>
 
 </beans>

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


More information about the commits mailing list