473,224 Members | 1,947 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,224 software developers and data experts.

Active Directory Vs Sql Server which way to go?

If i want to generate a menu structure depending on who is logged in
in an intranet system(using windows authentication) is it better to use the
GROUPS in Active Directory
or to move the Active Directory groups into a Sql Server database and base
the authrorization and authentication on the SQL Server roles/groups?
Whats the best way to make use of the GROUPS in active directory to
authorize
users apart from using web.config where you have to set it configuratively
like below(but i don't want this)
<authorization>
<allow roles="DOMAIN\HRUsers" />
<deny users="*" />
</authorization>
This works if i want to deny users who are not part of the GROUP
"HRUSERS"(Which just denies the URL .aspx page)
Is it possible to store/collect all the Active Directory groups and use it
in code to validate against USERS?
(Apart from storing it in SQL server?)

or
programmatically by doing :-
If Not (User.IsInRole("HR")) And Not (User.IsInRole("Managers")) Then
' Display the Button
Else
' Don't display it!
End If
The badside to these methods is that if you are calling a method several
times from different applications, you will need to repeat the logic all
the time. How can i do it declaratively using Active Directory.
I know if i use a database with stored procedures that would be a benefit.
Any thoughts?
Nov 19 '05 #1
4 2323
Some thoughts:

I'd leave the groups in Active Directory. Administrators become
unhappy when they have to update authorization rules in two places :)
IsInRole works very well for programmatic checks.

Have you looked at the security trimming feature of the ASP.NET 2.0
navigation system? Or is this in 1.1?

--
Scott
http://www.OdeToCode.com/blogs/scott/
On Fri, 4 Nov 2005 20:25:37 +1100, "Patrick.O.Ige"
<pa********@optusnet.com.au> wrote:
If i want to generate a menu structure depending on who is logged in
in an intranet system(using windows authentication) is it better to use the
GROUPS in Active Directory
or to move the Active Directory groups into a Sql Server database and base
the authrorization and authentication on the SQL Server roles/groups?
Whats the best way to make use of the GROUPS in active directory to
authorize
users apart from using web.config where you have to set it configuratively
like below(but i don't want this)
<authorization>
<allow roles="DOMAIN\HRUsers" />
<deny users="*" />
</authorization>
This works if i want to deny users who are not part of the GROUP
"HRUSERS"(Which just denies the URL .aspx page)
Is it possible to store/collect all the Active Directory groups and use it
in code to validate against USERS?
(Apart from storing it in SQL server?)

or
programmatically by doing :-
If Not (User.IsInRole("HR")) And Not (User.IsInRole("Managers")) Then
' Display the Button
Else
' Don't display it!
End If
The badside to these methods is that if you are calling a method several
times from different applications, you will need to repeat the logic all
the time. How can i do it declaratively using Active Directory.
I know if i use a database with stored procedures that would be a benefit.
Any thoughts?


Nov 19 '05 #2
We use Authorization Manager (available standard in Windows 2003 and as
a download for Windows 2000) which takes the whole role management
thing out of the application altogether.

You still organize authorization by users and roles and such, and it
links into Active Directory, but what it boils down to in the
application code is a check for a certain task or operation and if the
current user is allowed to do that or not

Authorization.CheckAccess("taskIdentifier",current Identity) as Boolean

You define the task identifier strings in Authorization Manager (AzMan)
as a developer task, then assigning all the permissions to those tasks,
organizing them into roles and such, becomes an administrative
function. The real benefit here is that you can change what it means to
be a member of "Admins" or "Managers" outside of the application, and
the app behaves accordingly, without a recompile.

So, when you build your menu structure, call the authorization manager
for each menu item (use a nice naming convention that corresponds to
the tasks defined in AzMan) and ask if the current user is allowed to
do that task or not, and decide to add it to the menu structure or not
(or enable/disable).

Enterprise Library has an authorization piece that leverages AzMan.
There are lots of samples out there if you google AzMan and .NET or C#.
Mike

Nov 19 '05 #3
I know that its actually like re inventineg the wheel.
I don't think the trimming navigation system is in ASP.NET 1.1.
In 2.0 i think.
Thx Scott
I'm looking at using Authorization Manager if all goes well
"Scott Allen" <sc***@nospam.odetocode.com> wrote in message
news:9f********************************@4ax.com...
Some thoughts:
t
I'd leave the groups in Active Directory. Administrators become
unhappy when they have to update authorization rules in two places :)
IsInRole works very well for programmatic checks.

