Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > How to check users against security groups in Active Directory

Reply
Thread Tools

How to check users against security groups in Active Directory

 
 
rote
Guest
Posts: n/a
 
      11-14-2007
My sceanrio is this on an asp.net 2.0 freamework.
I want to use any of the data controls e.g Gridview,DetailView etc..
But i want some buttons e.g update,edit save etc to be enable or disabled
based on if they belong to some security groups in active
directory.
I'm looking for the best options for this because i want to store those
security groups somewhere and then check for the
user against those security groups for their authorisation when they lunch
the application.
Preferably i would like to store them in an xml file and then write an API
to change, modify or add active directory security groups.
Any ideas would be appreciated.
Thanks



 
Reply With Quote
 
 
 
 
Joe Kaplan
Guest
Posts: n/a
 
      11-14-2007
Depending on the authentication model your app uses, ASP.NET may already
know the user's security group membership. If you are using Windows
authentication, you can just check User.IsInRole and do things like change
the visibility of a control based on the result of that.

Joe K.

--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--
"rote" <> wrote in message
news:...
> My sceanrio is this on an asp.net 2.0 freamework.
> I want to use any of the data controls e.g Gridview,DetailView etc..
> But i want some buttons e.g update,edit save etc to be enable or disabled
> based on if they belong to some security groups in active
> directory.
> I'm looking for the best options for this because i want to store those
> security groups somewhere and then check for the
> user against those security groups for their authorisation when they lunch
> the application.
> Preferably i would like to store them in an xml file and then write an API
> to change, modify or add active directory security groups.
> Any ideas would be appreciated.
> Thanks
>
>
>



 
Reply With Quote
 
 
 
 
rote
Guest
Posts: n/a
 
      11-15-2007
Thanks Joe for the prompt reply. It seems you are still with Accenture.
I'll be using Windows Auth and thats true i can use User.IsInRole method.
But what 'm consideriing is how i'm going to store the AD sceurity GROUPS i
want to validate the users against.
I would like to have
<?xml version="1.0" encoding="ISO-8859-1"?>
<ActiveDirectory>
<groups>Tove</groups>
</note></ActiveDirectory>
then using the IsinRole method i would like to loop through the groups
node to check for security groups ..Is this achievable?
Thanks in advance


"Joe Kaplan" <> wrote in message
news:...
> Depending on the authentication model your app uses, ASP.NET may already
> know the user's security group membership. If you are using Windows
> authentication, you can just check User.IsInRole and do things like change
> the visibility of a control based on the result of that.
>
> Joe K.
>
> --
> Joe Kaplan-MS MVP Directory Services Programming
> Co-author of "The .NET Developer's Guide to Directory Services
> Programming"
> http://www.directoryprogramming.net
> --
> "rote" <> wrote in message
> news:...
>> My sceanrio is this on an asp.net 2.0 freamework.
>> I want to use any of the data controls e.g Gridview,DetailView etc..
>> But i want some buttons e.g update,edit save etc to be enable or disabled
>> based on if they belong to some security groups in active
>> directory.
>> I'm looking for the best options for this because i want to store those
>> security groups somewhere and then check for the
>> user against those security groups for their authorisation when they
>> lunch the application.
>> Preferably i would like to store them in an xml file and then write an
>> API to change, modify or add active directory security groups.
>> Any ideas would be appreciated.
>> Thanks
>>
>>
>>

>
>



 
Reply With Quote
 
Joe Kaplan
Guest
Posts: n/a
 
      11-15-2007
Sure, you could definitely do that. I would probably provide some sort of
wrapper around the groups and the authorization function in general so that
you can easily change this at runtime. Microsoft has a nice, very powerful
framework for this type of thing call AzMan that you can use, or you could
implement something more simple yourself.

Joe K.

