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 ForumsAuthenticationAuthenticationAlternative approach to AD synchronizationAlternative approach to AD synchronization
Previous
 
Next
New Post
11/3/2006 6:15 AM
 
Having spent a couple of days debugging this aspect of DNN, I have a couple of observations about the current ADSI solution.

Issues:
One of my first wishes was to have the roles imported from AD. This is not done in the current solution.
A second observation is that users are added when they log in and this places the burden of user sync at that point. This leads to slow loading times when a user first logs in. This will only get worse given the fact that more advanced sync requests are made and implemented in separate solutions (I'm talking about 'the fix' for role and user sync that is mentioned all over these forums)

Proposal:
I'd move the synchronization into a separate screen (obvious candidate is the current 'Authentication' page under Admin) and let the sync happen on instigation of the admin, rather than each login. We can then make it as advanced as we like without wasting the user's time on logon. My direct wishes: downloading roles from AD, and some rule mechanism to have these automatically go into various role groups (for instance: if role name includes 'Admin' then put in Role Group 'Admin Roles'). Then sync all users including their personal data. Alternatively the UI implementation could be in the form of a Wizard. STEP 1: download the user roles and select which ones you like imported and select from dropdown into which role group, STEP 2: sync user base from AD. Another great feature would be more feedback about the sync process.

Drawbacks:
This obviously means that a user that logs on is potentially out of sync with DNN (this would be an issue in a large organization where changes to AD are frequent, not in the case I'm dealing with now which is a company of about 80 people with relatively few changes). One could imagine a couple of improvements to aleviate this such as a scheduled service that syncs on a given time. This would need to be automatic and could, for instance, only concern the users, not the roles.

Peter

Peter Donker
Bring2mind http://www.bring2mind.net
Home of the Document Exchange,
the professional document management solution for DNN
 
New Post
11/3/2006 8:30 AM
 

I don't think you'll see "true" role synchronization from AD.  The thought of an outside program being able to figure out what groups a user is in gives security gurus the heebie-jeebies.  That, and I don't think there is a mechanism in AD to do this, simply for that reason (outside of AD tools, but you have to have the right permissions to use those). 

I haven't looked at the DNN code myself, so I can't say for certain if this is how it works, but this is how I "think" it works (or at least how most programs doing authentication work).  I think the role membership routine works by a query/response mechanism.  In that DNN will say "is username a member of groupa?", AD will respond with a yes/no.  Then it will go on to "is username a member of groupb?", etc...  This would make role synchronization quick for a site with only a few security roles, but lengthy for a site with a lot of roles.

I have no problem at all with making role synchronization toggleable, in fact I think it already is.  But with the lack of "true" role sychronziation where DNN will request a list of all groups a user is a member of, a button to do that manually is pointless.

Possibly a compromise would be to select what items would be synchronized during login?

 
New Post
11/3/2006 9:38 AM
 
Well, I just spent 2 days stepping through the code and here is what is happening (as far as I can see):

1. During user authentication a list of DNN portal roles is retrieved
2. For each of these a query is made to AD to see if this role exists. This is done in Components/ADSI/Utilities.vb through

        Public Shared Function GetGroupEntriesByName(ByVal GroupName As String) As ArrayList
            Dim RootDomain As ADSI.Domain = GetRootDomain()
            Dim objSearch As New Authentication.ADSI.Search(RootDomain)

            objSearch.AddFilter(ADSI_CLASS, ADSI.CompareOperator.Is, Authentication.ObjectClass.group.ToString)
            objSearch.AddFilter(ADSI_ACCOUNTNAME, ADSI.CompareOperator.Is, GroupName)

            Dim groupEntries As ArrayList = objSearch.GetEntries

            If Not groupEntries Is Nothing Then
                Return groupEntries
            Else
                Return Nothing
            End If

        End Function

As you can see the search results are limited by providing the groupname we're looking for. If you remove this constraint, then all groups seem to pour out of AD to your program.

3. A check is made to see if user A belongs to the group B we were checking if the result of step 2 was positive.


So you see, you could easily create something that extracts all groups from AD to add them to DNN.

Peter

PS. Note that with synchronization I don't mean true 2-way traffic. I mean changing DNN to reflect changes in AD, not the other way round.




Peter Donker
Bring2mind http://www.bring2mind.net
Home of the Document Exchange,
the professional document management solution for DNN
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsAuthenticationAuthenticationAlternative approach to AD synchronizationAlternative approach to AD synchronization


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