Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > What is the best approach?

Reply
Thread Tools

What is the best approach?

 
 
Andrew
Guest
Posts: n/a
 
      12-21-2005
Hello, friends,

I implemented Forms Authentication in my asp.net app, it worked fine.
However, now I have another problem:

Although a user can be authenticated, but he/she may still not be allowed to
view certain pages and folders. For exampl, a junior member can not view
pages for senior memebers, although he/she can log into the web site. What is
the best approach to do this?

Any reference papers, sample code? Thanks.
 
Reply With Quote
 
 
 
 
Dominick Baier [DevelopMentor]
Guest
Posts: n/a
 
      12-21-2005
Hello Andrew,

have a look at the <authorization> element in web.config.


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

> Hello, friends,
>
> I implemented Forms Authentication in my asp.net app, it worked fine.
> However, now I have another problem:
>
> Although a user can be authenticated, but he/she may still not be
> allowed to view certain pages and folders. For exampl, a junior member
> can not view pages for senior memebers, although he/she can log into
> the web site. What is the best approach to do this?
>
> Any reference papers, sample code? Thanks.
>



 
Reply With Quote
 
 
 
 
Andrew
Guest
Posts: n/a
 
      12-21-2005
<configuration>
<system.web>
<authorization>
<deny users="*"/>
<allow roles="Admins"/>
</authorization>
</system.web>
</configuration>

this requires me "manually" add each new registered members into a
predefined role, say "Junior", "Senior", right?

"Dominick Baier [DevelopMentor]" wrote:

> Hello Andrew,
>
> have a look at the <authorization> element in web.config.
>
>
> ---------------------------------------
> Dominick Baier - DevelopMentor
> http://www.leastprivilege.com
>
> > Hello, friends,
> >
> > I implemented Forms Authentication in my asp.net app, it worked fine.
> > However, now I have another problem:
> >
> > Although a user can be authenticated, but he/she may still not be
> > allowed to view certain pages and folders. For exampl, a junior member
> > can not view pages for senior memebers, although he/she can log into
> > the web site. What is the best approach to do this?
> >
> > Any reference papers, sample code? Thanks.
> >

>
>
>

 
Reply With Quote
 
Dominick Baier [DevelopMentor]
Guest
Posts: n/a
 
      12-21-2005
Hello Andrew,

right

also read this:
http://www.leastprivilege.com/ASPNET...nSettings.aspx
---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com

> <configuration>
> <system.web>
> <authorization>
> <deny users="*"/>
> <allow roles="Admins"/>
> </authorization>
> </system.web>
> </configuration>
> this requires me "manually" add each new registered members into a
> predefined role, say "Junior", "Senior", right?
>
> "Dominick Baier [DevelopMentor]" wrote:
>
>> Hello Andrew,
>>
>> have a look at the <authorization> element in web.config.
>>
>> ---------------------------------------
>> Dominick Baier - DevelopMentor
>> http://www.leastprivilege.com
>>> Hello, friends,
>>>
>>> I implemented Forms Authentication in my asp.net app, it worked
>>> fine. However, now I have another problem:
>>>
>>> Although a user can be authenticated, but he/she may still not be
>>> allowed to view certain pages and folders. For exampl, a junior
>>> member can not view pages for senior memebers, although he/she can
>>> log into the web site. What is the best approach to do this?
>>>
>>> Any reference papers, sample code? Thanks.
>>>



 
Reply With Quote
 
Andrew
Guest
Posts: n/a
 
      12-21-2005
That is not good to us:

After a user (a Junior) registered in my website, he/she should be able to
access all pages, except pages for Senior members, right away.

He/she can not wait for us to manually add them into a role, because we may
not check new member for days.

Any other automatic ways? Thanks...

"Dominick Baier [DevelopMentor]" wrote:

> Hello Andrew,
>
> right
>
> also read this:
> http://www.leastprivilege.com/ASPNET...nSettings.aspx
> ---------------------------------------
> Dominick Baier - DevelopMentor
> http://www.leastprivilege.com
>
> > <configuration>
> > <system.web>
> > <authorization>
> > <deny users="*"/>
> > <allow roles="Admins"/>
> > </authorization>
> > </system.web>
> > </configuration>
> > this requires me "manually" add each new registered members into a
> > predefined role, say "Junior", "Senior", right?
> >
> > "Dominick Baier [DevelopMentor]" wrote:
> >
> >> Hello Andrew,
> >>
> >> have a look at the <authorization> element in web.config.
> >>
> >> ---------------------------------------
> >> Dominick Baier - DevelopMentor
> >> http://www.leastprivilege.com
> >>> Hello, friends,
> >>>
> >>> I implemented Forms Authentication in my asp.net app, it worked
> >>> fine. However, now I have another problem:
> >>>
> >>> Although a user can be authenticated, but he/she may still not be
> >>> allowed to view certain pages and folders. For exampl, a junior
> >>> member can not view pages for senior memebers, although he/she can
> >>> log into the web site. What is the best approach to do this?
> >>>
> >>> Any reference papers, sample code? Thanks.
> >>>

