[java-identity-provider] 02/02: IDP-2353 - C14n flow that runs a deployer-defined bean

Scott Cantor cantor.2 at osu.edu
Mon Mar 3 14:58:37 UTC 2025


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=d200fcf128fbe8934c1e54ec170f83d98551214f

commit d200fcf128fbe8934c1e54ec170f83d98551214f
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Mon Mar 3 09:58:32 2025 -0500

    IDP-2353 - C14n flow that runs a deployer-defined bean
    
    https://shibboleth.atlassian.net/browse/IDP-2353
    
    Add wiring and properties for c14n/function.
---
 .../net/shibboleth/idp/conf/subject-c14n-system.xml     | 17 +++++++++++++++++
 .../idp/module/conf/c14n/subject-c14n.properties        | 11 +++++++++--
 2 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/idp-conf-impl/src/main/resources/net/shibboleth/idp/conf/subject-c14n-system.xml b/idp-conf-impl/src/main/resources/net/shibboleth/idp/conf/subject-c14n-system.xml
index c20c77f3f..8123d6df6 100644
--- a/idp-conf-impl/src/main/resources/net/shibboleth/idp/conf/subject-c14n-system.xml
+++ b/idp-conf-impl/src/main/resources/net/shibboleth/idp/conf/subject-c14n-system.xml
@@ -74,6 +74,23 @@
         </property>
     </bean>
 
+    <bean id="c14n/function" parent="shibboleth.PostLoginSubjectCanonicalizationFlow">
+        <property name="implementation">
+            <bean id="FunctionC14N" class="net.shibboleth.idp.authn.impl.FunctionSubjectCanonicalization"
+                p:function="#{getObject('%{idp.c14n.function.Function:DummyC14NFunction}'.trim())}"
+                p:lowercase="%{idp.c14n.function.lowercase:false}"
+                p:uppercase="%{idp.c14n.function.uppercase:false}"
+                p:trim="%{idp.c14n.function.trim:true}"
+                p:transforms="#{getObject('shibboleth.c14n.function.Transforms')}" />
+        </property>
+    </bean>
+    
+    <bean id="DummyC14NFunction" parent="shibboleth.Functions.Constant">
+        <constructor-arg>
+            <null/>
+        </constructor-arg>
+    </bean>
+
     <bean id="c14n/attribute-sourced" parent="shibboleth.PostLoginSubjectCanonicalizationFlow">
         <property name="implementation">
             <bean id="AttributeSourcedC14N" parent="shibboleth.AttributeSourcedC14N" />
diff --git a/idp-conf-impl/src/main/resources/net/shibboleth/idp/module/conf/c14n/subject-c14n.properties b/idp-conf-impl/src/main/resources/net/shibboleth/idp/module/conf/c14n/subject-c14n.properties
index 38114931a..683bd8f1c 100644
--- a/idp-conf-impl/src/main/resources/net/shibboleth/idp/module/conf/c14n/subject-c14n.properties
+++ b/idp-conf-impl/src/main/resources/net/shibboleth/idp/module/conf/c14n/subject-c14n.properties
@@ -1,4 +1,4 @@
-# Properties that control the behavior of post-login subject c14n flows.
+# Properties that control the behavior of subject c14n flows.
 # A few more advanced settings require XML configuration, see flow-specific docs.
 
 
@@ -7,7 +7,6 @@
 #idp.c14n.simple.uppercase = false
 #idp.c14n.simple.trim = true
 
-
 # Attribute resolution -> principal name c14n
 #idp.c14n.attribute.lowercase = false
 #idp.c14n.attribute.uppercase = false
@@ -31,6 +30,14 @@
 # Comma-delimited list of OIDS
 #idp.c14n.x500.objectIDs = 
 
+# Pluggable function -> principal name c14n
+#idp.c14n.function.lowercase = false
+#idp.c14n.function.uppercase = false
+#idp.c14n.function.trim = true
+# Set to chosen Spring bean ID defining Function to run
+#idp.c14n.function.Function = custom.BeanID
+
+
 # Proxied SAML NameID -> principal name c14n
 #idp.c14n.saml.proxy.lowercase = false
 #idp.c14n.saml.proxy.uppercase = false

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


More information about the commits mailing list