Probably a simple question

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

  1. #1

    Default Probably a simple question

    I want to pass the security credentials of the currenty logged on user with a Windows domain account to an asp.net web service. This security info then needs to be captured so that it may be used to authenticate against a SQL server database. Assuming it can be done, Can someone point me to the docs, a tutorial, or a sample that shows and/or discusses how to do this?

    Thanks in advance.
    Brian Cobb Guest

  2. Similar Questions and Discussions

    1. Need Simple Answer to Simple Contribute/Firefox question
      Hello all; I've tried the Adobe help in CS3, tech support, phone support, this forum, other forums, Mozilla, and nowhere can I get a straight...
    2. simple question
      Hi there, As an absolute beginner I have a simple question. I have a scene with two layers. Layer 1 should start again at frame 1 while Layer 2...
    3. SImple question?
      Can anyone please tell me how to keep 2 windows open so that as soon as I click on one of them, the other one does not minimise and have to be...
    4. another simple question.
      select from db where id = 3... if it doesn't exist, how can i display a message saying so. for example: "3" is not a valid selection. ...
    5. A simple question but ..
      Hi Can someone give me a link where i can see (and do it my self) how to create a shape tweening? (Flash MX) Yes i am a newbie but want to learn...
  3. #2

    Default Re: Probably a simple question

    check this kb article
    [url]http://support.microsoft.com/default.aspx?scid=kb;en-us;813834[/url]

    Av.

    "Brian Cobb" <brianc@newsgroups.nospam> wrote in message
    news:164C2AE3-3314-4884-AE0A-F6A34659A53A@microsoft.com...
    >I want to pass the security credentials of the currenty logged on user with
    >a Windows domain account to an asp.net web service. This security info
    >then needs to be captured so that it may be used to authenticate against a
    >SQL server database. Assuming it can be done, Can someone point me to the
    >docs, a tutorial, or a sample that shows and/or discusses how to do this?
    >
    >
    > Thanks in advance.

    avnrao Guest

  4. #3

    Default Re: Probably a simple question

    Thanks. That gets me authenticated to the web service, but how do I pass those credentials onto SQL? I realize I can impersonate a user; I've already successfully tried it. My first choice would be to pass the actual Windows user credentials of the current logged on user to SQL, though.

    (Integrated security=sspi works like a charm when I am doing this all locally, btw, i.e. my SQL connection happens in a method or an instance of another class.

    Whenever I try using integrated security in my connection string I always get back the message that it can't connect using
    NT Authority\Anoymous logon. The relevant Web.config entries appear to be

    <system.web><identity impersonate="true" /><authentication mode="windows" /><authorization><allow roles="servername\groupname" /><deny users="*" /></authorization
    ...



    ----- avnrao wrote: ----

    check this kb article
    [url]http://support.microsoft.com/default.aspx?scid=kb;en-us;81383[/url]

    Av

    "Brian Cobb" <brianc@newsgroups.nospam> wrote in message
    news:164C2AE3-3314-4884-AE0A-F6A34659A53A@microsoft.com..
    >I want to pass the security credentials of the currenty logged on user with
    >a Windows domain account to an asp.net web service. This security info
    >then needs to be captured so that it may be used to authenticate against a
    >SQL server database. Assuming it can be done, Can someone point me to the
    >docs, a tutorial, or a sample that shows and/or discusses how to do this
    >>> Thanks in advance.


    brianc@newsgroups.nospam Guest

  5. #4

    Default Re: Probably a simple question

    You need Kerberos delegation in order to be able to hop from machine to
    machine to machine or you need to ensure that you are securely transporting
    plain text credentials using something like Basic authentication and SSL.
    There are some good KB postings on Kerberos delegation that will be very
    helpful.

    Joe K.

    <brianc@newsgroups.nospam> wrote in message
    news:F7636473-4EF5-4C3F-9DD6-EB9ECBC8F839@microsoft.com...
    > Thanks. That gets me authenticated to the web service, but how do I pass
    those credentials onto SQL? I realize I can impersonate a user; I've
    already successfully tried it. My first choice would be to pass the actual
    Windows user credentials of the current logged on user to SQL, though.
    >
    > (Integrated security=sspi works like a charm when I am doing this all
    locally, btw, i.e. my SQL connection happens in a method or an instance of
    another class.)
    >
    > Whenever I try using integrated security in my connection string I always
    get back the message that it can't connect using
    > NT Authority\Anoymous logon. The relevant Web.config entries appear to be:
    >
    >
    > <system.web><identity impersonate="true" /><authentication mode="windows"
    /><authorization><allow roles="servername\groupname" /><deny users="*"
    /></authorization>
    > ...
    >
    >
    >
    >
    > ----- avnrao wrote: -----
    >
    > check this kb article
    > [url]http://support.microsoft.com/default.aspx?scid=kb;en-us;813834[/url]
    >
    > Av.
    >
    > "Brian Cobb" <brianc@newsgroups.nospam> wrote in message
    > news:164C2AE3-3314-4884-AE0A-F6A34659A53A@microsoft.com...
    > >I want to pass the security credentials of the currenty logged on
    user with
    > >a Windows domain account to an asp.net web service. This security
    info
    > >then needs to be captured so that it may be used to authenticate
    against a
    > >SQL server database. Assuming it can be done, Can someone point me
    to the
    > >docs, a tutorial, or a sample that shows and/or discusses how to do
    this?
    > >>> Thanks in advance.
    >
    >
    >

    Joe Kaplan \(MVP - ADSI\) Guest

  6. #5

    Default Re: Probably a simple question

    Brian,

    You are encountering the delegation issue. You can probably find a lot of
    similar posts if you search for "delegation", "SQL Server", "ASP.NET",
    "Kerberos", etc. In short, in a typical corporate environment you cannot do
    what you want. And by typical environment, I mean that you have three
    physical systems involved (Web browser, IIS, and SQL Server), which belong
    to an Active Directory domain, and your ASP.NET site is protected using
    integrated Windows authentication (IWA). Now, if instead of using IWA, you
    use basic authentication, it will work. It will also work if you move SQL
    Server or Web browser (either one) to the same machine where IIS runs. But
    if you do not do any of these changes you will run into the delegation
    problem. The problem here is that in a typical environment, impersonated
    credentials do not cross the machine boundary. So while IIS can recognize
    the user making the call and can use user's credentials for all local
    authorization calls, as soon as an outgoing call is made (to a SQL Server,
    Oracle, Web Service, or whatever), the credentials of IIS process (not
    impersonated user) will be passed. There is a way to allow passing
    impersonated credentials through the machine boundary (as Joe mentioned),
    but it requires changing domain security settings, which are generally not
    recommended. If you can and are planning to make these changes (to enable
    Kerberos delegation), you must be aware of the associated security risks.

    Alek

    <brianc@newsgroups.nospam> wrote in message
    news:F7636473-4EF5-4C3F-9DD6-EB9ECBC8F839@microsoft.com...
    > Thanks. That gets me authenticated to the web service, but how do I pass
    those credentials onto SQL? I realize I can impersonate a user; I've
    already successfully tried it. My first choice would be to pass the actual
    Windows user credentials of the current logged on user to SQL, though.
    >
    > (Integrated security=sspi works like a charm when I am doing this all
    locally, btw, i.e. my SQL connection happens in a method or an instance of
    another class.)
    >
    > Whenever I try using integrated security in my connection string I always
    get back the message that it can't connect using
    > NT Authority\Anoymous logon. The relevant Web.config entries appear to be:
    >
    >
    > <system.web><identity impersonate="true" /><authentication mode="windows"
    /><authorization><allow roles="servername\groupname" /><deny users="*"
    /></authorization>
    > ...
    >
    >
    >
    >
    > ----- avnrao wrote: -----
    >
    > check this kb article
    > [url]http://support.microsoft.com/default.aspx?scid=kb;en-us;813834[/url]
    >
    > Av.
    >
    > "Brian Cobb" <brianc@newsgroups.nospam> wrote in message
    > news:164C2AE3-3314-4884-AE0A-F6A34659A53A@microsoft.com...
    > >I want to pass the security credentials of the currenty logged on
    user with
    > >a Windows domain account to an asp.net web service. This security
    info
    > >then needs to be captured so that it may be used to authenticate
    against a
    > >SQL server database. Assuming it can be done, Can someone point me
    to the
    > >docs, a tutorial, or a sample that shows and/or discusses how to do
    this?
    > >>> Thanks in advance.
    >
    >
    >

    Alek Davis Guest

  7. #6

    Default Re: Probably a simple question

    have you resolved the issue? just to check, do you really need to access SQL
    server using the logged in user credentials?

    I am asking this because, most of the database designs are such that the
    database needs to know what is the user name and show the data respectively.
    and they do not check if a particalar user has execute permission on a
    certain stored proc or any other permission on DB object. maintaining these
    permissions/users is cumborsome when users are stored in domain (for a
    pretty huge number).

    if you can put down your requirement, it would be more helpful for us to
    check if your way of approax is correct.

    Av.

    "Brian Cobb" <brianc@newsgroups.nospam> wrote in message
    news:164C2AE3-3314-4884-AE0A-F6A34659A53A@microsoft.com...
    >I want to pass the security credentials of the currenty logged on user with
    >a Windows domain account to an asp.net web service. This security info
    >then needs to be captured so that it may be used to authenticate against a
    >SQL server database. Assuming it can be done, Can someone point me to the
    >docs, a tutorial, or a sample that shows and/or discusses how to do this?
    >
    >
    > Thanks in advance.

    avnrao Guest

  8. #7

    Default Re: Probably a simple question

    By the way, in addition to security risks, there is one more problem with
    passing user's credentials to the SQL Server. The problem here is that you
    will not be able to use connection pooling, because connection pooling only
    works if a database connection is made using the same user's credentials and
    in the delegation scenario it is not the case. This is why, most
    applications just keep a separate SQL login ID for database operations (all
    authorization is normally done in the middle tier).

    Alek

    <brianc@newsgroups.nospan> wrote in message
    news:8D5C6367-5965-4CA2-AED8-473BF65CA952@microsoft.com...
    > Thanks for everyone's help with this. I will investigate the kerberos
    authentication option at some point. No, there is no specific requirement
    that users authenticate against sql using their current credentials. I
    don't think there is any need for anyone, other than myself of course, to
    pursue this issue further at this time.
    >
    > ----- avnrao wrote: -----
    >
    > have you resolved the issue? just to check, do you really need to
    access SQL
    > server using the logged in user credentials?
    >
    > I am asking this because, most of the database designs are such that
    the
    > database needs to know what is the user name and show the data
    respectively.
    > and they do not check if a particalar user has execute permission on
    a
    > certain stored proc or any other permission on DB object. maintaining
    these
    > permissions/users is cumborsome when users are stored in domain (for
    a
    > pretty huge number).
    >
    > if you can put down your requirement, it would be more helpful for us
    to
    > check if your way of approax is correct.
    >
    > Av.
    >
    > "Brian Cobb" <brianc@newsgroups.nospam> wrote in message
    > news:164C2AE3-3314-4884-AE0A-F6A34659A53A@microsoft.com...
    > >I want to pass the security credentials of the currenty logged on
    user with
    > >a Windows domain account to an asp.net web service. This security
    info
    > >then needs to be captured so that it may be used to authenticate
    against a
    > >SQL server database. Assuming it can be done, Can someone point me
    to the
    > >docs, a tutorial, or a sample that shows and/or discusses how to do
    this?
    > >>> Thanks in advance.
    >
    >
    >

    Alek Davis 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