Announcement Announcement Module
Collapse
No announcement yet.
Programing tutorial for Spring Acegi LDAP? Page Title Module
Move Remove Collapse
This topic is closed
X
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Programing tutorial for Spring Acegi LDAP?

    Hi all,
    I'm rather new to Spring Acegi LDAP.
    Currently, I use Spring framework for my portal. For security part, I use Acegi LDAP.
    I managed to integrate Acegi LDAP into my portal.

    However, I would like to implement an user administration page in my portal after I log in successfully, i.e.: create/delete (LDAP) group and users...using Acegi Java API

    Is there any tutorial to show how to use acegi java api to create/delete LDAP group and users?
    If it's not possible to use acegi api, is there any workaround to add/del groups and users after I log in to the portal using Acegi?

    I've googled around already. However, most of the tutorials only show me how to configure Acegi authentication and authorization.
    Thank you very much for your help :-)
    Last edited by datnus; Mar 9th, 2007, 12:22 AM.

  • #2
    Uhm, or I need to use http://www.springframework.org/ldap ?
    I.e. I need to re-authenticate with Ldap server again.

    Comment


    • #3
      Acegi doesn't currently provide any support for managing user and role information - it's up to you to implement the data storage independently. I would like to provide some additional support for this and have been working intermittently on and Ldap implementation.

      There is an additional branch for this, which also involves refactoring ldap support to use Spring Ldap. I'm still trying to decide whether it is feasible to include this in Acegi 1.1. You can view the code for the LdapUserManager here:

      http://acegisecurity.svn.sourceforge...va?view=markup


      It should work Ok, but you'll have to check that branch out of subversion if you want to use it. And of course, it's not supported at all :-)

      Comment


      • #4
        I had actually been wondering about Spring LDAP implementation. I'll try and have a look at this over the weekend, I'm quite interested.

        Comment


        • #5
          I'll have a look at moving it into the main source tree. I don't think introducing a dependency on spring ldap should be a problem for most users.

          Comment


          • #6
            Originally posted by Luke View Post
            Acegi doesn't currently provide any support for managing user and role information - it's up to you to implement the data storage independently. I would like to provide some additional support for this and have been working intermittently on and Ldap implementation.

            There is an additional branch for this, which also involves refactoring ldap support to use Spring Ldap. I'm still trying to decide whether it is feasible to include this in Acegi 1.1. You can view the code for the LdapUserManager here:

            http://acegisecurity.svn.sourceforge...va?view=markup


            It should work Ok, but you'll have to check that branch out of subversion if you want to use it. And of course, it's not supported at all :-)
            Thank you. I will try this. Thank you so much
            I've tried Spring LDAP sample. A bit troublesome to do simple thing.

            Comment


            • #7
              Actually, I've been looking at this stuff again since you mentioned it. There are quite a few things that are missing and it's not really usable as it stands. It was the basis for work I did for a client and I didn't have time to put together a suitable solution for the Acegi release at the time. You may want to wait till I have something usable in the main source tree.

              I find that using Spring ldap is a lot simpler than manipulating Ldap contexts and attributes directly through the standard JNDI apis .

              Comment


              • #8
                Funny you should say that because I've just had to write an LDAP agent. I forgot how much of a pain this stuff can be. Active Directory in particular can be a real pain! I only wish I could have used Spring LDAP or anything to take the effort out of it . I wouldn't have thought the dependency would bring any real problems and it should mean less effort for the Acegi project. Win, win!

                Comment


                • #9
                  Thank you for help.
                  Actually, I may want a Spring-independent LDAP agent so I could reuse it even for non-Spring project

                  Comment


                  • #10
                    , I'll give you a tip. There are lots of articles regarding Active Directory and JNDI. It's pretty simple to get this working with other LDAPs.
                    e.g.
                    http://forum.java.sun.com/thread.jsp...2103&tstart=15

                    Comment


                    • #11
                      Originally posted by karldmoore View Post
                      , I'll give you a tip. There are lots of articles regarding Active Directory and JNDI. It's pretty simple to get this working with other LDAPs.
                      e.g.
                      http://forum.java.sun.com/thread.jsp...2103&tstart=15
                      Thanks million, Karldmoore!
                      It's really useful

                      Comment


                      • #12
                        As I said there are lots of articles on there that cover most aspects of the agent I've written. The articles all seem to be by the same author so it helped to simply look at what he'd been posting . If you get it working with AD then LDAP is pretty easy, it's just the attribute names that change. As for the password attribute, I actually had a look at the source for JXplorer to see how that updated it. It was doing the same as my code anyway.

                        Comment

                        Working...
                        X