>
>
>

 
Reply With Quote
 
Joe Kaplan \(MVP - ADSI\)
Guest
Posts: n/a
 
      12-21-2005
This depends on how your roles are being generated and how your identity
lifecycle works. For example, if you store your users in SQL and keep your
role definitions in SQL, then the user would just need to do something that
would trigger their addition to the new role. Then, a new logon should give
them the new role.

If you were using Windows authentication, then the role membership would
come directly from the user's AD groups.

The bottom line is that you can make it work however you want. The key is
to getting the users in the right roles and having that data provided to the
forms authentication system. The <authorization> element is just a nice way
to declaratively determine who gets to access to what using the built-in
UrlAuthorizationModule.

Joe K.

"Andrew" <> wrote in message
news:E29C5839-EA3F-4CEB-B334-...
> That is not good to us:
>
> After a user (a Junior) registered in my website, he/she should be able to
> access all pages, except pages for Senior members, right away.
>
> He/she can not wait for us to manually add them into a role, because we
> may
> not check new member for days.
>
> Any other automatic ways? Thanks...
>
> "Dominick Baier [DevelopMentor]" wrote:
>
>> Hello Andrew,
>>
>> right
>>
>> also read this:
>> http://www.leastprivilege.com/ASPNET...nSettings.aspx
>> ---------------------------------------
>> Dominick Baier - DevelopMentor
>> http://www.leastprivilege.com
>>
>> > <configuration>
>> > <system.web>
>> > <authorization>
>> > <deny users="*"/>
>> > <allow roles="Admins"/>
>> > </authorization>
>> > </system.web>
>> > </configuration>
>> > this requires me "manually" add each new registered members into a
>> > predefined role, say "Junior", "Senior", right?
>> >
>> > "Dominick Baier [DevelopMentor]" wrote:
>> >
>> >> Hello Andrew,
>> >>
>> >> have a look at the <authorization> element in web.config.
>> >>
>> >> ---------------------------------------
>> >> Dominick Baier - DevelopMentor
>> >> http://www.leastprivilege.com
>> >>> Hello, friends,
>> >>>
>> >>> I implemented Forms Authentication in my asp.net app, it worked
>> >>> fine. However, now I have another problem:
>> >>>
>> >>> Although a user can be authenticated, but he/she may still not be
>> >>> allowed to view certain pages and folders. For exampl, a junior
>> >>> member can not view pages for senior memebers, although he/she can
>> >>> log into the web site. What is the best approach to do this?
>> >>>
>> >>> Any reference papers, sample code? Thanks.
>> >>>

>>
>>
>>



 
Reply With Quote
 
Dominick Baier [DevelopMentor]
Guest
Posts: n/a
 
      12-21-2005
Hello Andrew,

why not add them to a role programmatically upon registration?
---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com

> That is not good to us:
>
> After a user (a Junior) registered in my website, he/she should be
> able to access all pages, except pages for Senior members, right away.
>
> He/she can not wait for us to manually add them into a role, because
> we may not check new member for days.
>
> Any other automatic ways? Thanks...
>
> "Dominick Baier [DevelopMentor]" wrote:
>
>> Hello Andrew,
>>
>> right
>>
>> also read this:
>> http://www.leastprivilege.com/ASPNET...nSettings.aspx
>> ---------------------------------------
>> Dominick Baier - DevelopMentor
>> http://www.leastprivilege.com
>>> <configuration>
>>> <system.web>
>>> <authorization>
>>> <deny users="*"/>
>>> <allow roles="Admins"/>
>>> </authorization>
>>> </system.web>
>>> </configuration>
>>> this requires me "manually" add each new registered members into a
>>> predefined role, say "Junior", "Senior", right?
>>> "Dominick Baier [DevelopMentor]" wrote:
>>>
>>>> Hello Andrew,
>>>>
>>>> have a look at the <authorization> element in web.config.
>>>>
>>>> ---------------------------------------
>>>> Dominick Baier - DevelopMentor
>>>> http://www.leastprivilege.com
>>>>> Hello, friends,
>>>>>
>>>>> I implemented Forms Authentication in my asp.net app, it worked
>>>>> fine. However, now I have another problem:
>>>>>
>>>>> Although a user can be authenticated, but he/she may still not be
>>>>> allowed to view certain pages and folders. For exampl, a junior
>>>>> member can not view pages for senior memebers, although he/she can
>>>>> log into the web site. What is the best approach to do this?
>>>>>
>>>>> Any reference papers, sample code? Thanks.
>>>>>



 
Reply With Quote
 
