Results 1 to 9 of 9

Thread: ACL taglib

  1. #1
    Join Date
    Oct 2004
    Location
    Brazil
    Posts
    23

    Default ACL taglib

    Hello,

    In my web application I need to render certain components based on ACL info. In order to do so I would need a taglib, does it exist? I was looking on how to implement it, but I guess it would not be as straightforward as I thought - I think it would require writing a new SecureContext, new IntegrationFilters, besides the taglib itself (or perhaps there is an easier way to do it?)

    Thanks a lot and keep up the good work!

    Victor

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

    Default

    It's already done and in CVS. I'd suggest you do a checkout from CVS and take a look at the Contacts Sample application, which now uses ACL security entirely. It uses the new ACL taglib.

  3. #3
    Join Date
    Nov 2004
    Location
    Beijing,China
    Posts
    18

    Default

    Quote Originally Posted by Ben Alex
    It's already done and in CVS. I'd suggest you do a checkout from CVS and take a look at the Contacts Sample application, which now uses ACL security entirely. It uses the new ACL taglib.
    Ben means taglib authz with .tld file located in ACEGISECURITY_HOME\core\src\main\resources\net\sf\ acegisecurity\taglibs.

    But Ben, isn't necessary to add taglib declaration in web.xml? i.e.
    Code:
      	
    <taglib>
            <taglib-uri>/tags/authz</taglib-uri>
            <taglib-location>/WEB-INF/tld/authz.tld</taglib-location>
    </taglib>
    I can't find such code neither in web.xml for ca, nor for cas, so I add it and change corresponding code in include.jsp

  4. #4
    Join Date
    Nov 2004
    Location
    Beijing,China
    Posts
    18

    Default

    Citing from Ben's reference document:

    If you are using a JSP 1.1 container, you will need to declare the JSP tag library in your application's web.xml file, with code such as this:
    <taglib>
    <taglib-uri>http://acegisecurity.sf.net/authz</taglib-uri>
    <taglib-location>/WEB-INF/authz.tld</taglib-location>
    </taglib>
    For JSP 1.1 containers you will also need to extract the authz.tld file from the acegi-security-taglib.jar file and put it into your application's WEB-INF/lib folder.
    I should know it earlier :oops:

  5. #5
    Join Date
    Oct 2004
    Location
    Brazil
    Posts
    23

    Default

    I just checked the tags and they seem pretty cool, thanks a lot!

    Regards,

    V.

  6. #6
    Join Date
    Oct 2004
    Location
    Brazil
    Posts
    23

    Default

    Just as a side question, does anybody know if there is also an ACL servlet filter?

    Thanks,

    Victor

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

    Default

    An ACL servlet filter? Could you elaborate on what that would do a little?

  8. #8
    Join Date
    Oct 2004
    Location
    Brazil
    Posts
    23

    Default

    I would imagine a mechanism which "maps" a page (or set of pages) as a protected ACL object. Then we would be able to control access to the JSPs based on ACL info, allowing for example only users with at least read permission to view a certain page.
    IMHO the main advantage to this approach is that all access control info is centralized in the ACL database and not spread out across the XML config file.

    Regards,

    Victor

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

    Default

    On my prior-to-0.7 TODO list is refactoring discussed at http://forum.springframework.org/showthread.php?t=11167.

    This will enable a suitable taglib to be created, as the "configuration attributes" applicable to different URLs will be easily available.

    If people are developing a full CMS they'll probably be using the ACL security instead, as they probably want to protect not only read but also create, delete, write etc. As such they'd use the existing ACL services and ACL taglib.
    Last edited by robyn; May 14th, 2006 at 05:23 PM.

Similar Threads

  1. Displaytag taglib
    By bobmanc in forum Web
    Replies: 10
    Last Post: May 22nd, 2009, 01:44 AM
  2. use spring taglib error!
    By leonyuan in forum Web
    Replies: 1
    Last Post: Sep 23rd, 2005, 04:21 AM
  3. Logged in taglib?
    By wpfeiffe in forum Security
    Replies: 4
    Last Post: Sep 10th, 2005, 01:03 AM
  4. Replies: 2
    Last Post: Sep 6th, 2005, 03:21 PM
  5. Problem with taglib
    By twest in forum Web
    Replies: 2
    Last Post: Nov 20th, 2004, 06:06 AM

Posting Permissions

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