SQL App roles and intranet

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default SQL App roles and intranet

    Hi,

    I have been charged with redesigning my companys intranet.
    The Intranet uses sql server as the backend db. Currently the intanet uses
    windows authentication.
    Access to the tables from the asp code is via a combination of sp's and
    direct "select" "update" "delete" and update statements.
    Obviously this means that permissions are granted directly to users to
    execute the sp's and direct permissions on tables is given.
    I am pretty sure that I will rewrite all of the direct queries from the asp
    code to use sp's, and remove direct permissions from the users.

    It is a requirement, from management that users should not be able to access
    the database using tools such as EM.
    Obviously, putting all of the deirect access into sp's solves security up to
    a point but would the use of application roles to better in this situation?

    As the connections in an internet/intranet application should be open as
    short as possible this would mean.

    Connecting to the database.
    issuing a call to the sp to invoke the app role.
    doing the needed database access
    closing the connection.

    is this a viable thing to do in an intranet app. The current intranet app
    uses purely sql authentication to access the database.
    I also need to grab the user name for auditing purposes so I was thinking of
    connectng with windows authentication, giving the user access to only
    connect to the database and call the one sp to invoke the app role, I
    believe that the user name will still be stored in the SUSER_SNAME variable,
    and the just apply.

    has anybody experience a situation like this before, and could offer advice
    on how to handle it.

    cheers

    martin


    Martin de vroom Guest

  2. Similar Questions and Discussions

    1. Need news box for intranet
      I'm trying to find some way to recreate the type of news box used on www.msn.box where photos and related teaser text fade in. I'd like it to pull...
    2. Intranet site
      Hi everyone, i'm currently working on my company intranet site. I'm looking for something that has a calendar, user admin, project management, and...
    3. IntraNet Authentication
      Hello all, I hope my question is not too basic. I am working on an intranet and would like to avoid prompting users for a login. I know that...
    4. Intranet to Internet
      Dear Friends I am new to web development. We have made a web application which is currently running on intranet.Now we want to run this...
    5. Forms to be used on intranet
      Read up on data access pages...here's one article to get ya' started: http://support.microsoft.com/default.aspx?...
  3. #2

    Default Re: SQL App roles and intranet

    You can use trusted connections (in your conn string) and accomplish exactly
    the thing you are looking for. Just make sure the anonymous/Basic
    authentications for the app are turned off in IIS settings.

    --
    Manohar Kamath
    Editor, .netBooks
    [url]www.dotnetbooks.com[/url]


    "Martin de vroom" <martindevroom@hotmail.com> wrote in message
    news:e#wDqd6QDHA.2176@TK2MSFTNGP12.phx.gbl...
    > Hi,
    >
    > I have been charged with redesigning my companys intranet.
    > The Intranet uses sql server as the backend db. Currently the intanet uses
    > windows authentication.
    > Access to the tables from the asp code is via a combination of sp's and
    > direct "select" "update" "delete" and update statements.
    > Obviously this means that permissions are granted directly to users to
    > execute the sp's and direct permissions on tables is given.
    > I am pretty sure that I will rewrite all of the direct queries from the
    asp
    > code to use sp's, and remove direct permissions from the users.
    >
    > It is a requirement, from management that users should not be able to
    access
    > the database using tools such as EM.
    > Obviously, putting all of the deirect access into sp's solves security up
    to
    > a point but would the use of application roles to better in this
    situation?
    >
    > As the connections in an internet/intranet application should be open as
    > short as possible this would mean.
    >
    > Connecting to the database.
    > issuing a call to the sp to invoke the app role.
    > doing the needed database access
    > closing the connection.
    >
    > is this a viable thing to do in an intranet app. The current intranet app
    > uses purely sql authentication to access the database.
    > I also need to grab the user name for auditing purposes so I was thinking
    of
    > connectng with windows authentication, giving the user access to only
    > connect to the database and call the one sp to invoke the app role, I
    > believe that the user name will still be stored in the SUSER_SNAME
    variable,
    > and the just apply.
    >
    > has anybody experience a situation like this before, and could offer
    advice
    > on how to handle it.
    >
    > cheers
    >
    > martin
    >
    >

    Manohar Kamath [MVP] Guest

  4. #3

    Default Re: SQL App roles and intranet

    Hi Manohar,

    Thanks for replying, I'm not sure I follow you. If I use NTLM
    authentication from the web app then I can pick up the users login and use a
    trusted connection to sql server. That is cool.

    However I do NOT want to grant permissions to that particular person in the
    db. But I want the db to know the user name so that I can audit in the
    database.

    So in order to let the db know the user name I must use a trusted login but
    ONLY to connect, as soon as I connect I wish to activate an app role.

    I guess my question is.

    Is it a good idea to use application roles in web apps?

    cheers

    martin.

    "Manohar Kamath [MVP]" <mkamath@TAKETHISOUTkamath.com> wrote in message
    news:OmCFX0GRDHA.704@tk2msftngp13.phx.gbl...
    > You can use trusted connections (in your conn string) and accomplish
    exactly
    > the thing you are looking for. Just make sure the anonymous/Basic
    > authentications for the app are turned off in IIS settings.
    >
    > --
    > Manohar Kamath
    > Editor, .netBooks
    > [url]www.dotnetbooks.com[/url]
    >
    >
    > "Martin de vroom" <martindevroom@hotmail.com> wrote in message
    > news:e#wDqd6QDHA.2176@TK2MSFTNGP12.phx.gbl...
    > > Hi,
    > >
    > > I have been charged with redesigning my companys intranet.
    > > The Intranet uses sql server as the backend db. Currently the intanet
    uses
    > > windows authentication.
    > > Access to the tables from the asp code is via a combination of sp's and
    > > direct "select" "update" "delete" and update statements.
    > > Obviously this means that permissions are granted directly to users to
    > > execute the sp's and direct permissions on tables is given.
    > > I am pretty sure that I will rewrite all of the direct queries from the
    > asp
    > > code to use sp's, and remove direct permissions from the users.
    > >
    > > It is a requirement, from management that users should not be able to
    > access
    > > the database using tools such as EM.
    > > Obviously, putting all of the deirect access into sp's solves security
    up
    > to
    > > a point but would the use of application roles to better in this
    > situation?
    > >
    > > As the connections in an internet/intranet application should be open as
    > > short as possible this would mean.
    > >
    > > Connecting to the database.
    > > issuing a call to the sp to invoke the app role.
    > > doing the needed database access
    > > closing the connection.
    > >
    > > is this a viable thing to do in an intranet app. The current intranet
    app
    > > uses purely sql authentication to access the database.
    > > I also need to grab the user name for auditing purposes so I was
    thinking
    > of
    > > connectng with windows authentication, giving the user access to only
    > > connect to the database and call the one sp to invoke the app role, I
    > > believe that the user name will still be stored in the SUSER_SNAME
    > variable,
    > > and the just apply.
    > >
    > > has anybody experience a situation like this before, and could offer
    > advice
    > > on how to handle it.
    > >
    > > cheers
    > >
    > > martin
    > >
    > >
    >
    >

    martin de vroom 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