Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsAuthenticationAuthenticationMaking AD Provider work with ADAMMaking AD Provider work with ADAM
Previous
 
Next
New Post
5/19/2008 10:16 PM
 

Want to make Active Directory Provider work with ADAM?  Read on.

I have a client who needed DNN to work with an ADAM data store.  ADAM does work with ADSI using the LDAP protocol.  I was pretty sure that anything written using ADSI should be able to access ADAM just as easily as Active Directory.  Turns out it is true, but you have to make sure you're not building Active Directory assumptions into code.  I have found several Active Directory "hard codes" in this module.  With some minor changes I was able to get it to authenticate a user against an ADAM data store.

I made these changes to my copy of 1.00.03

I have some modified code that I'd be happy to share with the team, just not sure how to go about that.

Here's a quick summary of what I found and what I did.

 

 

  • I setup ADAM using instructions found here: http://erlend.oftedal.no/blog/?blogid=6
  • DotNetNuke.Authentication.ActiveDirectory.ADSI.Configuration defines a private member called mADSIPath.  This is hardcode to Path.GC.  It is never set and never read. 
    • I modified this hard code to be Path.LDAP.  A better solution is to allow the Admin to set this in the Settings.ascx
    • I added a readonly property so this could be accessed by other classes.
  • There are a bunch of methods in ADSI.Utilities that take ADSIPath as an optional parameter, but then defaults to Path.GC
    • I changed those paremeter to be required and removed the default.  Then fixed all compiler errors this caused by using the new property I created in the Configuration class described above
  • ADSI_ACCOUNTNAME in Congifuration class is set to "

    sAMAccountName".

 

  • There are some assumptions through out code that you are dealing with Active Directory and not a generic ADSI/LDAP data store. 
    • Everyplace you see "GC://" it is assuming Active Directory.  ADAM uses "LDAP://"
    • Every place you see "DC=" is is assuming Active Directory.  LDAP can use anything it wants in its path.  I don't have DC= anywhere in my path.
    • In the Utilities class, there were places where it was calling GetRootDomain.  In ADAM you don't have domains.  I changed those calls to GetRootEntry instead.

     

      Some disclaimers:  I am not an Active Directory expert, nor an ADAM expert, nor an LDAP expert.  I actually just learned all this stuff in a few days because I HAD to make this work.  I am expert at making things work together very quickly :)  I have not tested any of my changes against Active Directory, in fact there are a couple of changes that will definately break Active Directory support until some additional admin settings are made available.  There may be some other pieces that I'm missing and just haven't hit yet.
  •  
    New Post
    5/19/2008 10:39 PM
     

    Good work and I'd be interested to see your changes. Just zip them up and send them to my email (mhorton@telus.net).

    I'm not an expert in AD/ADAM/LDAP either. I took over the project because nobody else was stepping up and changes/bugs needed to be made/fixed. The whole AD code that I inherited needs a makeover and it's been on my plate for months but I just haven't had the time to dedicate to it. It's something I hope to get going on when I take some holidays this summer (depending on how busy it is at work will depend if I get any).

     
    New Post
    5/21/2008 6:53 AM
     

    Hi tseddon

    Is it possible to have a copy of your code ? I'm very interesting of your changes.

    Thanks

     
    New Post
    9/11/2008 2:28 PM
     

    Hi,

    One of my customers also needs an Adam solution. Did the patched code made it into a newer release already?

    I set up Adam and tried to configure the  DNN 1.00.04 provider to use it. No succes. I am not sure whether it is in the AD provider coder or whether I am just a rooky in setting up Adam.

     

     
    New Post
    9/11/2008 11:34 PM
     

    No it hasn't. The .04 release was a bug fix only release.

    EDIT: I just looked back through my email and it doesn't look like I was ever sent the changes.

     
    Previous
     
    Next
    HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsAuthenticationAuthenticationMaking AD Provider work with ADAMMaking AD Provider work with ADAM


    These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

    For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

    1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
    2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
    3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
    4. No Flaming or Trolling.
    5. No Profanity, Racism, or Prejudice.
    6. Site Moderators have the final word on approving / removing a thread or post or comment.
    7. English language posting only, please.
    What is Liquid Content?
    Find Out
    What is Liquid Content?
    Find Out
    What is Liquid Content?
    Find Out