Customizable Role-based Authorization

Discussion in 'ASP .Net Security' started by Snig, Apr 25, 2005.

  1. Snig

    Snig Guest

    Hi all

    I need to implement the following scenario in my application:
    1. Roles are stored in SQL-SERVER.
    2. Access Rights will be given to the roles by the administrator by the
    application itself.
    3. Access Rights will be given on functionality basis. e.g. some role
    can Add a new record, some can search for some particular records, some
    can update it etc. We have these functionality implemented by standard
    buttons in pages. Let's call these as "Access Areas".
    4. There are huge number of such Access Areas to be implemented in
    various pages. Though they are finite (means administrator cannot
    create/delete these access areas), but he can change the permission
    over an Aceess Area to a role.

    Solutions I thought:
    1. I can, of course, write few lines in individual pages, read the
    settings from database and apply. But I want to do this centrally, like
    in application_authorizerequest event of global.asax file.
    2. I can create custom/user controls for each of the Access Areas and
    implement security model onto that. But, we have developed the
    application too far before the customer has made this request.

    In this scenario, can somebody help me about how should I design the
    security model?

    Thanks
    Snig.
    Snig, Apr 25, 2005
    #1
    1. Advertising

  2. Hello Snig,

    I would go for Application_AuthorizeRequest - this can be global.asax or
    better a HttpModule which handles this event.

    You have everything you need to know at this stage - requested page and username
    as known to the application.

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

    > Hi all
    >
    > I need to implement the following scenario in my application:
    > 1. Roles are stored in SQL-SERVER.
    > 2. Access Rights will be given to the roles by the administrator by
    > the
    > application itself.
    > 3. Access Rights will be given on functionality basis. e.g. some role
    > can Add a new record, some can search for some particular records,
    > some
    > can update it etc. We have these functionality implemented by standard
    > buttons in pages. Let's call these as "Access Areas".
    > 4. There are huge number of such Access Areas to be implemented in
    > various pages. Though they are finite (means administrator cannot
    > create/delete these access areas), but he can change the permission
    > over an Aceess Area to a role.
    > Solutions I thought:
    > 1. I can, of course, write few lines in individual pages, read the
    > settings from database and apply. But I want to do this centrally,
    > like
    > in application_authorizerequest event of global.asax file.
    > 2. I can create custom/user controls for each of the Access Areas and
    > implement security model onto that. But, we have developed the
    > application too far before the customer has made this request.
    > In this scenario, can somebody help me about how should I design the
    > security model?
    >
    > Thanks
    > Snig.
    Dominick Baier [DevelopMentor], Apr 25, 2005
    #2
    1. Advertising

  3. Snig

    Snig Guest

    Thanks Baier.

    Well, in Application_AuthorizeRequest event, I do have the requested
    page, username etc. But how can I enable/disable the controls of that
    page depending on the settings in this event?
    Please note that the authorization should be applied on control/field
    level instead of the whole page ...

    Snig.
    Snig, Apr 25, 2005
    #3
  4. Hello Snig,

    aah - i see.

    In that case you will have to do it on the page - other things to think about

    factor the links out to a ASCX file, or use a new base class (derived from
    page) to do the common stuff.

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

    > Thanks Baier.
    >
    > Well, in Application_AuthorizeRequest event, I do have the requested
    > page, username etc. But how can I enable/disable the controls of that
    > page depending on the settings in this event?
    > Please note that the authorization should be applied on control/field
    > level instead of the whole page ...
    > Snig.
    >
    Dominick Baier [DevelopMentor], Apr 26, 2005
    #4
  5. Snig

    Snig Guest

    Yes, thats seems to be a work-around ...

    the problem is we didn't architected the application in this way, as
    this security framework is a new requirement from the customer.

    thanks Baier, is there some other ways ?

    Snig.
    Snig, Apr 27, 2005
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?UFRC?=

    Role-Based Authorization

    =?Utf-8?B?UFRC?=, Apr 17, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    416
    Steve C. Orr [MVP, MCSD]
    Apr 17, 2004
  2. Snig
    Replies:
    5
    Views:
    2,237
    Steve C. Orr [MVP, MCSD]
    Apr 25, 2005
  3. Chris
    Replies:
    0
    Views:
    362
    Chris
    Dec 21, 2006
  4. Bob Osborne
    Replies:
    0
    Views:
    211
    Bob Osborne
    Nov 18, 2003
  5. Kursat
    Replies:
    1
    Views:
    315
    Dominick Baier
    May 7, 2007
Loading...

Share This Page