[java-identity-provider] branch main updated: Revert "IDP-1597 Change of language incomplete when switching locale"

Rod Widdowson rdw at steadingsoftware.com
Tue Sep 29 12:49:43 UTC 2020


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

rdw 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=8ca7519856dbae3538d0f5998b485517a3604a20

The following commit(s) were added to refs/heads/main by this push:
       new  8ca751985 Revert "IDP-1597 Change of language incomplete when switching locale"
8ca751985 is described below

commit 8ca7519856dbae3538d0f5998b485517a3604a20
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Tue Sep 29 13:49:36 2020 +0100

    Revert "IDP-1597 Change of language incomplete when switching locale"
    
    This reverts commit 8291fc056dedd5cddfca49e638337b8f9cb1dba8.
---
 .../InitializeAdministrativeProfileContextTree.java |  4 ++--
 .../resources/net/shibboleth/idp/conf/mvc-beans.xml | 10 ----------
 .../src/main/resources/conf/attribute-filter.xml    | 14 ++++++++++++--
 .../src/main/resources/conf/attribute-resolver.xml  | 19 ++++++++++++++-----
 idp-conf/src/main/resources/conf/global.xml         |  1 +
 idp-conf/src/main/resources/conf/idp.properties     |  4 ++--
 idp-conf/src/main/resources/conf/logback.xml        |  4 ++--
 idp-conf/src/main/resources/conf/relying-party.xml  |  2 +-
 idp-conf/src/test/resources/conf/relying-party.xml  | 21 +++++++++++----------
 .../impl/AbstractAttributeDisplayFunction.java      |  4 ++--
 .../shibboleth/idp/ui/impl/SetRPUIInformation.java  |  4 ++--
 11 files changed, 49 insertions(+), 38 deletions(-)

diff --git a/idp-admin-impl/src/main/java/net/shibboleth/idp/admin/impl/InitializeAdministrativeProfileContextTree.java b/idp-admin-impl/src/main/java/net/shibboleth/idp/admin/impl/InitializeAdministrativeProfileContextTree.java
index 720a58e40..c6043740f 100644
--- a/idp-admin-impl/src/main/java/net/shibboleth/idp/admin/impl/InitializeAdministrativeProfileContextTree.java
+++ b/idp-admin-impl/src/main/java/net/shibboleth/idp/admin/impl/InitializeAdministrativeProfileContextTree.java
@@ -27,7 +27,6 @@ import org.opensaml.profile.context.ProfileRequestContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import net.shibboleth.ext.spring.util.SpringSupport;
 import net.shibboleth.idp.admin.AdministrativeFlowDescriptor;
 import net.shibboleth.idp.profile.AbstractProfileAction;
 import net.shibboleth.idp.profile.IdPEventIds;
@@ -35,6 +34,7 @@ import net.shibboleth.idp.profile.context.RelyingPartyContext;
 import net.shibboleth.idp.ui.context.RelyingPartyUIContext;
 import net.shibboleth.utilities.java.support.annotation.constraint.NonnullElements;
 import net.shibboleth.utilities.java.support.component.ComponentSupport;
