[java-idp-oidc] branch maint-3.0 updated: ReplayCache is not used, removing from ValidateEndpointAuthentication action.

Henri Mikkonen henri.mikkonen at iki.fi
Mon Jan 3 11:11:27 UTC 2022


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

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

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

The following commit(s) were added to refs/heads/maint-3.0 by this push:
     new 667645a9 ReplayCache is not used, removing from ValidateEndpointAuthentication action.
667645a9 is described below

commit 667645a9606d806d4b5a76a499fe8b7c5f4156e0
Author: Henri Mikkonen <henri.mikkonen at iki.fi>
AuthorDate: Mon Jan 3 13:11:19 2022 +0200

    ReplayCache is not used, removing from ValidateEndpointAuthentication action.
---
 .../profile/impl/ValidateEndpointAuthentication.java  | 19 -------------------
 .../oauth2/introspection/introspection-beans.xml      |  2 +-
 .../idp/flows/oauth2/revocation/revocation-beans.xml  |  2 +-
 .../shibboleth/idp/flows/oidc/token/token-beans.xml   |  2 +-
 .../impl/ValidateEndpointAuthenticationTest.java      | 10 ----------
 5 files changed, 3 insertions(+), 32 deletions(-)

diff --git a/idp-oidc-extension-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/profile/impl/ValidateEndpointAuthentication.java b/idp-oidc-extension-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/profile/impl/ValidateEndpointAuthentication.java
index e9227dc6..05517529 100644
--- a/idp-oidc-extension-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/profile/impl/ValidateEndpointAuthentication.java
+++ b/idp-oidc-extension-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/profile/impl/ValidateEndpointAuthentication.java
@@ -29,7 +29,6 @@ import org.opensaml.profile.action.ActionSupport;
 import org.opensaml.profile.action.EventIds;
 import org.opensaml.profile.context.ProfileRequestContext;
 import org.opensaml.profile.context.navigate.InboundMessageContextLookup;
-import org.opensaml.storage.ReplayCache;
 import org.opensaml.xmlsec.context.SecurityParametersContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -73,9 +72,6 @@ public class ValidateEndpointAuthentication extends AbstractOIDCRequestAction<Ab
     @Nullable private Function<ProfileRequestContext, List<ClientAuthenticationMethod>> 
         tokenEndpointAuthMethodsLookupStrategy;
     
-    /** Message replay cache instance to use. */
-    @NonnullAfterInit private ReplayCache replayCache;
-    
     /** The attached OIDC metadata context. */
     @Nullable private OIDCMetadataContext oidcMetadataContext;
     
@@ -124,17 +120,6 @@ public class ValidateEndpointAuthentication extends AbstractOIDCRequestAction<Ab
         
     }
     
