Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.2-EE-GA_P01
    • Fix Version/s: 1.8.2-EE-GA_P02
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      ICEFaces + Spring framework 3.0 + Spring Security 3.0

      Description

      A client provided patch here http://jira.icefaces.org/browse/ICE-5245 correctly tested for the repackaged Authentication class to detect Spring Security 3, but we need to create an additional wrapper (of the style provided by com.icesoft.faces.env.SpringAuthWrapper) to use the correct class. The API has changed slightly so the wrapper must change.

        Activity

        Greg Dick created issue -
        Greg Dick made changes -
        Field Original Value New Value
        Assignee Greg Dick [ greg.dick ]
        Greg Dick made changes -
        Salesforce Case []
        Fix Version/s 1.8.2-EE-GA_P02 [ 10226 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #21799 Thu Jun 24 21:58:09 MDT 2010 greg.dick ICE-5845 Added support for Spring Security 3
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/context/BridgeExternalContext.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #21800 Thu Jun 24 21:59:48 MDT 2010 greg.dick ICE-5845 Added new wrapper for Spring Security v3 support
        Files Changed
        Commit graph ADD /icefaces/trunk/icefaces/core/src/com/icesoft/faces/env/SpringAuthWrapperV3.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #21801 Fri Jun 25 08:08:35 MDT 2010 greg.dick ICE-5845 Adding spring jars for build
        Files Changed
        Commit graph ADD /icefaces/trunk/icefaces/lib/spring-security-core-3.0.2.RELEASE.jar
        Commit graph ADD /icefaces/trunk/icefaces/lib/spring-security-web-3.0.2.RELEASE.jar
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #21808 Fri Jun 25 13:49:04 MDT 2010 greg.dick ICE-5845 Instantiate security wrappers newest to oldest
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/context/BridgeExternalContext.java
        Deryk Sinotte made changes -
        Salesforce Case []
        Assignee Priority P1
        Hide
        Greg Dick added a comment -

        We took the user patch that contained introspective extensions to the BridgeExternalContext for Spring 3 and corrected the way the Authorization class was instantiated in the same class. Now that the Spring security demonstration application is working, we can verify that the support for spring 3 is working. http://jira.icefaces.org/browse/ICE-5864

        Show
        Greg Dick added a comment - We took the user patch that contained introspective extensions to the BridgeExternalContext for Spring 3 and corrected the way the Authorization class was instantiated in the same class. Now that the Spring security demonstration application is working, we can verify that the support for spring 3 is working. http://jira.icefaces.org/browse/ICE-5864
        Greg Dick made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Krashan Brahmanjara added a comment - - edited

        Is this correct way of integration spring security 3.0.4 with ice?
        Now lib directory contains mix of security libraries (old 2.0.* and new 3.0.*) implementations
        Version 3.0.* was redesigned and some class was moved to another packages.

        Only SpringAuthWrapperV3.java was wriiten for security 3.0.4.
        Another sources still contain deprecated references. Just try remove spring-security-core-2.0.* from lib directory.

        [javac] Compiling 382 source files to D:\ice\src20101112\core\target\classes
        [javac] D:\ice\src20101112\core\src\com\icesoft\faces\env\SpringAuthWrapper.java:37: package org.springframework.security does not exist
        [javac] import org.springframework.security.Authentication;
        [javac] ^
        [javac] D:\ice\src20101112\core\src\com\icesoft\faces\env\SpringAuthWrapper.java:38: package org.springframework.security does not exist
        [javac] import org.springframework.security.GrantedAuthority;
        [javac] ^
        [javac] D:\ice\src20101112\core\src\com\icesoft\faces\env\SpringAuthWrapper.java:39: package org.springframework.security.context does not exi
        st
        [javac] import org.springframework.security.context.HttpSessionContextIntegrationFilter;
        [javac] ^
        [javac] D:\ice\src20101112\core\src\com\icesoft\faces\env\SpringAuthWrapper.java:40: package org.springframework.security.context does not exi
        st
        [javac] import org.springframework.security.context.SecurityContext;
        [javac] ^
        [javac] D:\ice\src20101112\core\src\com\icesoft\faces\env\SpringAuthWrapper.java:47: cannot find symbol
        [javac] symbol : class Authentication
        [javac] location: class com.icesoft.faces.env.SpringAuthWrapper
        [javac] private final Authentication authentication;
        [javac] ^
        [javac] D:\ice\src20101112\core\src\com\icesoft\faces\env\SpringAuthWrapperV3.java:39: package org.springframework.security.web.context does n
        ot exist
        [javac] import org.springframework.security.web.context.HttpSessionContextIntegrationFilter;
        [javac] ^
        [javac] D:\ice\src20101112\core\src\com\icesoft\faces\async\render\GroupAsyncRenderer.java:169: warning: non-varargs call of varargs method wi
        th inexact argument type for last parameter;
        [javac] cast to java.lang.Class<?> for a varargs call
        [javac] cast to java.lang.Class<?>[] for a non-varargs call and to suppress this warning
        [javac] Method getIdMethod = session.getClass().getMethod("getId", null );
        [javac] ^
        [javac] D:\ice\src20101112\core\src\com\icesoft\faces\async\render\GroupAsyncRenderer.java:170: warning: non-varargs call of varargs method wi
        th inexact argument type for last parameter;
        [javac] cast to java.lang.Object for a varargs call
        [javac] cast to java.lang.Object[] for a non-varargs call and to suppress this warning
        [javac] Object id = getIdMethod.invoke(session,null);
        [javac] ^
        [javac] D:\ice\src20101112\core\src\com\icesoft\faces\env\SpringAuthWrapper.java:50: cannot find symbol
        [javac] symbol : class Authentication
        [javac] location: class com.icesoft.faces.env.SpringAuthWrapper
        [javac] this.authentication = (Authentication) principal;
        [javac] ^
        [javac] D:\ice\src20101112\core\src\com\icesoft\faces\env\SpringAuthWrapper.java:59: cannot find symbol
        [javac] symbol : class GrantedAuthority
        [javac] location: class com.icesoft.faces.env.SpringAuthWrapper
        [javac] GrantedAuthority[] authorities = authentication.getAuthorities();
        [javac] ^
        [javac] D:\ice\src20101112\core\src\com\icesoft\faces\env\SpringAuthWrapper.java:74: cannot find symbol
        [javac] symbol : class Authentication
        [javac] location: class com.icesoft.faces.env.SpringAuthWrapper
        [javac] if (principal instanceof Authentication) {
        [javac] ^
        [javac] D:\ice\src20101112\core\src\com\icesoft\faces\env\SpringAuthWrapper.java:77: cannot find symbol
        [javac] symbol : class SecurityContext
        [javac] location: class com.icesoft.faces.env.SpringAuthWrapper
        [javac] SecurityContext sc = (SecurityContext) sessionMap.get(HttpSessionContextIntegrationFilter.SPRING_SECURITY_CONTEXT_KEY);
        [javac] ^
        [javac] D:\ice\src20101112\core\src\com\icesoft\faces\env\SpringAuthWrapper.java:77: cannot find symbol
        [javac] symbol : class SecurityContext
        [javac] location: class com.icesoft.faces.env.SpringAuthWrapper
        [javac] SecurityContext sc = (SecurityContext) sessionMap.get(HttpSessionContextIntegrationFilter.SPRING_SECURITY_CONTEXT_KEY);
        [javac] ^
        [javac] D:\ice\src20101112\core\src\com\icesoft\faces\env\SpringAuthWrapper.java:77: cannot find symbol
        [javac] symbol : variable HttpSessionContextIntegrationFilter
        [javac] location: class com.icesoft.faces.env.SpringAuthWrapper
        [javac] SecurityContext sc = (SecurityContext) sessionMap.get(HttpSessionContextIntegrationFilter.SPRING_SECURITY_CONTEXT_KEY);
        [javac] ^
        [javac] D:\ice\src20101112\core\src\com\icesoft\faces\env\SpringAuthWrapperV3.java:83: cannot find symbol
        [javac] symbol : variable HttpSessionContextIntegrationFilter
        [javac] location: class com.icesoft.faces.env.SpringAuthWrapperV3
        [javac] HttpSessionContextIntegrationFilter.SPRING_SECURITY_CONTEXT_KEY);
        [javac] ^
        [javac] Note: Some input files use or override a deprecated API.
        [javac] Note: Recompile with -Xlint:deprecation for details.
        [javac] Note: Some input files use unchecked or unsafe operations.
        [javac] Note: Recompile with -Xlint:unchecked for details.
        [javac] 13 errors
        [javac] 4 warnings

        Show
        Krashan Brahmanjara added a comment - - edited Is this correct way of integration spring security 3.0.4 with ice? Now lib directory contains mix of security libraries (old 2.0.* and new 3.0.*) implementations Version 3.0.* was redesigned and some class was moved to another packages. Only SpringAuthWrapperV3.java was wriiten for security 3.0.4. Another sources still contain deprecated references. Just try remove spring-security-core-2.0.* from lib directory. [javac] Compiling 382 source files to D:\ice\src20101112\core\target\classes [javac] D:\ice\src20101112\core\src\com\icesoft\faces\env\SpringAuthWrapper.java:37: package org.springframework.security does not exist [javac] import org.springframework.security.Authentication; [javac] ^ [javac] D:\ice\src20101112\core\src\com\icesoft\faces\env\SpringAuthWrapper.java:38: package org.springframework.security does not exist [javac] import org.springframework.security.GrantedAuthority; [javac] ^ [javac] D:\ice\src20101112\core\src\com\icesoft\faces\env\SpringAuthWrapper.java:39: package org.springframework.security.context does not exi st [javac] import org.springframework.security.context.HttpSessionContextIntegrationFilter; [javac] ^ [javac] D:\ice\src20101112\core\src\com\icesoft\faces\env\SpringAuthWrapper.java:40: package org.springframework.security.context does not exi st [javac] import org.springframework.security.context.SecurityContext; [javac] ^ [javac] D:\ice\src20101112\core\src\com\icesoft\faces\env\SpringAuthWrapper.java:47: cannot find symbol [javac] symbol : class Authentication [javac] location: class com.icesoft.faces.env.SpringAuthWrapper [javac] private final Authentication authentication; [javac] ^ [javac] D:\ice\src20101112\core\src\com\icesoft\faces\env\SpringAuthWrapperV3.java:39: package org.springframework.security.web.context does n ot exist [javac] import org.springframework.security.web.context.HttpSessionContextIntegrationFilter; [javac] ^ [javac] D:\ice\src20101112\core\src\com\icesoft\faces\async\render\GroupAsyncRenderer.java:169: warning: non-varargs call of varargs method wi th inexact argument type for last parameter; [javac] cast to java.lang.Class<?> for a varargs call [javac] cast to java.lang.Class<?>[] for a non-varargs call and to suppress this warning [javac] Method getIdMethod = session.getClass().getMethod("getId", null ); [javac] ^ [javac] D:\ice\src20101112\core\src\com\icesoft\faces\async\render\GroupAsyncRenderer.java:170: warning: non-varargs call of varargs method wi th inexact argument type for last parameter; [javac] cast to java.lang.Object for a varargs call [javac] cast to java.lang.Object[] for a non-varargs call and to suppress this warning [javac] Object id = getIdMethod.invoke(session,null); [javac] ^ [javac] D:\ice\src20101112\core\src\com\icesoft\faces\env\SpringAuthWrapper.java:50: cannot find symbol [javac] symbol : class Authentication [javac] location: class com.icesoft.faces.env.SpringAuthWrapper [javac] this.authentication = (Authentication) principal; [javac] ^ [javac] D:\ice\src20101112\core\src\com\icesoft\faces\env\SpringAuthWrapper.java:59: cannot find symbol [javac] symbol : class GrantedAuthority [javac] location: class com.icesoft.faces.env.SpringAuthWrapper [javac] GrantedAuthority[] authorities = authentication.getAuthorities(); [javac] ^ [javac] D:\ice\src20101112\core\src\com\icesoft\faces\env\SpringAuthWrapper.java:74: cannot find symbol [javac] symbol : class Authentication [javac] location: class com.icesoft.faces.env.SpringAuthWrapper [javac] if (principal instanceof Authentication) { [javac] ^ [javac] D:\ice\src20101112\core\src\com\icesoft\faces\env\SpringAuthWrapper.java:77: cannot find symbol [javac] symbol : class SecurityContext [javac] location: class com.icesoft.faces.env.SpringAuthWrapper [javac] SecurityContext sc = (SecurityContext) sessionMap.get(HttpSessionContextIntegrationFilter.SPRING_SECURITY_CONTEXT_KEY); [javac] ^ [javac] D:\ice\src20101112\core\src\com\icesoft\faces\env\SpringAuthWrapper.java:77: cannot find symbol [javac] symbol : class SecurityContext [javac] location: class com.icesoft.faces.env.SpringAuthWrapper [javac] SecurityContext sc = (SecurityContext) sessionMap.get(HttpSessionContextIntegrationFilter.SPRING_SECURITY_CONTEXT_KEY); [javac] ^ [javac] D:\ice\src20101112\core\src\com\icesoft\faces\env\SpringAuthWrapper.java:77: cannot find symbol [javac] symbol : variable HttpSessionContextIntegrationFilter [javac] location: class com.icesoft.faces.env.SpringAuthWrapper [javac] SecurityContext sc = (SecurityContext) sessionMap.get(HttpSessionContextIntegrationFilter.SPRING_SECURITY_CONTEXT_KEY); [javac] ^ [javac] D:\ice\src20101112\core\src\com\icesoft\faces\env\SpringAuthWrapperV3.java:83: cannot find symbol [javac] symbol : variable HttpSessionContextIntegrationFilter [javac] location: class com.icesoft.faces.env.SpringAuthWrapperV3 [javac] HttpSessionContextIntegrationFilter.SPRING_SECURITY_CONTEXT_KEY); [javac] ^ [javac] Note: Some input files use or override a deprecated API. [javac] Note: Recompile with -Xlint:deprecation for details. [javac] Note: Some input files use unchecked or unsafe operations. [javac] Note: Recompile with -Xlint:unchecked for details. [javac] 13 errors [javac] 4 warnings
        Ken Fyten made changes -
        Summary Spring security 3 not supported Support Spring Security 3
        Issue Type Bug [ 1 ] Improvement [ 4 ]
        Salesforce Case []
        Ken Fyten made changes -
        Issue Type Improvement [ 4 ] New Feature [ 2 ]
        Salesforce Case []
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Priority P1

          People

          • Assignee:
            Greg Dick
            Reporter:
            Greg Dick
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: