[java-idp-plugin-oidc-rp] branch main updated: Change XML wiring to match new builder classes.
Phil Smart
philip.smart at jisc.ac.uk
Fri Nov 5 10:01:48 UTC 2021
This is an automated email from the git hooks/post-receive script.
philsmart pushed a commit to branch main
in repository java-idp-plugin-oidc-rp.
View the commit online:
http://git.shibboleth.net/view/?p=java-idp-plugin-oidc-rp.git;a=commit;h=3a10b070dcc5393379ac3bafee6ea4b229838882
The following commit(s) were added to refs/heads/main by this push:
new 3a10b07 Change XML wiring to match new builder classes.
3a10b07 is described below
commit 3a10b070dcc5393379ac3bafee6ea4b229838882
Author: Phil Smart <philip.smart at jisc.ac.uk>
AuthorDate: Fri Nov 5 10:01:43 2021 +0000
Change XML wiring to match new builder classes.
---
.../idp/plugin/authn/oidc/rp/OIDCRPPlugin.java | 30 ++++--
.../impl/OIDCProviderMetadataLookupHandler.java | 4 +-
.../oidc-relying-party-authn-beans.xml | 1 +
.../authn/providermetadata-resolver-system.xml | 115 +++++++++++++--------
4 files changed, 94 insertions(+), 56 deletions(-)
diff --git a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/OIDCRPPlugin.java b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/OIDCRPPlugin.java
index 27fd2c8..e24c0dc 100644
--- a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/OIDCRPPlugin.java
+++ b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/OIDCRPPlugin.java
@@ -1,27 +1,35 @@
package net.shibboleth.idp.plugin.authn.oidc.rp;
import java.io.IOException;
-import javax.annotation.Nonnull;
+import java.util.Collections;
-import net.shibboleth.idp.plugin.IdPPlugin;
+import net.shibboleth.idp.module.IdPModule;
+import net.shibboleth.idp.module.ModuleException;
import net.shibboleth.idp.plugin.PluginException;
-import net.shibboleth.idp.plugin.PropertyDrivenIdPPlugin;
+import net.shibboleth.idp.plugin.impl.FirstPartyIdPPlugin;
/**
- * Plugin description about the webauthn plugin.
+ * Plugin description about the OIDC-RP plugin.
*/
-public class OIDCRPPlugin extends PropertyDrivenIdPPlugin {
+public class OIDCRPPlugin extends FirstPartyIdPPlugin {
/**
* Constructor.
- *
- * @param claz type of plugin
*
- * @throws IOException if properties can't be loaded
- * @throws PluginException if another error occurs
+ * @throws IOException if the properties fail to load
+ * @throws PluginException if other errors occur
*/
- public OIDCRPPlugin(@Nonnull final Class<? extends IdPPlugin> claz) throws IOException, PluginException {
- super(claz);
+ public OIDCRPPlugin() throws IOException, PluginException{
+ super(OIDCRPPlugin.class);
+ try {
+ final IdPModule module = new OIDCRPModule();
+ setEnableOnInstall(Collections.singleton(module));
+ setDisableOnRemoval(Collections.singleton(module));
+ } catch (final IOException e) {
+ throw e;
+ } catch (final ModuleException e) {
+ throw new PluginException(e);
+ }
}
}
\ No newline at end of file
diff --git a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/metadata/impl/OIDCProviderMetadataLookupHandler.java b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/metadata/impl/OIDCProviderMetadataLookupHandler.java
index 369fbfa..ef3c1fe 100644
--- a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/metadata/impl/OIDCProviderMetadataLookupHandler.java
+++ b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/metadata/impl/OIDCProviderMetadataLookupHandler.java
@@ -33,7 +33,7 @@ public class OIDCProviderMetadataLookupHandler extends AbstractMessageHandler {
/** Logger. */
@Nonnull private final Logger log = LoggerFactory.getLogger(OIDCProviderMetadataLookupHandler.class);
- /** Resolver used to look up OIDC client information. */
+ /** Resolver used to look up OIDC provider information. */
@NonnullAfterInit private ProviderMetadataResolver providerResolver;
/** Strategy used to obtain the issuer id value for the inbound message context. */
@@ -43,7 +43,7 @@ public class OIDCProviderMetadataLookupHandler extends AbstractMessageHandler {
* Constructor.
*/
public OIDCProviderMetadataLookupHandler() {
- issuerIDLookupStrategy = new DefaultIssuerIDLookupFunction();
+ //issuerIDLookupStrategy = new DefaultIssuerIDLookupFunction();
}
/**
diff --git a/idp-oidc-rp-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/authn/OIDCRelyingParty/oidc-relying-party-authn-beans.xml b/idp-oidc-rp-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/authn/OIDCRelyingParty/oidc-relying-party-authn-beans.xml
index 29e4eaa..d6e12b0 100644
--- a/idp-oidc-rp-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/authn/OIDCRelyingParty/oidc-relying-party-authn-beans.xml
+++ b/idp-oidc-rp-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/authn/OIDCRelyingParty/oidc-relying-party-authn-beans.xml
@@ -90,6 +90,7 @@
<bean id="shibboleth.oidc.rp.IssuerIDLookupStrategy"
class="net.shibboleth.idp.plugin.authn.oidc.rp.metadata.impl.DefaultIssuerIDLookupFunction"
scope="prototype" />
+
diff --git a/idp-oidc-rp-impl/src/main/resources/net/shibboleth/idp/plugin/authn/oidc/rp/conf/authn/providermetadata-resolver-system.xml b/idp-oidc-rp-impl/src/main/resources/net/shibboleth/idp/plugin/authn/oidc/rp/conf/authn/providermetadata-resolver-system.xml
index d3e71a9..fded814 100644
--- a/idp-oidc-rp-impl/src/main/resources/net/shibboleth/idp/plugin/authn/oidc/rp/conf/authn/providermetadata-resolver-system.xml
+++ b/idp-oidc-rp-impl/src/main/resources/net/shibboleth/idp/plugin/authn/oidc/rp/conf/authn/providermetadata-resolver-system.xml
@@ -1,66 +1,95 @@
<?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
+ 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"
- default-lazy-init="true">
-
+
+ default-init-method="initialize" default-destroy-method="destroy" default-lazy-init="true">
+
<!-- Loaded by the postconfig.xml file as global beans -->
- <bean id="shibboleth.oidc.rp.ProviderMetadataProvider" lazy-init="false"
+ <bean id="shibboleth.oidc.rp.ProviderMetadataProvider" lazy-init="false"
class="net.shibboleth.oidc.metadata.ProviderMetadataProviderContainer"
p:embeddedResolver-ref="shibboleth.oidc.rp.ChainingProviderMetadataResolver">
</bean>
<bean id="shibboleth.oidc.rp.ChainingProviderMetadataResolver"
- class="net.shibboleth.oidc.metadata.impl.ChainingProviderMetadataResolver"
- p:id="InternalEmbeddedChainResolver"
- p:resolvers="#{getObject('shibboleth.oidc.rp.ProviderMetadataResolvers')}"/>
+ class="net.shibboleth.oidc.metadata.impl.ChainingProviderMetadataResolver" p:id="InternalEmbeddedChainResolver"
+ p:resolvers="#{getObject('shibboleth.oidc.rp.ProviderMetadataResolvers')}" />
<!-- abstract beans for the user space config to extend -->
- <bean id="shibboleth.oidc.rp.FilesystemProviderMetadataResolver" abstract="true"
- class="net.shibboleth.oidc.metadata.impl.FilesystemProviderMetadataResolver"/>
-
- <bean id="shibboleth.oidc.rp.HTTPProviderMetadataResolver" abstract="true"
- class="net.shibboleth.oidc.metadata.impl.DynamicOIDCProviderMetadataResolver"
- c:metadataCache="#{getObject('shibboleth.oidc.rp.OIDCProviderMetadataCache')}"/>
-
+ <bean id="shibboleth.oidc.rp.OIDCProviderMetadataResolver" abstract="true"
+ class="net.shibboleth.oidc.metadata.impl.OIDCProviderMetadataResolver" />
+
<bean id="shibboleth.oidc.rp.DefaultHTTPProviderConfigurationMetadataFetchingStrategy"
class="net.shibboleth.oidc.metadata.impl.HTTPProviderConfigurationFetchingStrategy"
c:client-ref="shibboleth.InternalHttpClient"
- c:handler-ref="shibboleth.oidc.rp.DefaultHTTProviderConfigurationMetadataResponseHandler"
- />
+ c:handler-ref="shibboleth.oidc.rp.DefaultHTTProviderConfigurationMetadataResponseHandler" />
<bean id="shibboleth.oidc.rp.DefaultHTTProviderConfigurationMetadataResponseHandler"
- class="net.shibboleth.oidc.metadata.impl.HTTPProviderConfigurationFetchingStrategy.OIDCProviderMetadataResponseHandler"
- />
-
- <bean id="shibboleth.oidc.rp.OIDCProviderMetadataCache"
- class="net.shibboleth.oidc.metadata.cache.impl.OIDCProviderMetadataCacheFactoryBean"
- p:cacheOperationMode="#{T(net.shibboleth.oidc.metadata.cache.impl.MetadataCacheBuilder.CacheOperationMode).DYNAMIC}"
- p:fetchStrategy="#{getObject('shibboleth.oidc.rp.DefaultHTTPProviderConfigurationMetadataFetchingStrategy')}"
- p:criteriaToIdentifierStrategy="#{getObject('DefaultOIDCProviderMetadataCriteriaToIdentifierStrategy')}"
- p:metadataExpirationTimeStrategy="#{getObject('DefaultMetadataExpirationTimeStrategy')}"
- p:identifierExtractionStrategy="#{getObject('DefaultMetadataIdentifierExtractionStrategy')}"
- />
-
- <bean id="DefaultMetadataExpirationTimeStrategy"
- class="net.shibboleth.oidc.metadata.cache.impl.DefaultOIDCProviderMetadataExpirationTimeStrategy"
- c:duration="PT10M"/>
+ class="net.shibboleth.oidc.metadata.impl.HTTPProviderConfigurationFetchingStrategy.OIDCProviderMetadataResponseHandler" />
+
+
+
+ <!-- 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.rp.BatchCacheBuilder" factory-bean="batchCacheFactory" factory-method="build"
+ abstract="true"/>
+
+ <bean class="net.shibboleth.oidc.metadata.cache.impl.BatchMetadataCacheBuilderSpec"
+ id="shibboleth.oidc.rp.BaseProviderBatchCacheBuilderSpec" abstract="true"
+ p:parsingStrategy-ref="shibboleth.oidc.rp.DefaultOIDCProviderMetadataParsingStrategy"
+ p:criteriaToIdentifierStrategy-ref="shibboleth.oidc.rp.DefaultOIDCProviderMetadataCriteriaToIdentifierStrategy"
+ p:sourceMetadataExpiryStrategy-ref="shibboleth.oidc.rp.DefaultODICProviderSourceMetadataExpirationTimeStrategy"
+ p:identifierExtractionStrategy-ref="shibboleth.oidc.rp.DefaultOIDCProviderMetadataIdentifierExtractionStrategy"/>
+
- <bean id="DefaultMetadataIdentifierExtractionStrategy"
- class="net.shibboleth.oidc.metadata.cache.impl.DefaultOIDCProviderMetadataIdentifierExtractionStrategy"/>
+ <!-- Dynamic OIDC provider cache builder factory and template specification -->
- <bean id="DefaultOIDCProviderMetadataCriteriaToIdentifierStrategy"
- class="net.shibboleth.oidc.metadata.cache.impl.DefaultOIDCProviderMetadataCriteriaToIdentifierStrategy"/>
+ <bean id="dynamicCacheFactory" class="net.shibboleth.oidc.metadata.cache.impl.DynamicMetadataCacheBuilder$Builder"/>
+
+ <bean id="shibboleth.oidc.rp.DynamicCacheBuilder" factory-bean="dynamicCacheFactory" factory-method="build"
+ abstract="true"/>
+
+ <bean class="net.shibboleth.oidc.metadata.cache.impl.DynamicMetadataCacheBuilderSpec"
+ id="shibboleth.oidc.rp.BaseProviderDynamicCacheBuilderSpec" abstract="true"
+ p:fetchStrategy-ref="shibboleth.oidc.rp.DefaultHTTPProviderConfigurationMetadataFetchingStrategy"
+ p:criteriaToIdentifierStrategy-ref="shibboleth.oidc.rp.DefaultOIDCProviderMetadataCriteriaToIdentifierStrategy"
+ p:metadataExpirationTimeStrategy-ref="shibboleth.oidc.rp.DefaultODICProviderMetadataExpirationTimeStrategy"
+ p:identifierExtractionStrategy-ref="shibboleth.oidc.rp.DefaultOIDCProviderMetadataIdentifierExtractionStrategy"
+ />
+
+
+ <!-- Common parents for cache strategy implementations -->
+
+ <bean id="shibboleth.oidc.rp.ProviderConfigurationMetadataFileLoadingStrategy"
+ class="net.shibboleth.oidc.metadata.cache.impl.DefaultFileLoadingStrategy" abstract="true"/>
+
+ <!-- Common implementation strategies for cache implementations -->
+
+ <bean id="shibboleth.oidc.rp.DefaultOIDCProviderMetadataParsingStrategy" scope="prototype"
+ class="net.shibboleth.oidc.metadata.cache.impl.DefaultOIDCProviderMetadataParsingStrategy" />
+
+ <bean id="shibboleth.oidc.rp.DefaultMapParsingStrategy" scope="prototype"
+ class="net.shibboleth.oidc.metadata.cache.impl.DefaultJSONMapParsingStrategy" />
+
+ <bean id="shibboleth.oidc.rp.DefaultODICProviderMetadataExpirationTimeStrategy" scope="prototype"
+ class="net.shibboleth.oidc.metadata.cache.impl.DefaultOIDCProviderMetadataExpirationTimeStrategy"
+ c:duration="PT10M" />
+
+ <bean id="shibboleth.oidc.rp.DefaultODICProviderSourceMetadataExpirationTimeStrategy" scope="prototype"
+ class="net.shibboleth.oidc.metadata.cache.impl.DefaultOIDCProviderSourceMetadataExpirationTimeStrategy"
+ c:duration="PT10M" />
+
+ <bean id="shibboleth.oidc.rp.DefaultOIDCProviderMetadataIdentifierExtractionStrategy" scope="prototype"
+ class="net.shibboleth.oidc.metadata.cache.impl.DefaultOIDCProviderMetadataIdentifierExtractionStrategy" />
+
+ <bean id="shibboleth.oidc.rp.DefaultOIDCProviderMetadataCriteriaToIdentifierStrategy" scope="prototype"
+ class="net.shibboleth.oidc.metadata.cache.impl.DefaultOIDCProviderMetadataCriteriaToIdentifierStrategy" />
<!-- Wildcard import hook for plugins. -->
<!-- TODO: Not sure we need this -->
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list