Results 1 to 2 of 2

Thread: SecurityEnforcementFilter without Authentication Manager?

  1. #1
    Join Date
    Oct 2004
    Location
    Munich, Germany
    Posts
    36

    Default SecurityEnforcementFilter without Authentication Manager?

    Hello everyone,

    I'm trying to use a SecurityEnforcementFilter without an Authentication Manager. I'd like to just use the Authorization part. Is this possible?

    My workflow:

    My (legacy) application already has got a Login form (using Spring-Web's LoginFormController). On submit, I'm doing a custom authentication in my Business Service, though it implements AuthenticationProvider. I haven't got any AuthenticationManager.

    After successful authentication, I put the AuthenticationToken into the ContextHolder, together with my domain user object. The HttpSessionIntegrationFilter copies the Token to the Session, in order to be available on the next request.

    Theoretically it should be possible from this point on to authorize without authentication, because the authenticated token is already present. This would also be desired, as I don't need to re-authenticate on each request. If authentication should be missing (p.e. because of deep-linking), the correct HTTP error is to be returned to the user - I don't want to redirect to the login right now.

    My problem is that you have to configure an AuthenticationManager and an AuthenticationEntryManager in the FilterSecurityInterceptor and its dependant components.

    Best regards,

    Andreas

  2. #2
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    Sounds like you have a good grasp of what's going on. I'd encourage you to just write a very simple implementation of AuthenticationManager that tests whatever is on the ContextHolder. You might like to add a "key" to objects placed on the ContextHolder, and have your AuthenticationManager look for that "key", as we do with the AuthByAdapterProvider.

Similar Threads

  1. Replies: 2
    Last Post: Oct 19th, 2005, 11:15 PM
  2. Replies: 2
    Last Post: Oct 13th, 2005, 02:47 PM
  3. Loosing my SecureContext
    By sklakken in forum Security
    Replies: 3
    Last Post: Jul 21st, 2005, 01:44 PM
  4. Replies: 8
    Last Post: Dec 7th, 2004, 06:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •