Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SEC-1220: Google App Engine compatibility issues #1471

Closed
spring-projects-issues opened this issue Aug 12, 2009 · 6 comments
Closed

SEC-1220: Google App Engine compatibility issues #1471

spring-projects-issues opened this issue Aug 12, 2009 · 6 comments
Labels
status: declined A suggestion or change that we don't feel we should currently apply type: jira An issue that was migrated from JIRA
Milestone

Comments

@spring-projects-issues
Copy link

Guido García (Migrated from SEC-1220) said:

Currently, Spring Security 3 is not compatible with Google App Engine (GAE), as it uses classes not listed in the JRE Class White List (http://code.google.com/intl/en/appengine/docs/java/jrewhitelist.html).

It would be great to have at least a compatibility mode.

The changes to be done :

STRING COMPARATIONS

UNMODIFIABLE COLLECTIONS

  • Rest of code : remove references to Collections.unmodifiableXXX. Instead, use the raw collection in case you are in a GAE environment.

For example, in AbstractAuthenticationToken.java, use
this.authorities = authorities
instead of
this.authorities = Collections.unmodifiableList(authorities)

@spring-projects-issues
Copy link
Author

Luke Taylor said:

Removing the Collections.unmodifiableList call would make the authorities list mutable and it's a basic assumption that the Authenticaition object is immutable with respect to the key security data it contains. Is there a particular reason why this class isn't available in GAE?

@spring-projects-issues
Copy link
Author

Guido García said:

I do not know the reason why java.lang.String$CaseInsensitiveComparator and Collections$UnmodifiableXXX classes are not available in GAE. Is there any alternative to make a collection inmutable?

I modified SavedRequest and java.lang.String$CaseInsensitiveComparator class not found exception disapears when deployed in GAE.

I was not able to modify the rest of code to check in GAE that the other exception (Collections$UnmodifiableXXX class not found) also goes away, as there are a lot of dependencies in Spring Security and I was not able to compile the whole project and regenerate the jars following the steps in http://static.springsource.org/spring-security/site/build.html.

@spring-projects-issues
Copy link
Author

Guido García said:

It is documented as a bug in GAE : http://code.google.com/p/googleappengine/issues/detail?id=1290 (do not forget to vote for it :)

Seems to be an object serialization issue with some JRE classes, so the only workaround in the short term is to modify Spring Security source to avoid using that JRE classes in Spring Security classes intended to be serialized.

@spring-projects-issues
Copy link
Author

Luke Taylor said:

Realistically this will have to wait for Google to sort things out. Changing core design or adding substitute classes to the framework to compensate for those missing from the JDK isn't really a viable option.

@spring-projects-issues
Copy link
Author

jimbo said:

Hi,

Thanks for the info on this issue, I managed to get spring security working by amending the source as suggested. If anyone would like a link to the re-compiled core jar I created please feel free to download at: http://www.google-app-engine.com/blog/post/Spring-security-fix-for-google-app-engine.aspx

Jim

@spring-projects-issues
Copy link
Author

Guido García said:

Google guys say it has been fixed in GAE 1.2.5
http://code.google.com/p/googleappengine/issues/detail?id=1290

Just in case anyone here is interested.

@spring-projects-issues spring-projects-issues added Closed status: declined A suggestion or change that we don't feel we should currently apply type: jira An issue that was migrated from JIRA labels Feb 5, 2016
@spring-projects-issues spring-projects-issues added this to the 3.0.0 RC1 milestone Feb 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: declined A suggestion or change that we don't feel we should currently apply type: jira An issue that was migrated from JIRA
Projects
None yet
Development

No branches or pull requests

1 participant