--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--
"rote" <> wrote in message
news:e0Fr$...
> Thanks Joe for the prompt reply. It seems you are still with Accenture.
> I'll be using Windows Auth and thats true i can use User.IsInRole method.
> But what 'm consideriing is how i'm going to store the AD sceurity GROUPS
> i
> want to validate the users against.
> I would like to have
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <ActiveDirectory>
> <groups>Tove</groups>
> </note></ActiveDirectory>
> then using the IsinRole method i would like to loop through the groups
> node to check for security groups ..Is this achievable?
> Thanks in advance
>
>
> "Joe Kaplan" <> wrote in message
> news:...
>> Depending on the authentication model your app uses, ASP.NET may already
>> know the user's security group membership. If you are using Windows
>> authentication, you can just check User.IsInRole and do things like
>> change the visibility of a control based on the result of that.
>>
>> Joe K.
>>
>> --
>> Joe Kaplan-MS MVP Directory Services Programming
>> Co-author of "The .NET Developer's Guide to Directory Services
>> Programming"
>> http://www.directoryprogramming.net
>> --
>> "rote" <> wrote in message
>> news:...
>>> My sceanrio is this on an asp.net 2.0 freamework.
>>> I want to use any of the data controls e.g Gridview,DetailView etc..
>>> But i want some buttons e.g update,edit save etc to be enable or
>>> disabled based on if they belong to some security groups in active
>>> directory.
>>> I'm looking for the best options for this because i want to store those
>>> security groups somewhere and then check for the
>>> user against those security groups for their authorisation when they
>>> lunch the application.
>>> Preferably i would like to store them in an xml file and then write an
>>> API to change, modify or add active directory security groups.
>>> Any ideas would be appreciated.
>>> Thanks
>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
rote
Guest
Posts: n/a
 
      11-15-2007
I have read about about AZMAN but i think i will just go for a simple
wrapper though.
Thanks

"Joe Kaplan" <> wrote in message
news:...
> Sure, you could definitely do that. I would probably provide some sort of
> wrapper around the groups and the authorization function in general so
> that you can easily change this at runtime. Microsoft has a nice, very
> powerful framework for this type of thing call AzMan that you can use, or
> you could implement something more simple yourself.
>
> Joe K.
>
> --
> Joe Kaplan-MS MVP Directory Services Programming
> Co-author of "The .NET Developer's Guide to Directory Services
> Programming"
> http://www.directoryprogramming.net
> --
> "rote" <> wrote in message
> news:e0Fr$...
>> Thanks Joe for the prompt reply. It seems you are still with Accenture.
>> I'll be using Windows Auth and thats true i can use User.IsInRole method.
>> But what 'm consideriing is how i'm going to store the AD sceurity GROUPS
>> i
>> want to validate the users against.
>> I would like to have
>> <?xml version="1.0" encoding="ISO-8859-1"?>
>> <ActiveDirectory>
>> <groups>Tove</groups>
>> </note></ActiveDirectory>
>> then using the IsinRole method i would like to loop through the groups
>> node to check for security groups ..Is this achievable?
>> Thanks in advance
>>
>>
>> "Joe Kaplan" <> wrote in message
>> news:...
>>> Depending on the authentication model your app uses, ASP.NET may already
>>> know the user's security group membership. If you are using Windows
>>> authentication, you can just check User.IsInRole and do things like
>>> change the visibility of a control based on the result of that.
>>>
>>> Joe K.
>>>
>>> --
>>> Joe Kaplan-MS MVP Directory Services Programming
>>> Co-author of "The .NET Developer's Guide to Directory Services
>>> Programming"
>>> http://www.directoryprogramming.net
>>> --
>>> "rote" <> wrote in message
>>> news:...
>>>> My sceanrio is this on an asp.net 2.0 freamework.
>>>> I want to use any of the data controls e.g Gridview,DetailView etc..
>>>> But i want some buttons e.g update,edit save etc to be enable or
>>>> disabled based on if they belong to some security groups in active
>>>> directory.
>>>> I'm looking for the best options for this because i want to store those
>>>> security groups somewhere and then check for the
>>>> user against those security groups for their authorisation when they
>>>> lunch the application.
>>>> Preferably i would like to store them in an xml file and then write an
>>>> API to change, modify or add active directory security groups.
>>>> Any ideas would be appreciated.
>>>> Thanks
>>>>
>>>>
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
How to authenticate against the Active Directory using forms authentication with password expiration check? Ruggiero, Vince ASP .Net Web Controls 0 12-14-2009 09:30 PM
How to check users against security groups in Active Directory rote ASP .Net 2 11-15-2007 01:46 AM
Does 'IsInRole()' check against Active Directory groups? Craig Vedur ASP .Net Security 5 08-31-2005 04:02 AM
check if user belong to a domain against active directory without impersonation Caspy ASP .Net 3 08-04-2005 01:01 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57