Andrew
Guest
Posts: n/a
 
      12-21-2005
good idea, and how,
any sample source code or reference papers?
thanks....

"Dominick Baier [DevelopMentor]" wrote:

> Hello Andrew,
>
> why not add them to a role programmatically upon registration?
> ---------------------------------------
> Dominick Baier - DevelopMentor
> http://www.leastprivilege.com
>
> > That is not good to us:
> >
> > After a user (a Junior) registered in my website, he/she should be
> > able to access all pages, except pages for Senior members, right away.
> >
> > He/she can not wait for us to manually add them into a role, because
> > we may not check new member for days.
> >
> > Any other automatic ways? Thanks...
> >
> > "Dominick Baier [DevelopMentor]" wrote:
> >
> >> Hello Andrew,
> >>
> >> right
> >>
> >> also read this:
> >> http://www.leastprivilege.com/ASPNET...nSettings.aspx
> >> ---------------------------------------
> >> Dominick Baier - DevelopMentor
> >> http://www.leastprivilege.com
> >>> <configuration>
> >>> <system.web>
> >>> <authorization>
> >>> <deny users="*"/>
> >>> <allow roles="Admins"/>
> >>> </authorization>
> >>> </system.web>
> >>> </configuration>
> >>> this requires me "manually" add each new registered members into a
> >>> predefined role, say "Junior", "Senior", right?
> >>> "Dominick Baier [DevelopMentor]" wrote:
> >>>
> >>>> Hello Andrew,
> >>>>
> >>>> have a look at the <authorization> element in web.config.
> >>>>
> >>>> ---------------------------------------
> >>>> Dominick Baier - DevelopMentor
> >>>> http://www.leastprivilege.com
> >>>>> Hello, friends,
> >>>>>
> >>>>> I implemented Forms Authentication in my asp.net app, it worked
> >>>>> fine. However, now I have another problem:
> >>>>>
> >>>>> Although a user can be authenticated, but he/she may still not be
> >>>>> allowed to view certain pages and folders. For exampl, a junior
> >>>>> member can not view pages for senior memebers, although he/she can
> >>>>> log into the web site. What is the best approach to do this?
> >>>>>
> >>>>> Any reference papers, sample code? Thanks.
> >>>>>

>
>
>

 
Reply With Quote
 
Andrew
Guest
Posts: n/a
 
      12-21-2005
any reference papers that contain more details on what you mentioned?

thanks...

"Joe Kaplan (MVP - ADSI)" wrote:

> This depends on how your roles are being generated and how your identity
> lifecycle works. For example, if you store your users in SQL and keep your
> role definitions in SQL, then the user would just need to do something that
> would trigger their addition to the new role. Then, a new logon should give
> them the new role.
>
> If you were using Windows authentication, then the role membership would
> come directly from the user's AD groups.
>
> The bottom line is that you can make it work however you want. The key is
> to getting the users in the right roles and having that data provided to the
> forms authentication system. The <authorization> element is just a nice way
> to declaratively determine who gets to access to what using the built-in
> UrlAuthorizationModule.
>
> Joe K.
>
> "Andrew" <> wrote in message
> news:E29C5839-EA3F-4CEB-B334-...
> > That is not good to us:
> >
> > After a user (a Junior) registered in my website, he/she should be able to
> > access all pages, except pages for Senior members, right away.
> >
> > He/she can not wait for us to manually add them into a role, because we
> > may
> > not check new member for days.
> >
> > Any other automatic ways? Thanks...
> >
> > "Dominick Baier [DevelopMentor]" wrote:
> >
> >> Hello Andrew,
> >>
> >> right
> >>
> >> also read this:
> >> http://www.leastprivilege.com/ASPNET...nSettings.aspx
> >> ---------------------------------------
> >> Dominick Baier - DevelopMentor
> >> http://www.leastprivilege.com
> >>
> >> > <configuration>
> >> > <system.web>
> >> > <authorization>
> >> > <deny users="*"/>
> >> > <allow roles="Admins"/>
> >> > </authorization>
> >> > </system.web>
> >> > </configuration>
> >> > this requires me "manually" add each new registered members into a
> >> > predefined role, say "Junior", "Senior", right?
> >> >
> >> > "Dominick Baier [DevelopMentor]" wrote:
> >> >
> >> >> Hello Andrew,
> >> >>
> >> >> have a look at the <authorization> element in web.config.
> >> >>
> >> >> ---------------------------------------
> >> >> Dominick Baier - DevelopMentor
> >> >> http://www.leastprivilege.com
> >> >>> Hello, friends,
> >> >>>
> >> >>> I implemented Forms Authentication in my asp.net app, it worked
> >> >>> fine. However, now I have another problem:
> >> >>>
> >> >>> Although a user can be authenticated, but he/she may still not be
> >> >>> allowed to view certain pages and folders. For exampl, a junior
> >> >>> member can not view pages for senior memebers, although he/she can
> >> >>> log into the web site. What is the best approach to do this?
> >> >>>
> >> >>> Any reference papers, sample code? Thanks.
> >> >>>
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
Joe Kaplan \(MVP - ADSI\)
Guest
Posts: n/a
 
      12-21-2005