Have you looked at the security trimming feature of the ASP.NET 2.0
navigation system? Or is this in 1.1?

--
Scott
http://www.OdeToCode.com/blogs/scott/
On Fri, 4 Nov 2005 20:25:37 +1100, "Patrick.O.Ige"
<pa********@optusnet.com.au> wrote:
If i want to generate a menu structure depending on who is logged in
in an intranet system(using windows authentication) is it better to use theGROUPS in Active Directory
or to move the Active Directory groups into a Sql Server database and basethe authrorization and authentication on the SQL Server roles/groups?
Whats the best way to make use of the GROUPS in active directory to
authorize
users apart from using web.config where you have to set it configurativelylike below(but i don't want this)
<authorization>
<allow roles="DOMAIN\HRUsers" />
<deny users="*" />
</authorization>
This works if i want to deny users who are not part of the GROUP
"HRUSERS"(Which just denies the URL .aspx page)
Is it possible to store/collect all the Active Directory groups and use itin code to validate against USERS?
(Apart from storing it in SQL server?)

or
programmatically by doing :-
If Not (User.IsInRole("HR")) And Not (User.IsInRole("Managers")) Then
' Display the Button
Else
' Don't display it!
End If
The badside to these methods is that if you are calling a method several
times from different applications, you will need to repeat the logic all
the time. How can i do it declaratively using Active Directory.
I know if i use a database with stored procedures that would be a benefit.Any thoughts?

Nov 19 '05 #4
Mike thx alot fr the reply.
I will look into using this .Well the good things is that i can use it on
Win 2000 beacuse i don't think they have WIN2003 yet.
Patrick
"xhead" <xh******@gmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
We use Authorization Manager (available standard in Windows 2003 and as
a download for Windows 2000) which takes the whole role management
thing out of the application altogether.

You still organize authorization by users and roles and such, and it
links into Active Directory, but what it boils down to in the
application code is a check for a certain task or operation and if the
current user is allowed to do that or not

Authorization.CheckAccess("taskIdentifier",current Identity) as Boolean

You define the task identifier strings in Authorization Manager (AzMan)
as a developer task, then assigning all the permissions to those tasks,
organizing them into roles and such, becomes an administrative
function. The real benefit here is that you can change what it means to
be a member of "Admins" or "Managers" outside of the application, and
the app behaves accordingly, without a recompile.

So, when you build your menu structure, call the authorization manager
for each menu item (use a nice naming convention that corresponds to
the tasks defined in AzMan) and ask if the current user is allowed to
do that task or not, and decide to add it to the menu structure or not
(or enable/disable).

Enterprise Library has an authorization piece that leverages AzMan.
There are lots of samples out there if you google AzMan and .NET or C#.
Mike

Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jay Chan | last post by:
We have just installed a SQL Server 2000 (SP 3A) onto a computer that has Windows-2003 Server on it. Now, we cannot get access to that database server from other computers. Seem like this may be an...
0
by: microsoft | last post by:
Hi People, when I try to modify an active directory user programatically, I receive the following exception: The server is unwilling to process the request Reading the microsoft web site, I...
1
by: Andrew | last post by:
Hey all, Working on revamping our Intranet here and making use of the LDPA, Active Directory, Directory Services, etc. that .Net provides. I am still fairly new on this subject, so the problem...
9
by: Patrick | last post by:
I have an ASP.NET page that searches for someone in the corporate Active Directory. It had been working fine until recently when I changed from Basic Authentication on IIS6 back to Integrated...
10
by: Hriday | last post by:
Hi there, Please help me..It is urgent This is Hriday, working on windows authentication with Active Directory... My requirment is when a user sends a request to my web Applicatoin I want to...
0
by: RTT | last post by:
here is my current situation. I develop a program on my computer's localhost. From there i contact Active directory succesfull using a connectionstring like:...
3
by: Lucky | last post by:
Hi guys, after long long time. i'm back again with another problem. this time i think the problem is very very interesting and i really need you help on this. i'm trying to connect to the...
0
JamieHowarth0
by: JamieHowarth0 | last post by:
Hi guys, Up until 3 weeks ago I was running a Microsoft Windows Server 2003 R2 Enterprise Edition Beta from home on an ADSL connection with dynamic IP absolutely fine - until the beta decided to...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.