[java-identity-provider] branch main updated: Simplify filter installation system property controls.
Scott Cantor
cantor.2 at osu.edu
Mon Oct 3 15:00:06 UTC 2022
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch main
in repository java-identity-provider.
View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=c0355d7cf3b8749ff81eef64a4df0f6f1b471bc7
The following commit(s) were added to refs/heads/main by this push:
new c0355d7cf Simplify filter installation system property controls.
c0355d7cf is described below
commit c0355d7cf3b8749ff81eef64a4df0f6f1b471bc7
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Mon Oct 3 11:00:02 2022 -0400
Simplify filter installation system property controls.
---
.../impl/RegisterFilterChainServletContextInitializer.java | 10 ++++------
idp-conf/src/main/resources/conf/idp.properties | 4 ++++
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/idp-conf-impl/src/main/java/net/shibboleth/idp/conf/impl/RegisterFilterChainServletContextInitializer.java b/idp-conf-impl/src/main/java/net/shibboleth/idp/conf/impl/RegisterFilterChainServletContextInitializer.java
index f26b77b29..e749b0bed 100644
--- a/idp-conf-impl/src/main/java/net/shibboleth/idp/conf/impl/RegisterFilterChainServletContextInitializer.java
+++ b/idp-conf-impl/src/main/java/net/shibboleth/idp/conf/impl/RegisterFilterChainServletContextInitializer.java
@@ -45,12 +45,10 @@ import net.shibboleth.shared.primitive.StringSupport;
public class RegisterFilterChainServletContextInitializer implements ServletContainerInitializer {
/** System property name for the activation of this class. */
- @Nonnull @NotEmpty public static final String SYSTEM_PROPERTY_ACTIVATION =
- RegisterFilterChainServletContextInitializer.class.getCanonicalName();
+ @Nonnull @NotEmpty public static final String SYSTEM_PROPERTY_ACTIVATION = "idp.autoRegisterFilterChain";
/** System property name for the activation of this class. */
- @Nonnull @NotEmpty public static final String SYSTEM_PROPERTY_SERVLET =
- RegisterFilterChainServletContextInitializer.class.getCanonicalName() + ".servlet";
+ @Nonnull @NotEmpty public static final String SYSTEM_PROPERTY_SERVLET = SYSTEM_PROPERTY_ACTIVATION + ".servlet";
/** Name of servlet that MUST be registered for us to run. */
@Nonnull @NotEmpty public static final String DEFAULT_SERVLET_TO_CHECK = "idp";
@@ -70,8 +68,8 @@ public class RegisterFilterChainServletContextInitializer implements ServletCont
final String flag = System.getProperty(SYSTEM_PROPERTY_ACTIVATION);
log.debug("The value of the flag {}: {}", SYSTEM_PROPERTY_ACTIVATION, flag);
- if ("disabled".equalsIgnoreCase(flag)) {
- log.info("Filter registration is disabled according to the system properties");
+ if ("false".equalsIgnoreCase(flag)) {
+ log.info("Filter registration is disabled");
return;
} else if (ctx.getServletRegistration(StringSupport.trimOrNull(
System.getProperty(SYSTEM_PROPERTY_SERVLET, DEFAULT_SERVLET_TO_CHECK))) == null) {
diff --git a/idp-conf/src/main/resources/conf/idp.properties b/idp-conf/src/main/resources/conf/idp.properties
index ceaac7563..f1ec2f520 100644
--- a/idp-conf/src/main/resources/conf/idp.properties
+++ b/idp-conf/src/main/resources/conf/idp.properties
@@ -31,6 +31,10 @@ idp.scope = example.org
#idp.cookie.sameSite = None
#idp.cookie.sameSiteCondition = shibboleth.Conditions.FALSE
+# Auto-register standard Java filter chain
+# "false" disables in favor of manual web.xml control, not recommended
+#idp.autoRegisterFilterChain = true
+
# Enable cross-site request forgery mitigation for views.
idp.csrf.enabled = true
# Name of the HTTP parameter that stores the CSRF token.
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list