Re: Roles - Access Rule Storage



You might also want to look at the Authorization Manager (AzMan) API if you
want something very flexible and powerful for doing role-based authorization
in an application. I'm not exactly sure how I would apply it given what I
know about your app (not much :)), but it is good to know about.

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
--
"Matt" <mdframe@xxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:uUC4Tw$uGHA.4436@xxxxxxxxxxxxxxxxxxxxxxx
Joe,

WOW, quick response!

You hit the nail on the head. I want to use a table for URL and file
authorization. I have read a ton about Membership and Roles and custom
providers and not one mentioned the UrlAuthorizationModule. I will look
into finding the namespace to find the dll and definitly will fire up
reflector to see what is going on.

I am working on an application that 42 different organization units will be
using from the same site and none of them want to use the same role names.
I began thinking that even if they only have 5 roles per organization that
it will become a nightmare to maintain the roles via web.config files.

Thanks again,

Matt


"Joe Kaplan (MVP - ADSI)" <joseph.e.kaplan@xxxxxxxxxxxxxxxxxxxxxxxx> wrote
in message news:uybUgq$uGHA.3964@xxxxxxxxxxxxxxxxxxxxxxx
Are you talking about the roles that are applied to the user who is
authenticated, or are you talking about the authorization policy that is
applied to any given URL in terms of who can access it?

If you want to make the latter dynamic, you can just code this in your pages
directly or write your own HTTP Module that does it. If you look at the

(use Reflector to see the code), you can see how it
reads in the authorization configuration applied to the current URL path and
then decides whether the current user has access or not. You could do the
exact same thing in your module, but store the authorization policy in the
database instead and look it up by URL or something. After that, applying
the policy and doing the proper responses is easy and something you could
basically copy from Microsoft's code.

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
--
"Matt" <mdframe@xxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:uZRFch$uGHA.1956@xxxxxxxxxxxxxxxxxxxxxxx
Can anyone tell me if is is possible to override how a web application
stores/retrieves the Access Rules for roles? Instead of using the
web.config to store the following:

<system.web>
<authorization>
<allow roles="Admin" />
</authorization>
</system.web>

I would like to store this information in a database table and have the
system pull the access role from the table when needed.

Thanks,

Matt


.



Relevant Pages

  • Re: Roles - Access Rule Storage
    ... The suggestion with Reflector was mostly just to look at the code to see how ... Joe Kaplan-MS MVP Directory Services Programming ... Co-author of "The .NET Developer's Guide to Directory Services Programming" ... You might also want to look at the Authorization Manager API if you ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Form authentication and files that shouldny be authenticated
    ... Joe Kaplan-MS MVP Directory Services Programming ... Co-author of "The .NET Developer's Guide to Directory Services Programming" ... clients, should be able to visit them. ...
    (microsoft.public.dotnet.security)
  • Re: authorization location override
    ... location tag on just the folder path, does that give you the desired ... Co-author of "The .NET Developer's Guide to Directory Services Programming" ... location override doesn't allow all identities like it should. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: How to run as in a deamon
    ... Have them set up the scheduled task to run as the required user. ... Joe Kaplan-MS MVP Directory Services Programming ... Co-author of "The .NET Developer's Guide to Directory Services Programming" ... Do we need to get their uname/pw and store it to be able to runAs them - ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Password Reset Self Service
    ... where will you store the answers? ... Creating a web page that does the password reset is quite easy. ... Joe Kaplan-MS MVP Directory Services Programming ... Co-author of "The .NET Developer's Guide to Directory Services Programming" ...
    (microsoft.public.windows.server.active_directory)