[java-shib-metadata] 01/01: JSATTR-49 Spring parsers contain hardcoded Velocity engine bean ID

Codeberg noreply at shibboleth.net
Wed Jul 1 14:39:39 UTC 2026


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

codeberg pushed a commit to branch dev/JSATTR-49
in repository java-shib-metadata.

View the commit online:
https://codeberg.org/Shibboleth/java-shib-metadata/commit/e56dc8b17639ab99854efffbea69f1aeef2c37f2

commit e56dc8b17639ab99854efffbea69f1aeef2c37f2
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Wed Jul 1 15:38:43 2026 +0100

    JSATTR-49 Spring parsers contain hardcoded Velocity engine bean ID
    
    https://shibboleth.atlassian.net/browse/JSATTR-49
    
    Update DynamicHTTPMetadataProviderParser to indirect the
    velocity engine name.
---
 .../spring/metadata/DynamicHTTPMetadataProviderParser.java    | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/shib-metadata-spring/src/main/java/net/shibboleth/spring/metadata/DynamicHTTPMetadataProviderParser.java b/shib-metadata-spring/src/main/java/net/shibboleth/spring/metadata/DynamicHTTPMetadataProviderParser.java
index 0846c120..65dc9e9b 100644
--- a/shib-metadata-spring/src/main/java/net/shibboleth/spring/metadata/DynamicHTTPMetadataProviderParser.java
+++ b/shib-metadata-spring/src/main/java/net/shibboleth/spring/metadata/DynamicHTTPMetadataProviderParser.java
@@ -28,7 +28,6 @@ import org.springframework.beans.factory.support.BeanDefinitionBuilder;
 import org.springframework.beans.factory.xml.ParserContext;
 import org.w3c.dom.Element;
 
-import net.shibboleth.shared.annotation.constraint.NotEmpty;
 import net.shibboleth.shared.primitive.StringSupport;
 import net.shibboleth.shared.xml.ElementSupport;
 
@@ -53,8 +52,12 @@ public class DynamicHTTPMetadataProviderParser extends AbstractDynamicHTTPMetada
     @Nonnull private static final QName METADATA_QUERY_PROTOCOL =
             new QName(AbstractMetadataProviderParser.METADATA_NAMESPACE, "MetadataQueryProtocol");
 
-    /** Name of default VelocityEngine bean to use. */
-    @Nonnull @NotEmpty  private static final String DEFAULT_VELOCITY_ENGINE_REF = "shibboleth.VelocityEngine";
+    /**
+     * Index into parser.properties for the velocityEngine.
+     * Duplicated in net.shibboleth.idp.attribute.resolver.spring.BaseResolverPluginParser
+     */
+    @Nonnull private final static String VELOCIY_ENGINE_BEAN_IDENTIFIER =
+            "net.shibboleth.idp.attribute.resolver.spring.velocityEngine.bean";
 
     /** {@inheritDoc} */
     @Override
@@ -92,7 +95,7 @@ public class DynamicHTTPMetadataProviderParser extends AbstractDynamicHTTPMetada
             String velocityEngineRef =
                     StringSupport.trimOrNull(StringSupport.trimOrNull(template.getAttributeNS(null, "velocityEngine")));
             if (null == velocityEngineRef) {
-                velocityEngineRef = DEFAULT_VELOCITY_ENGINE_REF;
+                velocityEngineRef = getCustomProperty(VELOCIY_ENGINE_BEAN_IDENTIFIER, null);
             }
             final String transformRef =
                     StringSupport.trimOrNull(StringSupport.trimOrNull(template.getAttributeNS(null, "transformRef")));

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


More information about the commits mailing list