[java-identity-provider] branch main updated: IDP-2215 - Add additional objects to MVC-layer error view

Scott Cantor cantor.2 at osu.edu
Mon Dec 18 14:53:42 UTC 2023


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=17513b45f35c1e127202f123bb401f95db6d2c71

The following commit(s) were added to refs/heads/main by this push:
     new 17513b45f IDP-2215 - Add additional objects to MVC-layer error view
17513b45f is described below

commit 17513b45f35c1e127202f123bb401f95db6d2c71
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Mon Dec 18 09:53:14 2023 -0500

    IDP-2215 - Add additional objects to MVC-layer error view
    
    https://shibboleth.atlassian.net/browse/IDP-2215
    
    Wired additional objects into exception resolver.
    Adjusted error.vm comments.
---
 .../resources/net/shibboleth/idp/conf/mvc-beans.xml   |  3 +++
 .../net/shibboleth/idp/module/views/error.vm          | 19 ++++++++++++-------
 2 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/idp-conf-impl/src/main/resources/net/shibboleth/idp/conf/mvc-beans.xml b/idp-conf-impl/src/main/resources/net/shibboleth/idp/conf/mvc-beans.xml
index 35e087f1c..d29e2533a 100644
--- a/idp-conf-impl/src/main/resources/net/shibboleth/idp/conf/mvc-beans.xml
+++ b/idp-conf-impl/src/main/resources/net/shibboleth/idp/conf/mvc-beans.xml
@@ -67,6 +67,9 @@
     
     <bean id="shibboleth.ExceptionResolver" class="net.shibboleth.shared.spring.error.ExtendedMappingExceptionResolver"
         c:_0="#{getObject('shibboleth.ExceptionResolverViewExtenderFunction')}"
+        p:cSPDigester-ref="shibboleth.CSPDigester"
+        p:cSPNonceGenerator-ref="shibboleth.CSPNonce"
+        p:customObject="#{getObject('shibboleth.CustomViewContext')}"
         p:defaultErrorView="%{idp.errors.defaultView:error}"
         p:excludedExceptions="#{getObject('%{idp.errors.excludedExceptions:undefined}')}"
         p:exceptionMappings="#{getObject('%{idp.errors.exceptionMappings:undefined}')}" />
diff --git a/idp-conf-impl/src/main/resources/net/shibboleth/idp/module/views/error.vm b/idp-conf-impl/src/main/resources/net/shibboleth/idp/module/views/error.vm
index efc943148..623449d7d 100644
--- a/idp-conf-impl/src/main/resources/net/shibboleth/idp/module/views/error.vm
+++ b/idp-conf-impl/src/main/resources/net/shibboleth/idp/module/views/error.vm
@@ -2,19 +2,21 @@
 ## Velocity Template for error end-state
 ##
 ## Velocity context will contain the following variables during controlled errors.
-## Some error paths involve runtime exceptions handled outside Spring Web Flow by the
-## MVC layer and will not generally populate most of these variables.
 ##
-## flowRequestContext - the Spring Web Flow RequestContext
-## profileRequestContext - root of context tree
-## encoder - HTMLEncoder class
-## cspDigester - Calculates base64-encoded SHA-2 hashes (call apply)
-## cspNonce - Calculates secure nonces (call generateIdentifier)
 ## request - HttpServletRequest
 ## response - HttpServletResponse
 ## environment - Spring Environment object for property resolution
+## encoder - HTMLEncoder class
+## cspDigester - Calculates base64-encoded SHA-2 hashes (call apply)
+## cspNonce - Calculates secure nonces (call generateIdentifier)
 ## custom - arbitrary object injected by deployer
 ##
+## Some error paths involve runtime exceptions handled outside Spring Web Flow by the
+## MVC layer and will not generally populate these variables:
+##
+## flowRequestContext - the Spring Web Flow RequestContext
+## profileRequestContext - root of context tree
+##
 #set ($title = $springMacroRequestContext.getMessage("idp.title", "Web Login Service"))
 #set ($defaultTitleSuffix = $springMacroRequestContext.getMessage("idp.title.suffix", "Error"))
 ##
@@ -71,6 +73,9 @@ $response.addHeader("Content-Security-Policy", "script-src 'none'")
         <footer class="footer">
             <div class="cc">
                 <p>#springMessageText("idp.footer", "Insert your footer text here.")</p>
+                <p>$cspDigester</p>
+                <p>$cspNonce</p>
+                <p>$custom</p>
             </div>
         </footer>
     </body>

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


More information about the commits mailing list