Ask a Question related to ASP.NET Security, Design and Development.
-
SQL Connectivity by Web App
Hi,
To start with, i'm not too sure if this is the right group to be posting in
so please let me know if these is a more suitable one.
I am trying to get my head around the mechanics behind .NET web applications
accessing SQL databases located on another pc. My current scenario is that
both PC's (IIS5 and SQL2000) are on the same domain but are physically
different. I wish to retrieve data from the database to include in the
asp.net application. As far as I can see I have two options when building
the connection:
a) pass credentials in a connection string;
b) change the impersonated user to a domain account with sql priivaleges.
I notice that the SQL box is set to use windows authentication. Does this
make a difference?
What I am looking for is are links to resources discussing the matter to
determine which method is best, if the are other methods and how to set up
the solution.
Any help would be appreciated.
Regards,
<M>ike
Guest
-
Connectivity through Xml
hey can anybody tell me the difference in compiling from a flex builder and through command line compiler.... i have a mxml app which is... -
V 3.0 no connectivity
:brokenheart; Greetings, We've upgraded to Version 3.0 and on all computers in the office are unable to connect with out site using version... -
DB Connectivity
Is there is any method to connect flash to a data base? -
4GL Connectivity
Simmons, Keith wrote: 4GL runs independently of any other IBM Informix product. You don't need aditional software. What you may need it to... -
DB2 V8 Connectivity
Just recently upgraded to version 8 of DB2 on AIX. In addiiton to upgrading a test server, we have upgraded 2 DB2 clients as well - one AIX, the... -
Alek Davis #2
Re: SQL Connectivity by Web App
Mike,
The most common approach to this common problem is to specify SQL
credentials in the connection string. The downside here is that you need to
protect the connection string at storage, which is a challenge, but unless
you have certain specific conditions, you do not have many alternatives. If
you want to propagate user's credentials to SQL server, you have to enable
delegation at the AD domain level, which is not a good idea from security
perspective. And what is worse, your app will not be able to use connection
pooling, so the scalability goes down he drain. If you want to connect to
SQL Server using credentials of the IIS worker process, you either need to
run the IIS process as a domain user or set them identically on both the SQL
serve and Web server using a local account (with the same password). I don't
think that either of these options is good, because if you do this (for one,
any application running under your Web site will be able to connect to SQL
server with privileged rights). The bottom line here is that you will
introduce more problems than you solve. Just go with the SQL credentials in
the connection string. From my experience, this is what most enterprise apps
do.
Alek
"<M>ike" <mikedotdinnisatabraxas-ukdotcom> wrote in message
news:uO3P$j6VEHA.2840@TK2MSFTNGP11.phx.gbl...in> Hi,
>
> To start with, i'm not too sure if this is the right group to be postingapplications> so please let me know if these is a more suitable one.
>
> I am trying to get my head around the mechanics behind .NET web> accessing SQL databases located on another pc. My current scenario is that
> both PC's (IIS5 and SQL2000) are on the same domain but are physically
> different. I wish to retrieve data from the database to include in the
> asp.net application. As far as I can see I have two options when building
> the connection:
>
> a) pass credentials in a connection string;
> b) change the impersonated user to a domain account with sql priivaleges.
>
> I notice that the SQL box is set to use windows authentication. Does this
> make a difference?
>
> What I am looking for is are links to resources discussing the matter to
> determine which method is best, if the are other methods and how to set up
> the solution.
>
> Any help would be appreciated.
>
> Regards,
>
> <M>ike
>
>
Alek Davis Guest
-
Re: SQL Connectivity by Web App
Thanks AleK,
That certainly sounds good and reinforces what I was thinking. I think I
will try to save the credentials in the Web.config file as AppSetting keys
so they are not saved in each page and should be more secure.
Cheers,
<M>ike
"Alek Davis" <alek_xDOTx_davis_xATx_intel_xDOTx_com> wrote in message
news:OB9NoC7VEHA.3596@tk2msftngp13.phx.gbl...to> Mike,
>
> The most common approach to this common problem is to specify SQL
> credentials in the connection string. The downside here is that you needIf> protect the connection string at storage, which is a challenge, but unless
> you have certain specific conditions, you do not have many alternatives.connection> you want to propagate user's credentials to SQL server, you have to enable
> delegation at the AD domain level, which is not a good idea from security
> perspective. And what is worse, your app will not be able to useSQL> pooling, so the scalability goes down he drain. If you want to connect to
> SQL Server using credentials of the IIS worker process, you either need to
> run the IIS process as a domain user or set them identically on both thedon't> serve and Web server using a local account (with the same password). Ione,> think that either of these options is good, because if you do this (forin> any application running under your Web site will be able to connect to SQL
> server with privileged rights). The bottom line here is that you will
> introduce more problems than you solve. Just go with the SQL credentialsapps> the connection string. From my experience, this is what most enterprisethat> do.
>
> Alek
>
> "<M>ike" <mikedotdinnisatabraxas-ukdotcom> wrote in message
> news:uO3P$j6VEHA.2840@TK2MSFTNGP11.phx.gbl...> in> > Hi,
> >
> > To start with, i'm not too sure if this is the right group to be posting> applications> > so please let me know if these is a more suitable one.
> >
> > I am trying to get my head around the mechanics behind .NET web> > accessing SQL databases located on another pc. My current scenario isbuilding> > both PC's (IIS5 and SQL2000) are on the same domain but are physically
> > different. I wish to retrieve data from the database to include in the
> > asp.net application. As far as I can see I have two options whenpriivaleges.> > the connection:
> >
> > a) pass credentials in a connection string;
> > b) change the impersonated user to a domain account with sqlthis> >
> > I notice that the SQL box is set to use windows authentication. Doesup> > make a difference?
> >
> > What I am looking for is are links to resources discussing the matter to
> > determine which method is best, if the are other methods and how to set>> > the solution.
> >
> > Any help would be appreciated.
> >
> > Regards,
> >
> > <M>ike
> >
> >
>
Guest
-
Re: SQL Connectivity by Web App
Top Tip:
I've also noticed that if you're using passed credentials to connect to the
SQL box it helps if the server is set to accept both SQL Server and Windows
authentication, otherwise you kep getting (and getting and getting) the good
old 'Not a Trusted Connection' error message.
<M>ike
Guest
-
Alek Davis #5
Re: SQL Connectivity by Web App
Just make sure that the credentials are encrypted.
Alek
"<M>ike" <mikedotdinnisatabraxas-ukdotcom> wrote in message
news:e1tvO1DWEHA.2716@tk2msftngp13.phx.gbl...unless> Thanks AleK,
>
> That certainly sounds good and reinforces what I was thinking. I think I
> will try to save the credentials in the Web.config file as AppSetting keys
> so they are not saved in each page and should be more secure.
>
> Cheers,
>
> <M>ike
>
>
> "Alek Davis" <alek_xDOTx_davis_xATx_intel_xDOTx_com> wrote in message
> news:OB9NoC7VEHA.3596@tk2msftngp13.phx.gbl...> to> > Mike,
> >
> > The most common approach to this common problem is to specify SQL
> > credentials in the connection string. The downside here is that you need> > protect the connection string at storage, which is a challenge, butenable> If> > you have certain specific conditions, you do not have many alternatives.> > you want to propagate user's credentials to SQL server, you have tosecurity> > delegation at the AD domain level, which is not a good idea fromto> connection> > perspective. And what is worse, your app will not be able to use> > pooling, so the scalability goes down he drain. If you want to connectto> > SQL Server using credentials of the IIS worker process, you either needSQL> SQL> > run the IIS process as a domain user or set them identically on both the> don't> > serve and Web server using a local account (with the same password). I> one,> > think that either of these options is good, because if you do this (for> > any application running under your Web site will be able to connect toposting> in> > server with privileged rights). The bottom line here is that you will
> > introduce more problems than you solve. Just go with the SQL credentials> apps> > the connection string. From my experience, this is what most enterprise> > do.
> >
> > Alek
> >
> > "<M>ike" <mikedotdinnisatabraxas-ukdotcom> wrote in message
> > news:uO3P$j6VEHA.2840@TK2MSFTNGP11.phx.gbl...> > > Hi,
> > >
> > > To start with, i'm not too sure if this is the right group to beto> that> > in> > applications> > > so please let me know if these is a more suitable one.
> > >
> > > I am trying to get my head around the mechanics behind .NET web> > > accessing SQL databases located on another pc. My current scenario is> building> > > both PC's (IIS5 and SQL2000) are on the same domain but are physically
> > > different. I wish to retrieve data from the database to include in the
> > > asp.net application. As far as I can see I have two options when> priivaleges.> > > the connection:
> > >
> > > a) pass credentials in a connection string;
> > > b) change the impersonated user to a domain account with sql> this> > >
> > > I notice that the SQL box is set to use windows authentication. Does> > > make a difference?
> > >
> > > What I am looking for is are links to resources discussing the matterset> > > determine which method is best, if the are other methods and how to> up>> >> > > the solution.
> > >
> > > Any help would be appreciated.
> > >
> > > Regards,
> > >
> > > <M>ike
> > >
> > >
> >
>
Alek Davis Guest
-
Re: SQL Connectivity by Web App
Any top tips on how to encrypt these credentials. I guess the details are
decrypted by a function in a class within the project every time they are
needed?
<M>ike
"Alek Davis" <alek_xDOTx_davis_xATx_intel_xDOTx_com> wrote in message
news:uuoHeGHWEHA.556@tk2msftngp13.phx.gbl...keys> Just make sure that the credentials are encrypted.
>
> Alek
>
> "<M>ike" <mikedotdinnisatabraxas-ukdotcom> wrote in message
> news:e1tvO1DWEHA.2716@tk2msftngp13.phx.gbl...> > Thanks AleK,
> >
> > That certainly sounds good and reinforces what I was thinking. I think I
> > will try to save the credentials in the Web.config file as AppSettingneed> > so they are not saved in each page and should be more secure.
> >
> > Cheers,
> >
> > <M>ike
> >
> >
> > "Alek Davis" <alek_xDOTx_davis_xATx_intel_xDOTx_com> wrote in message
> > news:OB9NoC7VEHA.3596@tk2msftngp13.phx.gbl...> > > Mike,
> > >
> > > The most common approach to this common problem is to specify SQL
> > > credentials in the connection string. The downside here is that youalternatives.> unless> > to> > > protect the connection string at storage, which is a challenge, but> > > you have certain specific conditions, you do not have manyneed> enable> > If> > > you want to propagate user's credentials to SQL server, you have to> security> > > delegation at the AD domain level, which is not a good idea from> to> > connection> > > perspective. And what is worse, your app will not be able to use> > > pooling, so the scalability goes down he drain. If you want to connect> > > SQL Server using credentials of the IIS worker process, you eitherthe> to> > > run the IIS process as a domain user or set them identically on both(for> > SQL> > don't> > > serve and Web server using a local account (with the same password). I> > > think that either of these options is good, because if you do thiscredentials> SQL> > one,> > > any application running under your Web site will be able to connect to> > > server with privileged rights). The bottom line here is that you will
> > > introduce more problems than you solve. Just go with the SQLenterprise> > in> > > the connection string. From my experience, this is what mostis> posting> > apps> > > do.
> > >
> > > Alek
> > >
> > > "<M>ike" <mikedotdinnisatabraxas-ukdotcom> wrote in message
> > > news:uO3P$j6VEHA.2840@TK2MSFTNGP11.phx.gbl...
> > > > Hi,
> > > >
> > > > To start with, i'm not too sure if this is the right group to be> > > in
> > > > so please let me know if these is a more suitable one.
> > > >
> > > > I am trying to get my head around the mechanics behind .NET web
> > > applications
> > > > accessing SQL databases located on another pc. My current scenariophysically> > that> > > > both PC's (IIS5 and SQL2000) are on the same domain but arethe> > > > different. I wish to retrieve data from the database to include inmatter> > building> > > > asp.net application. As far as I can see I have two options when> > priivaleges.> > > > the connection:
> > > >
> > > > a) pass credentials in a connection string;
> > > > b) change the impersonated user to a domain account with sql> > this> > > >
> > > > I notice that the SQL box is set to use windows authentication. Does> > > > make a difference?
> > > >
> > > > What I am looking for is are links to resources discussing the> to> set> > > > determine which method is best, if the are other methods and how to>> > up> >> > > > the solution.
> > > >
> > > > Any help would be appreciated.
> > > >
> > > > Regards,
> > > >
> > > > <M>ike
> > > >
> > > >
> > >
> > >
> >
>
Guest
-
Maras #7
Re: SQL Connectivity by Web App
On Wed, 23 Jun 2004 11:50:37 +0100, <M>ike wrote:
Read about aspnet_setreg tool.> Any top tips on how to encrypt these credentials. I guess the details are
> decrypted by a function in a class within the project every time they are
> needed?
>
--
Best regards
Maras
Maras Guest
-
Alek Davis #8
Re: SQL Connectivity by Web App
This is a tough problem to solve and depending on your environment some
approaches may be worse than others. Check the "Protect It: Safeguard
Database Connection Strings and Other Sensitive Settings in Your Code"
article at [url]http://msdn.microsoft.com/msdnmag/issues/03/11/ProtectYourData/[/url],
it addresses this topic.
Alek
"<M>ike" <mikedotdinnisatabraxas-ukdotcom> wrote in message
news:uR8ls$QWEHA.2340@TK2MSFTNGP09.phx.gbl...I> Any top tips on how to encrypt these credentials. I guess the details are
> decrypted by a function in a class within the project every time they are
> needed?
>
> <M>ike
>
> "Alek Davis" <alek_xDOTx_davis_xATx_intel_xDOTx_com> wrote in message
> news:uuoHeGHWEHA.556@tk2msftngp13.phx.gbl...> > Just make sure that the credentials are encrypted.
> >
> > Alek
> >
> > "<M>ike" <mikedotdinnisatabraxas-ukdotcom> wrote in message
> > news:e1tvO1DWEHA.2716@tk2msftngp13.phx.gbl...> > > Thanks AleK,
> > >
> > > That certainly sounds good and reinforces what I was thinking. I thinkconnect> keys> > > will try to save the credentials in the Web.config file as AppSetting> need> > > so they are not saved in each page and should be more secure.
> > >
> > > Cheers,
> > >
> > > <M>ike
> > >
> > >
> > > "Alek Davis" <alek_xDOTx_davis_xATx_intel_xDOTx_com> wrote in message
> > > news:OB9NoC7VEHA.3596@tk2msftngp13.phx.gbl...
> > > > Mike,
> > > >
> > > > The most common approach to this common problem is to specify SQL
> > > > credentials in the connection string. The downside here is that you> alternatives.> > unless> > > to
> > > > protect the connection string at storage, which is a challenge, but> > > > you have certain specific conditions, you do not have many> > enable> > > If
> > > > you want to propagate user's credentials to SQL server, you have to> > security> > > > delegation at the AD domain level, which is not a good idea from> > > > perspective. And what is worse, your app will not be able to use
> > > connection
> > > > pooling, so the scalability goes down he drain. If you want toI> need> > to> > > > SQL Server using credentials of the IIS worker process, you either> the> > to> > > > run the IIS process as a domain user or set them identically on both> > > SQL
> > > > serve and Web server using a local account (with the same password).to> (for> > > don't
> > > > think that either of these options is good, because if you do this> > > one,
> > > > any application running under your Web site will be able to connectwill> > SQL> > > > server with privileged rights). The bottom line here is that youDoes> credentials> > > > introduce more problems than you solve. Just go with the SQL> enterprise> > > in
> > > > the connection string. From my experience, this is what most> is> > posting> > > apps
> > > > do.
> > > >
> > > > Alek
> > > >
> > > > "<M>ike" <mikedotdinnisatabraxas-ukdotcom> wrote in message
> > > > news:uO3P$j6VEHA.2840@TK2MSFTNGP11.phx.gbl...
> > > > > Hi,
> > > > >
> > > > > To start with, i'm not too sure if this is the right group to be> > > > in
> > > > > so please let me know if these is a more suitable one.
> > > > >
> > > > > I am trying to get my head around the mechanics behind .NET web
> > > > applications
> > > > > accessing SQL databases located on another pc. My current scenario> physically> > > that
> > > > > both PC's (IIS5 and SQL2000) are on the same domain but are> the> > > > > different. I wish to retrieve data from the database to include in> > > > > asp.net application. As far as I can see I have two options when
> > > building
> > > > > the connection:
> > > > >
> > > > > a) pass credentials in a connection string;
> > > > > b) change the impersonated user to a domain account with sql
> > > priivaleges.
> > > > >
> > > > > I notice that the SQL box is set to use windows authentication.to> matter> > > this
> > > > > make a difference?
> > > > >
> > > > > What I am looking for is are links to resources discussing the> > to> > > > > determine which method is best, if the are other methods and how>> > set> >> > > up
> > > > > the solution.
> > > > >
> > > > > Any help would be appreciated.
> > > > >
> > > > > Regards,
> > > > >
> > > > > <M>ike
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
>
Alek Davis Guest



Reply With Quote