-    /**
-     * Set the replay cache instance to use.
-     * 
-     * @param cache
-     *            The replayCache to set.
-     */
-    public void setReplayCache(@Nonnull final ReplayCache cache) {
-        ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
-        replayCache = Constraint.isNotNull(cache, "ReplayCache cannot be null");
-    }
-    
     /**
      * Set the strategy used to locate the {@link SecurityParametersContext} to use.
      * 
@@ -164,10 +149,6 @@ public class ValidateEndpointAuthentication extends AbstractOIDCRequestAction<Ab
     protected void doInitialize() throws ComponentInitializationException {
         super.doInitialize();
         
-        if (replayCache == null) {
-            throw new ComponentInitializationException("ReplayCache cannot be null");
-        }
-        
         if (claimsValidation == null) {
             throw new ComponentInitializationException("ClaimsValidator cannot be null");
         }
diff --git a/idp-oidc-extension-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/oauth2/introspection/introspection-beans.xml b/idp-oidc-extension-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/oauth2/introspection/introspection-beans.xml
index 7085f62d..acfbaf29 100644
--- a/idp-oidc-extension-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/oauth2/introspection/introspection-beans.xml
+++ b/idp-oidc-extension-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/oauth2/introspection/introspection-beans.xml
@@ -27,7 +27,7 @@
 
     <bean id="ValidateEndpointAuthentication"
         class="net.shibboleth.idp.plugin.oidc.op.profile.impl.ValidateEndpointAuthentication" scope="prototype"
-        p:httpServletRequest-ref="shibboleth.HttpServletRequest" p:replayCache-ref="shibboleth.ReplayCache"
+        p:httpServletRequest-ref="shibboleth.HttpServletRequest"
         p:claimsValidation-ref="shibboleth.oidc.JWTClaimsValidation">
         <property name="securityParametersLookupStrategy">
             <bean parent="shibboleth.Functions.Compose"
diff --git a/idp-oidc-extension-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/oauth2/revocation/revocation-beans.xml b/idp-oidc-extension-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/oauth2/revocation/revocation-beans.xml
index 3d93dcf5..739d5dba 100644
--- a/idp-oidc-extension-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/oauth2/revocation/revocation-beans.xml
+++ b/idp-oidc-extension-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/oauth2/revocation/revocation-beans.xml
@@ -28,7 +28,7 @@
 
     <bean id="ValidateEndpointAuthentication"
         class="net.shibboleth.idp.plugin.oidc.op.profile.impl.ValidateEndpointAuthentication" scope="prototype"
-        p:httpServletRequest-ref="shibboleth.HttpServletRequest" p:replayCache-ref="shibboleth.ReplayCache"
+        p:httpServletRequest-ref="shibboleth.HttpServletRequest"
         p:claimsValidation-ref="shibboleth.oidc.JWTClaimsValidation">
         <property name="securityParametersLookupStrategy">
             <bean parent="shibboleth.Functions.Compose"
diff --git a/idp-oidc-extension-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/oidc/token/token-beans.xml b/idp-oidc-extension-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/oidc/token/token-beans.xml
index 9d1b98e9..4df72463 100644
--- a/idp-oidc-extension-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/oidc/token/token-beans.xml
+++ b/idp-oidc-extension-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/oidc/token/token-beans.xml
@@ -26,7 +26,7 @@
 
     <bean id="ValidateEndpointAuthentication"
         class="net.shibboleth.idp.plugin.oidc.op.profile.impl.ValidateEndpointAuthentication" scope="prototype"
-        p:httpServletRequest-ref="shibboleth.HttpServletRequest" p:replayCache-ref="shibboleth.ReplayCache"
+        p:httpServletRequest-ref="shibboleth.HttpServletRequest"
         p:claimsValidation-ref="shibboleth.oidc.JWTClaimsValidation">
         <property name="securityParametersLookupStrategy">
             <bean parent="shibboleth.Functions.Compose"
diff --git a/idp-oidc-extension-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/impl/ValidateEndpointAuthenticationTest.java b/idp-oidc-extension-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/impl/ValidateEndpointAuthenticationTest.java
index bf8cacf4..b9fe15ca 100644
--- a/idp-oidc-extension-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/impl/ValidateEndpointAuthenticationTest.java
+++ b/idp-oidc-extension-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/impl/ValidateEndpointAuthenticationTest.java
@@ -197,7 +197,6 @@ public class ValidateEndpointAuthenticationTest {
         storageService.setId("mockId");
         storageService.initialize();
         replayCache.setStorage(storageService);
-        action.setReplayCache(replayCache);
         if (newFunction != null) {
             action.setTokenEndpointAuthMethodsLookupStrategy(newFunction);
         }
@@ -229,24 +228,15 @@ public class ValidateEndpointAuthenticationTest {
         return claimsValidation;
     }
 
-    @Test(expectedExceptions = ComponentInitializationException.class)
-    public void testNoReplayCache_initFails() throws ComponentInitializationException {
-        ValidateEndpointAuthentication action = new ValidateEndpointAuthentication();
-        action.setClaimsValidation(constructClaimsValidation(new MockHttpServletRequest(), new ReplayCache()));
-        action.initialize();
-    }
-
     @Test(expectedExceptions = ComponentInitializationException.class)
     public void testNoClaimsValidation_initFails() throws ComponentInitializationException {
         ValidateEndpointAuthentication action = new ValidateEndpointAuthentication();
-        action.setReplayCache(new ReplayCache());
         action.initialize();
     }
 
     @Test
     public void testInitSuccess() throws ComponentInitializationException {
         ValidateEndpointAuthentication action = new ValidateEndpointAuthentication();
-        action.setReplayCache(new ReplayCache());
         action.setClaimsValidation(constructClaimsValidation(new MockHttpServletRequest(), new ReplayCache()));
         action.initialize();
     }

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


More information about the commits mailing list