Capature User's Login

  • How to capature user's NT login in SQL Server when they access SQL Server with 'Windows Authentication' from WEB application written by ASP/HTML?

  • The web app is authenticating the user and passing the credentials through (Basic or Windows auth) or is it running under Anonymous and the app is configured to run under a user context that has security permissions into the database?

    K. Brian Kelley, GSEC

    http://www.truthsolutions.com/

    Author: Start to Finish Guide to SQL Server Performance Monitoring

    http://www.netimpress.com/

    K. Brian Kelley
    @kbriankelley

  • The web app will authenticat the user, pass the credentials through Basic authentication and users are not allowed anonymous access. We like to use one generic id to access database with proper permissions.

  • quote:


    We like to use one generic id to access database with proper permissions.


    If it's one generic ID by the web server for all users, then the only way you get the information is by having the ASP code get it from Request.ServerVariables("LOGON_USER") or some similar process and pass it along via stored procedure or something of that sort to the SQL Server.

    K. Brian Kelley, GSEC

    http://www.truthsolutions.com/

    Author: Start to Finish Guide to SQL Server Performance Monitoring

    http://www.netimpress.com/

    K. Brian Kelley
    @kbriankelley

  • Thaks, Brian.

  • That is also the way I use here.

    The return from LOGON_USER I use to query my db and depending on the results I display several slightly different intranet homepages.

    I also use this to prove to management that they didn't fetch the information I provided there for them.

    But after all they don't really care.

    Frank

    http://www.insidesql.de

    http://www.familienzirkus.de

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • It is refreshing and really encouraging to lesser mortals to see SQL Gurus using this forum to ask for help as well as dishing it out!

    Tony Bater


    Tony

  • Yeah, well sometimes I wonder if these guru guys have jobs or if they just sit around posting all day. 😉

  • good question

    Frank

    http://www.insidesql.de

    http://www.familienzirkus.de

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply