winntshawn
IS-IT--Management
Hello all,
I am having a hard time understanding what is happening with my SQL Server. I have a database setup that we use to track quotations produced by our salesmen. I have created an ASP/ADO front end to allow access for people to view the contents of the database, as well as giving a select few the ability to add and update entries in the database.
On the SQL Server end, I have created logins that map to an individual user's network user account (we're using Active Directory) for the users who need access to this database. I have also granted these logins access to the required database.
On the web server (Windows 2000, SP4, IIS 5.0), I have the authentication method set to Integrated Windows Authentication. When a user opens the site, it captures their Windows account name, in the format of DOMAIN\user. This info is stored in the AUTH_USER server variable. I grab this username, and insert into the connection string that I use from ASP/ADO to connect to the database, like this:
Now, here's the problem: when I log in with a user account that has access to the database (let's call it GoodUser), I am able to do everything that it allows me, whether it's adding or updating information in the database. However, when I log in with a generic user account (let's call it BadUser), which I haven't even created a SQL login to map to, this user is also able to make changes to the database, which shouldn't happen. I have tried using SQL Profiler to see what's going on, and it shows that both users (GoodUser and BadUser) have successfully logged in and ran queries against the database.
So, here's what I'm looking for, in a nutshell: I need a way to allow me to look at who is opening the website and logging in, and being able to determine from that what kind of access that user should have in the database. I also need people who don't have access to the database to not be able to change any information.
I'm at the point where bashing my head against the desk is looking very inviting. Any help or direction would be very, VERY appreciated.
Regards,
-- Shawn
I am having a hard time understanding what is happening with my SQL Server. I have a database setup that we use to track quotations produced by our salesmen. I have created an ASP/ADO front end to allow access for people to view the contents of the database, as well as giving a select few the ability to add and update entries in the database.
On the SQL Server end, I have created logins that map to an individual user's network user account (we're using Active Directory) for the users who need access to this database. I have also granted these logins access to the required database.
On the web server (Windows 2000, SP4, IIS 5.0), I have the authentication method set to Integrated Windows Authentication. When a user opens the site, it captures their Windows account name, in the format of DOMAIN\user. This info is stored in the AUTH_USER server variable. I grab this username, and insert into the connection string that I use from ASP/ADO to connect to the database, like this:
Code:
dim strUserName, strConn, dbConn
strUserName = Request.Servervariables("AUTH_USER")
strConn = "Provider=SQLOLEDB;Server=server;Database=DB;UID=" & strUserName & ";Trusted_Connection=yes;"
set dbConn = server.createObject("ADODB.connection")
dbConn.Open strConn
Now, here's the problem: when I log in with a user account that has access to the database (let's call it GoodUser), I am able to do everything that it allows me, whether it's adding or updating information in the database. However, when I log in with a generic user account (let's call it BadUser), which I haven't even created a SQL login to map to, this user is also able to make changes to the database, which shouldn't happen. I have tried using SQL Profiler to see what's going on, and it shows that both users (GoodUser and BadUser) have successfully logged in and ran queries against the database.
So, here's what I'm looking for, in a nutshell: I need a way to allow me to look at who is opening the website and logging in, and being able to determine from that what kind of access that user should have in the database. I also need people who don't have access to the database to not be able to change any information.
I'm at the point where bashing my head against the desk is looking very inviting. Any help or direction would be very, VERY appreciated.
Regards,
-- Shawn