Results 1 to 3 of 3

Thread: Per-domain intercept-urls

  1. #1
    Join Date
    Aug 2005
    Posts
    26

    Default Per-domain intercept-urls

    Hi Folks -

    I'm sure this is covered somewhere in the forum, but I couldn't find and appropriate search to yield an answer - so I apologize if this has been covered before.

    I have a single .war file that handles multiple domains. Each domain might serve a page with the same URL, but the security requirements on them might be different.

    For example, sitea.com might have

    <intercept-url pattern="/products.html" access="ROLE_SITE_USERS"/>

    Where siteb.com might have

    <intercept-url pattern="/products.html" access="ROLE_ANONYMOUS"/>


    Since it's a single war file, is there a way to tell the pattern to inspect the incoming domain name, or another attribute available to handle the problem?

    i.e.

    <intercept-url pattern="sitea.com/products.html" access="ROLE_SITE_USERS"/>

    or

    <intercept-url pattern="products.html" domain="sitea.com" access="ROLE_SITE_USERS"/>

    Any help very much appreciated.

    Thanks!
    Matt

  2. #2
    Luke Taylor is offline Senior Member Acegi Security System TeamSpring Team
    Join Date
    Aug 2004
    Location
    Glasgow, Scotland
    Posts
    3,449

    Default

    You will probably have to use a traditional bean configuration here. You are essentially changing the behaviour of the ObjectDefinitionaSource (SecurityMetadataSource in 3.0) which is used with the FilterSecurityInterceptor - it would return a different list of attributes depending on your "domain" value. So you will have to customize the standard implementation (or write a new one) and inject that into the interceptor.
    Spring - by Pivotal
    twitter @tekul

  3. #3
    Join Date
    Aug 2005
    Posts
    26

    Default

    Thanks a lot, Luke -- I appreciate the reply.

Posting Permissions

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