[java-identity-provider] branch master updated: IDP-1397 - Removal of deprecated features
Scott Cantor
cantor.2 at osu.edu
Thu Aug 29 09:21:07 EDT 2019
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch master
in repository java-identity-provider.
View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=3f2aa2512756131a9c3a16524ffd5cb4d91173b8
The following commit(s) were added to refs/heads/master by this push:
new 3f2aa25 IDP-1397 - Removal of deprecated features
3f2aa25 is described below
commit 3f2aa2512756131a9c3a16524ffd5cb4d91173b8
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Thu Aug 29 09:20:49 2019 -0400
IDP-1397 - Removal of deprecated features
https://issues.shibboleth.net/jira/browse/IDP-1397
Clean up legacy SAML subject c14n.
---
.../src/main/resources/conf/c14n/subject-c14n.xml | 7 ---
.../main/resources/system/conf/global-system.xml | 2 +-
.../resources/system/conf/subject-c14n-system.xml | 8 +---
.../flows/c14n/subject-c14n-saml-default-beans.xml | 4 --
.../saml/nameid/impl/LegacyCanonicalization.java | 56 ++++------------------
5 files changed, 12 insertions(+), 65 deletions(-)
diff --git a/idp-conf/src/main/resources/conf/c14n/subject-c14n.xml b/idp-conf/src/main/resources/conf/c14n/subject-c14n.xml
index 9740fdd..dcc7e3a 100644
--- a/idp-conf/src/main/resources/conf/c14n/subject-c14n.xml
+++ b/idp-conf/src/main/resources/conf/c14n/subject-c14n.xml
@@ -51,13 +51,6 @@
-->
<util:list id="shibboleth.SAMLSubjectCanonicalizationFlows">
- <!--
- This is installed to support the old mechanism of using PrincipalConnectors in the attribute resolver
- to map SAML Subjects back into principals. If you don't use those (or this is a new install) you can
- remove this.
- -->
- <ref bean="c14n/LegacyPrincipalConnector" />
-
<!-- The next four are for handling transient IDs (in-storage and stateless variants). -->
<ref bean="c14n/SAML2Transient" />
<ref bean="c14n/SAML2CryptoTransient" />
diff --git a/idp-conf/src/main/resources/system/conf/global-system.xml b/idp-conf/src/main/resources/system/conf/global-system.xml
index bcfe314..8196ee9 100644
--- a/idp-conf/src/main/resources/system/conf/global-system.xml
+++ b/idp-conf/src/main/resources/system/conf/global-system.xml
@@ -265,7 +265,7 @@
</property>
</bean>
- <bean id="shibboleth.ReplayCache" class="org.opensaml.storage.ReplayCache" depends-on="shibboleth.LoggingService"
+ <bean id="shibboleth.ReplayCache" class="org.opensaml.storage.ReplayCache"
p:storage-ref="#{'%{idp.replayCache.StorageService:shibboleth.StorageService}'.trim()}"
p:strict="%{idp.replayCache.strict:true}" />
diff --git a/idp-conf/src/main/resources/system/conf/subject-c14n-system.xml b/idp-conf/src/main/resources/system/conf/subject-c14n-system.xml
index 020705a..bdb63e4 100644
--- a/idp-conf/src/main/resources/system/conf/subject-c14n-system.xml
+++ b/idp-conf/src/main/resources/system/conf/subject-c14n-system.xml
@@ -29,13 +29,9 @@
</property>
</bean>
+ <!-- Remove in V5. -->
<bean id="c14n/LegacyPrincipalConnector" class="net.shibboleth.idp.saml.nameid.impl.LegacyCanonicalization"
- lazy-init="true" factory-method="c14LegacyPrincipalConnectorFactory">
- <constructor-arg name="activationCondition">
- <bean class="net.shibboleth.idp.saml.nameid.impl.LegacyCanonicalization.ActivationCondition"
- c:service-ref="shibboleth.AttributeResolverService"/>
- </constructor-arg>
- </bean>
+ factory-method="c14LegacyPrincipalConnectorFactory" />
<bean id="shibboleth.AbstractSAML1C14NFlowBean" abstract="true"
class="net.shibboleth.idp.saml.nameid.NameIDCanonicalizationFlowDescriptor">
diff --git a/idp-conf/src/main/resources/system/flows/c14n/subject-c14n-saml-default-beans.xml b/idp-conf/src/main/resources/system/flows/c14n/subject-c14n-saml-default-beans.xml
index 3fcdc04..9767a64 100644
--- a/idp-conf/src/main/resources/system/flows/c14n/subject-c14n-saml-default-beans.xml
+++ b/idp-conf/src/main/resources/system/flows/c14n/subject-c14n-saml-default-beans.xml
@@ -15,10 +15,6 @@
<bean class="net.shibboleth.ext.spring.config.IdentifiableBeanPostProcessor" />
<bean class="net.shibboleth.idp.profile.impl.ProfileActionBeanPostProcessor" />
- <bean id="Shibboleth.C14N.LegacyPrincipalConnector"
- class="net.shibboleth.idp.saml.nameid.impl.LegacyCanonicalization"
- scope="prototype" c:resolverService-ref="shibboleth.AttributeResolverService"/>
-
<bean id="Shibboleth.C14N.SAML2Transient"
class="net.shibboleth.idp.saml.nameid.impl.NameIDCanonicalization" scope="prototype">
<property name="decoder">
diff --git a/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/nameid/impl/LegacyCanonicalization.java b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/nameid/impl/LegacyCanonicalization.java
index df9f69d..65aaf1d 100644
--- a/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/nameid/impl/LegacyCanonicalization.java
+++ b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/nameid/impl/LegacyCanonicalization.java
@@ -17,45 +17,32 @@
package net.shibboleth.idp.saml.nameid.impl;
-import java.util.function.Predicate;
-
import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
import org.opensaml.profile.action.ActionSupport;
import org.opensaml.profile.context.ProfileRequestContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import net.shibboleth.idp.attribute.resolver.AttributeResolver;
+import com.google.common.base.Predicates;
+
import net.shibboleth.idp.authn.AbstractSubjectCanonicalizationAction;
import net.shibboleth.idp.authn.AuthnEventIds;
import net.shibboleth.idp.authn.context.SubjectCanonicalizationContext;
import net.shibboleth.idp.saml.nameid.NameIDCanonicalizationFlowDescriptor;
-import net.shibboleth.utilities.java.support.annotation.ParameterName;
import net.shibboleth.utilities.java.support.primitive.DeprecationSupport;
import net.shibboleth.utilities.java.support.primitive.DeprecationSupport.ObjectType;
-import net.shibboleth.utilities.java.support.service.ReloadableService;
/**
* Action to fail if asked to perform C14N ..
+ *
+ * @deprecated
*/
public class LegacyCanonicalization extends AbstractSubjectCanonicalizationAction {
/** Class logger. */
@Nonnull private final Logger log = LoggerFactory.getLogger(LegacyCanonicalization.class);
- /**
- * Constructor.
- *
- * @param resolverService the service which will implement {@link LegacyPrincipalDecoder}.
- */
- public LegacyCanonicalization(@Nonnull @ParameterName(name="resolverService")
- final ReloadableService<AttributeResolver> resolverService) {
-
- }
-
-//CheckStyle: ReturnCount OFF
/** {@inheritDoc} */
@Override protected boolean doPreExecute(@Nonnull final ProfileRequestContext profileRequestContext,
@Nonnull final SubjectCanonicalizationContext c14nContext) {
@@ -65,42 +52,17 @@ public class LegacyCanonicalization extends AbstractSubjectCanonicalizationActio
return false;
}
-//CheckStyle: ReturnCount ON
- /** Factory used to generate a specific Connector.
- * @param activationCondition - the activationCondition
+ /** Factory used to generate a disabled flow descriptor for backward compatibility.
+ *
* @return an appropriate FlowDescriptor
*/
- public static NameIDCanonicalizationFlowDescriptor c14LegacyPrincipalConnectorFactory(
- final @ParameterName(name="activationCondition") Predicate<ProfileRequestContext> activationCondition) {
+ public static NameIDCanonicalizationFlowDescriptor c14LegacyPrincipalConnectorFactory() {
+ // V4 deprecation, remove this class in V5.
DeprecationSupport.warn(ObjectType.BEAN, "c14n/LegacyPrincipalConnector", "c14n/subject-c14n.xml", "<remove>");
final NameIDCanonicalizationFlowDescriptor result = new NameIDCanonicalizationFlowDescriptor();
- result.setActivationCondition(activationCondition);
+ result.setActivationCondition(Predicates.alwaysFalse());
return result;
}
-
- /**
- * A predicate that determines if this action can run or not. This can never run.
- */
- public static class ActivationCondition implements Predicate<ProfileRequestContext> {
-
- /**
- * Constructor.
- *
- * @param service the service we need to interrogate.
- */
- public ActivationCondition(final @ParameterName(name="service") ReloadableService<AttributeResolver> service) {
-
- }
-
- /**
- * {@inheritDoc}
- *
- * <p>Never run this</p>
- */
- public boolean test(@Nullable final ProfileRequestContext input) {
- return false;
- }
- }
}
\ No newline at end of file
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list