Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > User management with Windows Authentication

Reply
Thread Tools

User management with Windows Authentication

 
 
jfer
Guest
Posts: n/a
 
      09-15-2005
I am creating a web application for use on an intranet and am having
some problems understanding how to maintain web application user lists
with windows authentication. Adding domain users to a group on the web
server and utilizing <allow><deny> tags to restrict access is quite
nice. However this is really only feasible when the userbase is small.
If one of your apps has to allow 500+ people you would have to sit at
the server and add all these domain accounts to the windows group. Is
there a better way? This seems like an adminmistrative nightmare.

Thanks

 
Reply With Quote
 
 
 
 
Dominick Baier [DevelopMentor]
Guest
Posts: n/a
 
      09-15-2005
Hello jfer,

just use domain groups in the <authorization> element or on the NTFS ACLs
of the aspx pages.
---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com

> I am creating a web application for use on an intranet and am having
> some problems understanding how to maintain web application user lists
> with windows authentication. Adding domain users to a group on the
> web
> server and utilizing <allow><deny> tags to restrict access is quite
> nice. However this is really only feasible when the userbase is
> small.
> If one of your apps has to allow 500+ people you would have to sit at
> the server and add all these domain accounts to the windows group. Is
> there a better way? This seems like an adminmistrative nightmare.
>
> Thanks
>



 
Reply With Quote
 
 
 
 
jfer
Guest
Posts: n/a
 
      09-15-2005
The problem is not how to use <authorization> the problem is how do you
maintain the listing of windows users and groups which <authorization>
depends on. Sitting at the server and adding 500 users to a
"toolXUser" group for a toolX web application seems a bit much. I
would like to maintain this listing of groups in a SQL database so that
I can build my own front end for maintaining the users and groups. Is
this where I need to build up my own GenericPrincipal ? Any thoughts
are appreciated.

Thanks

 
Reply With Quote
 
Dominick Baier [DevelopMentor]
Guest
Posts: n/a
 
      09-15-2005
Hello jfer,

what makes a SQL front end better than a (already provided) front end for
windows account management?? What do you mean by "sitting at the server"
- as is said you can use AD groups and this all works remotely.

Of course, you can do that - do you want to switch completely to sql based
user account management do you just want to store the roles in sql?
---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com

> The problem is not how to use <authorization> the problem is how do
> you maintain the listing of windows users and groups which
> <authorization> depends on. Sitting at the server and adding 500
> users to a "toolXUser" group for a toolX web application seems a bit
> much. I would like to maintain this listing of groups in a SQL
> database so that I can build my own front end for maintaining the
> users and groups. Is this where I need to build up my own
> GenericPrincipal ? Any thoughts are appreciated.
>
> Thanks
>



 
Reply With Quote
 
jfer
Guest
Posts: n/a
 
      09-16-2005
Yes I want to store the roles in SQL but I am having problems
understanding how to attach the roles to the user. I was initially
using Forms Authentication and the new RoleManager aspect of ASP.NET
2.0 to pull roles from SQL for users. However I realized forms
authentication is not a viable solution to another aspect of my tool so
I need windows authentication with the rolemanager for authorization
elements. Is it possible to mix these? Thanks for insight

 
Reply With Quote
 
jfer
Guest
Posts: n/a
 
      09-16-2005
Just to clarify I want to use windows authentication in my web
application but I want to maintain and attach my own roles to the user
pulled from an SQL database. Theres plenty of examples on the web
showing how to do this with Forms Authentication but I cannot seem to
find any using Windows Authentication.

Thanks

 
Reply With Quote
 
Dominick Baier [DevelopMentor]
Guest
Posts: n/a
 
      09-16-2005
Hello jfer,

in Authenticate_Request

// get the roles
string[] roles = _getRoles(Context.User.Identity.Name);

// create new prinicipal
GenericPrincipal p = new GenericPrincipal(Context.User.Identity, roles);

// set new user
Context.User = p;
---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com

> Yes I want to store the roles in SQL but I am having problems
> understanding how to attach the roles to the user. I was initially
> using Forms Authentication and the new RoleManager aspect of ASP.NET
> 2.0 to pull roles from SQL for users. However I realized forms
> authentication is not a viable solution to another aspect of my tool
> so I need windows authentication with the rolemanager for
> authorization elements. Is it possible to mix these? Thanks for
> insight
>



 
Reply With Quote
 
jfer
Guest
Posts: n/a
 
      09-19-2005
I am using the new asp.net role manager/provider to obtain and link a
user to roles. My problem is the authentication portion of the system
now. In asp.net 2.0 how do you hook into the Authenticate_Request
portion of the pipeline? Is this done through an HTTPModule? Again
appreciate the help. Thanks

 
Reply With Quote
 
Dominick Baier [DevelopMentor]
Guest
Posts: n/a
 
      09-19-2005
Hello jfer,

ah ok - important info...

no -the sql role provide assumes forms authentication.

either you write your own role provider, or you disable role provider and
do it in authenticate_request as i showed you - the heavy lifting has to
be done in the getRoles method.

Just add a Authenticate_Request method to global.asax or write a HttpModule.

---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com

> I am using the new asp.net role manager/provider to obtain and link a
> user to roles. My problem is the authentication portion of the system
> now. In asp.net 2.0 how do you hook into the Authenticate_Request
> portion of the pipeline? Is this done through an HTTPModule? Again
> appreciate the help. Thanks
>



 
Reply With Quote
 
jfer
Guest
Posts: n/a
 
      09-20-2005
I have created my own role provider by extending the SqlRoleProvider
class as I did not want to be stuck to Microsoft's backend database.
So far it seems I am able to mix Windows authentication with a role
provider (without using forms authentication) as my <allow
roles="someRole"> are correctly authorizing from the web.config. Just
thought I'd share that.

Cheers

 
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
J2EE module / library for user management, authentication, ACL etcwith Tomcat? Ramon Java 5 03-25-2010 12:47 PM
User Management and Authentication with Perl Ilias Lazaridis Perl Misc 4 06-28-2007 11:16 AM
Membership and Role Management With Windows Authentication Mike Robbins ASP .Net Security 1 03-10-2006 06:33 AM
Cisco CW Campus Manager, CW Common Service, CW Device Fault Manager, CW Recource Manager Essentials, NGenious RealTime Monitor, CiscoWorks Routed WAN Management Solution v1.3 [3 CDs], CiscoWorks VPN_Security Management Solution v2.2, CiscoWorks QoS P astra35 Cisco 0 05-19-2004 01:01 PM
CatOS web management or CiscoView management ? Martin Bilgrav Cisco 1 12-20-2003 01:49 PM



Advertisments