473,467 Members | 1,402 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Trusted connections??

Hi folks,

Just want to make sure I've got this right.

I've got an application I want to authenticate to the domain i.e. an
intranet app. I've set this up (all the web.config items are in place and
everythings tickety boo) and I can get the username and various other bits
of info from a WindowsIdentity object. So far so good.

When I try and connect to my SQL 2K server however using a trusted
connection, the system will either use the account that ASP.NET runs under
in IIS or I have to switch impersonation on and use a user at my discretion.

Either way, it doesn't matter who's using the application, each individual
session will always use the one account to make a trusted SQL server
connection. Correct?? So I'll always have to replicate some security
structure in the database i.e. create and maintain and User table if I want
to use a trusted connection.

Is this something that's going to get fixed (it's not a feature) in Whidbey?
Having read a number of books about this, none of the authors seem to find
this inconsistency odd, which I find odd. It's as if it's perfectly natural
for the framework to be able to pick up the domain user data, but not let
SQL server use it. To me it's the king of mildly annoying and screamingly
obvious bug I normally associate with the Unix crowd.

I'm tempted just to use Forms authentication and not bother with integrated
security until they sort this out. Would that be a better move?

Any comments and advice would be much appreciated...

Cheers...Paul
Nov 18 '05 #1
2 1754
Paul,

To use impersonization you would have to get the client's domain password
and username over the network. Asking the client to enter their domain
password is not a good idea. If you want to validate the client and grant
appropriate database access based on user, you'll have to institute
something like form authentication.

But, if you need that sort of security, your question seems to imply that
your app is giving more control to the user than he/she should have. In
other words, if I allow the user to create custom queries, I have to
implement role or user based security at the SQL Server.

If the ASP.Net app controls what the user can request of the database then I
can use application security. This is really the default in ASP. In this
case, I implement user authentication at the application and the application
controls what features the user can use and, thereby, what access the user
can have to the database. This is where your domain login can be safely
tested by using Integrated Windows Authentication for your ASP application.
If a user can add records, you give him NTFS access to the AddRecords.aspx;
if he can only read, he only gets access to ReadRecords.aspx at the NTFS
permissions level.

Hope this helps,

Dale

"Paul M" <ma****@trials.bham.ac.uk> wrote in message
news:OI**************@TK2MSFTNGP09.phx.gbl...
Hi folks,

Just want to make sure I've got this right.

I've got an application I want to authenticate to the domain i.e. an
intranet app. I've set this up (all the web.config items are in place and
everythings tickety boo) and I can get the username and various other bits
of info from a WindowsIdentity object. So far so good.

When I try and connect to my SQL 2K server however using a trusted
connection, the system will either use the account that ASP.NET runs under
in IIS or I have to switch impersonation on and use a user at my discretion.
Either way, it doesn't matter who's using the application, each individual
session will always use the one account to make a trusted SQL server
connection. Correct?? So I'll always have to replicate some security
structure in the database i.e. create and maintain and User table if I want to use a trusted connection.

Is this something that's going to get fixed (it's not a feature) in Whidbey? Having read a number of books about this, none of the authors seem to find
this inconsistency odd, which I find odd. It's as if it's perfectly natural for the framework to be able to pick up the domain user data, but not let
SQL server use it. To me it's the king of mildly annoying and screamingly
obvious bug I normally associate with the Unix crowd.

I'm tempted just to use Forms authentication and not bother with integrated security until they sort this out. Would that be a better move?

Any comments and advice would be much appreciated...

Cheers...Paul

Nov 18 '05 #2
Are you trying to connect from your web server to a different machine
running SQL server and want it to use the domain credentials of the client?
I don't know if the ASP.NET stuff is different but with regular ASP this
will only work if you're using Active Directory (Kerberos). I think it's
called account delegation or something.

HTH,
Mike Kruchten

"Paul M" <ma****@trials.bham.ac.uk> wrote in message
news:OI**************@TK2MSFTNGP09.phx.gbl...
Hi folks,

Just want to make sure I've got this right.

I've got an application I want to authenticate to the domain i.e. an
intranet app. I've set this up (all the web.config items are in place and
everythings tickety boo) and I can get the username and various other bits
of info from a WindowsIdentity object. So far so good.

When I try and connect to my SQL 2K server however using a trusted
connection, the system will either use the account that ASP.NET runs under
in IIS or I have to switch impersonation on and use a user at my discretion.
Either way, it doesn't matter who's using the application, each individual
session will always use the one account to make a trusted SQL server
connection. Correct?? So I'll always have to replicate some security
structure in the database i.e. create and maintain and User table if I want to use a trusted connection.

Is this something that's going to get fixed (it's not a feature) in Whidbey? Having read a number of books about this, none of the authors seem to find
this inconsistency odd, which I find odd. It's as if it's perfectly natural for the framework to be able to pick up the domain user data, but not let
SQL server use it. To me it's the king of mildly annoying and screamingly
obvious bug I normally associate with the Unix crowd.

I'm tempted just to use Forms authentication and not bother with integrated security until they sort this out. Would that be a better move?

Any comments and advice would be much appreciated...

Cheers...Paul

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: C.O.Jones | last post by:
Hi, I've got SQL2000 Evaluation edition running on my own Windows XP Pro computer. I've installed it fine, and created some sample databases. It works fine. I can connect using Windows...
0
by: Mike | last post by:
I have a web farm (10 win 2003 machines) running an ASP .Net application (IIS 6.0) how can I use trusted connections on the 10 boxes to connect to a MS SQL 2000 database? Do I have to configure...
2
by: epaetz | last post by:
I'm getting Not associated with a trusted SQL Server connection errors on a .Net windows service I wrote, when it's running on my application server. It's not a problem with mixed mode...
2
by: Blake Versiga | last post by:
I am pulling my hair out..... I am trying to put a bound data grid on a webform... I have 4 data connections in my server explorer, all of which connect successfully. But when I run the web...
2
by: Paul M | last post by:
Hi, I've just implemented my first application onto a test web server. When the code comes to creating a connection object it throws an error saying the "Login failed for user '(null)'. Reason...
5
by: Adam Getchell | last post by:
Hello all, I've read over: http://idunno.org/dotNet/trustedConnections.aspx I would like to use a trusted connection vice using encrypted database strings:...
4
by: Shawn H. Mesiatowsky | last post by:
I have a strange problem here. I have my development computer with IIS installed, and we have a SQL server as well on a windows 2000 server. both are members of a domain. I have restricted access...
5
by: Mythran | last post by:
I have a test server and a development machine. I have SQL Server installed on both, the installations are pretty much identical. Both servers are in the same domain. When I run my application...
6
by: ZRexRider | last post by:
Hi, I have a .NET application that connects to a SQL 2000 database using trusted security. It eventually calls a stored procedure that receives 3 parameters - nothing special. If I simply...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.