Issue Details (XML | Word | Printable)

Key: FLEX-43
Type: Bug Bug
Status: Resolved Resolved
Resolution: Cannot Reproduce
Priority: Major Major
Assignee: Jeremy Grelle
Reporter: Stefan Podkowinski
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Spring BlazeDS Integration

Authentication object not available from SecurityContext immediately after login

Created: 29/Apr/09 04:57 AM   Updated: 02/Feb/10 09:25 PM   Resolved: 08/May/09 02:41 PM
Component/s: None
Affects Version/s: 1.0.0.M2
Fix Version/s: 1.0.0.RC1

Time Tracking:
Not Specified

File Attachments: 1. Zip Archive auth-test.zip (9.92 MB)
2. XML File build.xml (0.6 kB)
3. Text File livehttpheaders.txt (21 kB)
4. File main.swf (249 kB)

Image Attachments:

1. livehttpheaders.png
(62 kB)

2. result.png
(31 kB)
Environment:
Flex Builder 3.0.2
Tomcat 6.0.18
Java 1.6.0_11-b3


 Description  « Hide
I've been experiencing some very strange issues with the spring security integration. I suspect its due to synchronization problems either within spring-flex, spring-mvc or tomcat on session handling level.

The issue occurs for the following use case:
1) call ChannelSet.login() with valid user credentials
2) within the callback provided to login(), call a remote object that will return granted authorities and other details for the just logged in user
3) validate the the requested user details were provided through the remote object call

Unfortunately step 3 will fail in most (but not all cases), because SecurityContextHolder.getContext().getAuthentication() will return null as for Authentication. This happens although login was called successfully.

var token:AsyncToken = _channelSet.login(user, password);
token.addResponder(new AsyncResponder(function(result:Object, token:Object):void {
  service.whoami(); <--- SecurityContext.getAuthentication() will still return null at this point
}, function(result:Object, token:Object):void {
  trace("Login failed");
}));
            

I've attached a minimal flex builder project for this case that should allow you to confirm this issue. The libraries are consistent with the latest test-drive project.


Sort Order: Ascending order - Click to sort in descending order
Jeremy Grelle made changes - 08/May/09 02:41 PM
Field Original Value New Value
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s 1.0.0.RC1 [ 11168 ]
Resolution Cannot Reproduce [ 5 ]
Stefan Podkowinski made changes - 11/May/09 10:27 AM
Attachment livehttpheaders.txt [ 15376 ]
Attachment livehttpheaders.png [ 15377 ]
Stefan Podkowinski made changes - 11/May/09 11:55 AM
Attachment main.swf [ 15380 ]
Attachment build.xml [ 15379 ]