+import net.shibboleth.utilities.java.support.net.HttpServletSupport;
 
 /**
  * An action that processes settings from a supplied {@link AdministrativeFlowDescriptor} to prepare
@@ -121,7 +121,7 @@ public class InitializeAdministrativeProfileContextTree extends AbstractProfileA
         
         final RelyingPartyUIContext uiCtx = rpCtx.getSubcontext(RelyingPartyUIContext.class, true);
         uiCtx.setRPUInfo(flowDescriptor.getUIInfo());
-        uiCtx.setBrowserLanguageRanges(SpringSupport.getLanguageRange(getHttpServletRequest()));
+        uiCtx.setBrowserLanguageRanges(HttpServletSupport.getLanguageRange(getHttpServletRequest()));
         
         if (null != fallbackLanguages) {
             uiCtx.setFallbackLanguages(fallbackLanguages);
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 79466d712..9b5e68e6d 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
@@ -23,16 +23,6 @@
             </list>
         </property>
     </bean>
-        <mvc:interceptors xmlns:mvc="http://www.springframework.org/schema/mvc">
-  <bean id="localeChangeInterceptor" class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor">
-    <property name="paramName" value="lang"/>
-  </bean>
-</mvc:interceptors>
-<bean id="localeResolver" class="org.springframework.web.servlet.i18n.SessionLocaleResolver">
-  <property name="defaultLocale" value="en"/>
-</bean>
-
-    
     
     <bean class="org.springframework.webflow.mvc.servlet.FlowHandlerMapping" p:order="0"
             p:flowRegistry-ref="flowRegistry">
diff --git a/idp-conf/src/main/resources/conf/attribute-filter.xml b/idp-conf/src/main/resources/conf/attribute-filter.xml
index 36ede7340..7787d0c53 100644
--- a/idp-conf/src/main/resources/conf/attribute-filter.xml
+++ b/idp-conf/src/main/resources/conf/attribute-filter.xml
@@ -21,9 +21,19 @@
 	<AttributeFilterPolicy id="Per-Attribute-singleValued">
 	    <PolicyRequirementRule xsi:type="ANY" />
 	 
-	    <AttributeRule attributeID="eduPersonPrincipalName" permitAny="true"/> 
+	    <AttributeRule attributeID="eduPersonPrincipalName">
+	        <PermitValueRule xsi:type="EntityAttributeExactMatch"
+	            attributeName="http://shibboleth.net/ns/attributes/releaseAllValues"
+	            attributeNameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"
+	            attributeValue="eduPersonPrincipalName" />
+	    </AttributeRule>
 	 
-	    <AttributeRule attributeID="mail" permitAny="true"/> 
+	    <AttributeRule attributeID="mail">
+	        <PermitValueRule xsi:type="EntityAttributeExactMatch"
+	            attributeName="http://shibboleth.net/ns/attributes/releaseAllValues"
+	            attributeNameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"
+	            attributeValue="mail" />
+	    </AttributeRule>
 	</AttributeFilterPolicy>
 
     <!--
diff --git a/idp-conf/src/main/resources/conf/attribute-resolver.xml b/idp-conf/src/main/resources/conf/attribute-resolver.xml
index 95ceff72e..0ee236be2 100644
--- a/idp-conf/src/main/resources/conf/attribute-resolver.xml
+++ b/idp-conf/src/main/resources/conf/attribute-resolver.xml
@@ -1,9 +1,18 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- This file is an EXAMPLE configuration file. While the configuration presented in this example file is semi-functional, 
-    it isn't very interesting. It is here only as a starting point for your deployment process. Very few attribute definitions 
-    and data connectors are demonstrated, and the data is derived statically from the logged-in username and a static example 
-    connector. Attribute-resolver-full.xml contains more examples of attributes, encoders, and data connectors. Deployers should 
-    refer to the Shibboleth documentation for a complete list of components and their options. -->
+<!-- 
+    This file is an EXAMPLE configuration file. While the configuration
+    presented in this example file is semi-functional, it isn't very
+    interesting. It is here only as a starting point for your deployment
+    process.
+    
+    Very few attribute definitions and data connectors are demonstrated,
+    and the data is derived statically from the logged-in username and a
+    static example connector.
+
+    Attribute-resolver-full.xml contains more examples of attributes,
+    encoders, and data connectors. Deployers should refer to the Shibboleth
+    documentation for a complete list of components and their options.
+-->
 <AttributeResolver
         xmlns="urn:mace:shibboleth:2.0:resolver" 
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
diff --git a/idp-conf/src/main/resources/conf/global.xml b/idp-conf/src/main/resources/conf/global.xml
index 688f86f78..c485f3f65 100644
--- a/idp-conf/src/main/resources/conf/global.xml
+++ b/idp-conf/src/main/resources/conf/global.xml
@@ -33,6 +33,7 @@
     <util:set id="shibboleth.ExcludedEncryptionAlgorithms">
     </util:set>
     -->
+
     <!--
     If you need to define and inject custom Java object(s) into the various views used throughout the
     system (errors, login, logout, etc.), you can uncomment and define the bean below to be of any
diff --git a/idp-conf/src/main/resources/conf/idp.properties b/idp-conf/src/main/resources/conf/idp.properties
index 935700a24..c42c09d68 100644
--- a/idp-conf/src/main/resources/conf/idp.properties
+++ b/idp-conf/src/main/resources/conf/idp.properties
@@ -128,7 +128,7 @@ idp.session.secondaryServiceIndex = true
 #idp.session.defaultSPlifetime = PT2H
 
 # Set to "shibboleth.StorageService" or custom bean for alternate storage of consent
-idp.consent.StorageService = shibboleth.ClientPersistentStorageService
+#idp.consent.StorageService = shibboleth.ClientPersistentStorageService
 
 # Default consent auditing formats
 #idp.consent.terms-of-use.auditFormat = %T|%SP|%e|%u|%CCI|%CCV|%CCA
@@ -146,7 +146,7 @@ idp.consent.StorageService = shibboleth.ClientPersistentStorageService
 #idp.consent.terms-of-use.consentValueMessageCodeSuffix = .text
 
 # Flags controlling how built-in attribute consent feature operates 
-idp.consent.allowDoNotRemember = true
+#idp.consent.allowDoNotRemember = true
 #idp.consent.allowGlobal = true
 #idp.consent.allowPerAttribute = false
 
diff --git a/idp-conf/src/main/resources/conf/logback.xml b/idp-conf/src/main/resources/conf/logback.xml
index 79b29c7a8..730f583bc 100644
--- a/idp-conf/src/main/resources/conf/logback.xml
+++ b/idp-conf/src/main/resources/conf/logback.xml
@@ -14,14 +14,14 @@
 
     <!-- Location and retention. -->
     
-    <variable name="idp.logfiles" value="C:/Users/rdw/Desktop/logs" />
+    <variable name="idp.logfiles" value="${idp.logfiles:-${idp.home}/logs}" />
     <variable name="idp.loghistory" value="${idp.loghistory:-180}" />
     
     <!-- Much higher performance if you operate on DEBUG. -->
     <!-- <variable name="idp.process.appender" value="ASYNC_PROCESS" /> -->
     
     <!-- Logging level shortcuts. -->
-    <variable name="idp.loglevel.idp" value="${idp.loglevel.idp:-DEBUG}" />
+    <variable name="idp.loglevel.idp" value="${idp.loglevel.idp:-INFO}" />
     <variable name="idp.loglevel.ldap" value="${idp.loglevel.ldap:-WARN}" />
     <variable name="idp.loglevel.messages" value="${idp.loglevel.messages:-INFO}" />
     <variable name="idp.loglevel.encryption" value="${idp.loglevel.encryption:-INFO}" />
diff --git a/idp-conf/src/main/resources/conf/relying-party.xml b/idp-conf/src/main/resources/conf/relying-party.xml
index f81b0996a..9072d3310 100644
--- a/idp-conf/src/main/resources/conf/relying-party.xml
+++ b/idp-conf/src/main/resources/conf/relying-party.xml
@@ -40,7 +40,7 @@
                 <ref bean="SAML1.AttributeQuery" />
                 <ref bean="SAML1.ArtifactResolution" />
                 -->
-                <bean parent="SAML2.SSO" p:postAuthenticationFlows="attribute-release" p:encryptAssertions="false" p:encryptAttributes="false"/>
+                <bean parent="SAML2.SSO" p:postAuthenticationFlows="attribute-release" />
                 <ref bean="SAML2.ECP" />
                 <ref bean="SAML2.Logout" />
                 <!--
diff --git a/idp-conf/src/test/resources/conf/relying-party.xml b/idp-conf/src/test/resources/conf/relying-party.xml
index e4038eee7..f46789624 100644
--- a/idp-conf/src/test/resources/conf/relying-party.xml
+++ b/idp-conf/src/test/resources/conf/relying-party.xml
@@ -30,18 +30,19 @@
 
     <!-- Default configuration, with default settings applied for all profiles. -->
 
-    <bean id="shibboleth.DefaultRelyingParty" parent="RelyingParty">
+    <bean id="shibboleth.DefaultRelyingParty" parent="RelyingParty.MDDriven">
         <property name="profileConfigurations">
             <list>
-                <bean parent="Shibboleth.SSO" p:postAuthenticationFlows="attribute-release" />
-                <ref bean="SAML1.AttributeQuery" />
-                <ref bean="SAML1.ArtifactResolution" />
-                <bean parent="SAML2.SSO" p:postAuthenticationFlows="attribute-release" p:encryptAssertions="false" p:encryptAttributes="false"/>
-                <ref bean="SAML2.ECP" />
-                <ref bean="SAML2.Logout" />
-                <ref bean="SAML2.AttributeQuery" />
-                <ref bean="SAML2.ArtifactResolution" />
-                <ref bean="Liberty.SSOS" />
+                <ref bean="CAS.LoginConfiguration.MDDriven" />
+                <ref bean="CAS.ValidateConfiguration.MDDriven" />
+                <ref bean="Shibboleth.SSO.MDDriven" />
+                <ref bean="SAML1.AttributeQuery.MDDriven" />
+                <ref bean="SAML1.ArtifactResolution.MDDriven" />
+                <ref bean="SAML2.SSO.MDDriven" />
+                <ref bean="SAML2.ECP.MDDriven" />
+                <ref bean="SAML2.Logout.MDDriven" />
+                <ref bean="SAML2.AttributeQuery.MDDriven" />
+                <ref bean="SAML2.ArtifactResolution.MDDriven" />
             </list>
         </property>
     </bean>
diff --git a/idp-consent-impl/src/main/java/net/shibboleth/idp/consent/logic/impl/AbstractAttributeDisplayFunction.java b/idp-consent-impl/src/main/java/net/shibboleth/idp/consent/logic/impl/AbstractAttributeDisplayFunction.java
index c3714626f..d6798e908 100644
--- a/idp-consent-impl/src/main/java/net/shibboleth/idp/consent/logic/impl/AbstractAttributeDisplayFunction.java
+++ b/idp-consent-impl/src/main/java/net/shibboleth/idp/consent/logic/impl/AbstractAttributeDisplayFunction.java
@@ -29,9 +29,9 @@ import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
 import javax.servlet.http.HttpServletRequest;
 
-import net.shibboleth.ext.spring.util.SpringSupport;
 import net.shibboleth.idp.attribute.IdPAttribute;
 import net.shibboleth.utilities.java.support.annotation.constraint.Unmodifiable;
+import net.shibboleth.utilities.java.support.net.HttpServletSupport;
 import net.shibboleth.utilities.java.support.primitive.StringSupport;
 
 /**
@@ -57,7 +57,7 @@ public abstract class AbstractAttributeDisplayFunction implements Function<IdPAt
     public AbstractAttributeDisplayFunction(@Nonnull final HttpServletRequest request,
             @Nullable final List<String> defaultLanguages) {
 
-        languageRange = SpringSupport.getLanguageRange(request);
+        languageRange = HttpServletSupport.getLanguageRange(request);
         if (defaultLanguages == null || defaultLanguages.isEmpty()) {
             defaultLanguageRange = Collections.emptyList();
         } else {
diff --git a/idp-ui/src/main/java/net/shibboleth/idp/ui/impl/SetRPUIInformation.java b/idp-ui/src/main/java/net/shibboleth/idp/ui/impl/SetRPUIInformation.java
index 10675aa2b..61763549b 100644
--- a/idp-ui/src/main/java/net/shibboleth/idp/ui/impl/SetRPUIInformation.java
+++ b/idp-ui/src/main/java/net/shibboleth/idp/ui/impl/SetRPUIInformation.java
@@ -39,7 +39,6 @@ import org.opensaml.saml.saml2.metadata.SPSSODescriptor;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import net.shibboleth.ext.spring.util.SpringSupport;
 import net.shibboleth.idp.authn.context.AuthenticationContext;
 import net.shibboleth.idp.profile.AbstractProfileAction;
 import net.shibboleth.idp.saml.profile.context.navigate.SAMLMetadataContextLookupFunction;
@@ -47,6 +46,7 @@ import net.shibboleth.idp.ui.context.RelyingPartyUIContext;
 import net.shibboleth.utilities.java.support.annotation.constraint.NonnullElements;
 import net.shibboleth.utilities.java.support.component.ComponentSupport;
 import net.shibboleth.utilities.java.support.logic.Constraint;
+import net.shibboleth.utilities.java.support.net.HttpServletSupport;
 import net.shibboleth.utilities.java.support.primitive.StringSupport;
 
 /**
@@ -213,7 +213,7 @@ public class SetRPUIInformation extends AbstractProfileAction {
         rpUIContext.setRPSPSSODescriptor(spSSODescriptor);
         rpUIContext.setRPAttributeConsumingService(acsDesriptor);
         rpUIContext.setRPUInfo(getRPUInfo());
-        rpUIContext.setBrowserLanguageRanges(SpringSupport.getLanguageRange(getHttpServletRequest()));
+        rpUIContext.setBrowserLanguageRanges(HttpServletSupport.getLanguageRange(getHttpServletRequest()));
     }
 
 }
\ 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