Customizable Role-based Authorization

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default Customizable Role-based Authorization

    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 Guest

  2. Similar Questions and Discussions

    1. Role authorization
      I use custom authentication and I set the identity with following line FormsAuthentication.SetAuthCookie(username.Text, False) How do I set the...
    2. Role-Based Authorization
      I am using ASP.NET and Access as the database. I would like to use role-based authorization for the login page. Can anyone help me?
    3. How do you set Role-Based authorization for Windows Authentication?
      I am working on a company ASP.NET Intranet web application. I am using IBuySpy protal as my "go-by". It uses Forms authentication. I changed it...
    4. Role Based Solution - Help
      Hi I am trying to decide on the best way to implement a role based security solution for a dotNET website. I am keen to use the Identities,...
  3. #2

    Default Re: Customizable Role-based Authorization

    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
    [url]http://www.leastprivilege.com[/url]
    > 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] Guest

  4. #3

    Default Re: Customizable Role-based Authorization

    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 Guest

  5. #4

    Default Re: Customizable Role-based Authorization

    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
    [url]http://www.leastprivilege.com[/url]
    > 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] Guest

  6. #5

    Default Re: Customizable Role-based Authorization

    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 Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

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 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139