I think a Google search on "designing role-based authorization .NET" will
get you started. There are also many great books around.

Joe K.

"Andrew" <> wrote in message
news:047C97DD-C10F-4765-B8CA-...
> any reference papers that contain more details on what you mentioned?
>
> thanks...
>
> "Joe Kaplan (MVP - ADSI)" wrote:
>
>> This depends on how your roles are being generated and how your identity
>> lifecycle works. For example, if you store your users in SQL and keep
>> your
>> role definitions in SQL, then the user would just need to do something
>> that
>> would trigger their addition to the new role. Then, a new logon should
>> give
>> them the new role.
>>
>> If you were using Windows authentication, then the role membership would
>> come directly from the user's AD groups.
>>
>> The bottom line is that you can make it work however you want. The key
>> is
>> to getting the users in the right roles and having that data provided to
>> the
>> forms authentication system. The <authorization> element is just a nice
>> way
>> to declaratively determine who gets to access to what using the built-in
>> UrlAuthorizationModule.
>>
>> Joe K.
>>
>> "Andrew" <> wrote in message
>> news:E29C5839-EA3F-4CEB-B334-...
>> > That is not good to us:
>> >
>> > After a user (a Junior) registered in my website, he/she should be able
>> > to
>> > access all pages, except pages for Senior members, right away.
>> >
>> > He/she can not wait for us to manually add them into a role, because we
>> > may
>> > not check new member for days.
>> >
>> > Any other automatic ways? Thanks...
>> >
>> > "Dominick Baier [DevelopMentor]" wrote:
>> >
>> >> Hello Andrew,
>> >>
>> >> right
>> >>
>> >> also read this:
>> >> http://www.leastprivilege.com/ASPNET...nSettings.aspx
>> >> ---------------------------------------
>> >> Dominick Baier - DevelopMentor
>> >> http://www.leastprivilege.com
>> >>
>> >> > <configuration>
>> >> > <system.web>
>> >> > <authorization>
>> >> > <deny users="*"/>
>> >> > <allow roles="Admins"/>
>> >> > </authorization>
>> >> > </system.web>
>> >> > </configuration>
>> >> > this requires me "manually" add each new registered members into a
>> >> > predefined role, say "Junior", "Senior", right?
>> >> >
>> >> > "Dominick Baier [DevelopMentor]" wrote:
>> >> >
>> >> >> Hello Andrew,
>> >> >>
>> >> >> have a look at the <authorization> element in web.config.
>> >> >>
>> >> >> ---------------------------------------
>> >> >> Dominick Baier - DevelopMentor
>> >> >> http://www.leastprivilege.com
>> >> >>> Hello, friends,
>> >> >>>
>> >> >>> I implemented Forms Authentication in my asp.net app, it worked
>> >> >>> fine. However, now I have another problem:
>> >> >>>
>> >> >>> Although a user can be authenticated, but he/she may still not be
>> >> >>> allowed to view certain pages and folders. For exampl, a junior
>> >> >>> member can not view pages for senior memebers, although he/she can
>> >> >>> log into the web site. What is the best approach to do this?
>> >> >>>
>> >> >>> Any reference papers, sample code? 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
Canon wins Award for Best Professional D-SLR, best Prosumer D-SLR (EOS 1Ds, EOS-10D) George Preddy Digital Photography 3 05-24-2004 03:29 AM
Where is best place for best price buying Mobo & CPU combo? Arawak Computer Support 6 02-05-2004 04:46 PM
Viewers are the best albums! Best digital photo & picture organizing Morgan Ohlson Digital Photography 8 01-05-2004 09:25 PM
Re: Best Buy No Longer A "Best" Buy - At Least Not At Brooklyn NYC Store Mike & Jane Digital Photography 5 08-15-2003 12:57 AM
Best sample app for learning best practices, OO & asp.net? karim ASP .Net 0 07-13-2003 04:26 AM



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