Showing posts with label integrated. Show all posts
Showing posts with label integrated. Show all posts

Saturday, February 25, 2012

Account to access SQL

What is the best way of accessing a sql server on a live server? shall I use Integrated windows or use a special user account? If I use a user account, what are the needed priviledges to give it?

thank you

Well, the real answers to those questions are: "It depends." Froma practical standpoint, choosing Windows authentication vs. SQLauthentication is going to come down to what your needs are and what'sgoing to provide the smallest attack surface whilst meeting thoseneeds.
The needed privileges are also going to vary from application toapplication. Personally, I shoot for not allowing anything butexecute permissions on the stored procedures that the app needs tofunction, and nothing else. That gives me a stong, well-definedAPI for the database that allows me to control (to an extent) how thedatabase is used. Again, YMMV depending on the needs of yourapplication.

Thursday, February 16, 2012

Accessing SQL Server with Integrated Security from VPN

The title above should be a KB article. I have looked far and wide for a
definitive answer to this question and I have not found a definitive answer.
I have a non-domain computer accessing a domain using VPN. The Domain user
account being used for VPN has administrative priviledges on a SQL server.
Can I use Enterprise Manager to administer the SQL Server from that
non-domain computer using intergrated security? If so how?
Thanks,
David Rogers
Hi David,
So, you should be able to VPN into your corporate network from a machine
at home, that is not part of the domain.
The VPN should challenge you for domain authentication. So, you should be
forced to login to your company domain.
Now, that you've validated your credentials, you could use Terminal Server
or Remote Desktop to your SQL Server,
and it would be as if you're sitting at the console.
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.
|||That is helpful. I'm still looking for more. Is there a way to use integrated
security for a connection in this scenario (the question applies to
application connection strings as well as administration tools)?
Looking around, I found a reference to being able to use integrated security
with VPN if the client computer was a member of the same domain OR if the
same login name and password was used on the client. I've had no luck with
the latter.
Thank you!
David
"Kevin McDonnell [MSFT]" wrote:

> Hi David,
> So, you should be able to VPN into your corporate network from a machine
> at home, that is not part of the domain.
> The VPN should challenge you for domain authentication. So, you should be
> forced to login to your company domain.
> Now, that you've validated your credentials, you could use Terminal Server
> or Remote Desktop to your SQL Server,
> and it would be as if you're sitting at the console.
> Thanks,
> Kevin McDonnell
> Microsoft Corporation
> This posting is provided AS IS with no warranties, and confers no rights.
>
>
|||Previous Post:
Is there a way to use integrated
security for a connection in this scenario (the question applies to
application connection strings as well as administration tools)?
-- Integrated Security relies on :
1. user has logged into the domain and been authenticated. (it's the user
not the machine that matters)
2. user has not logged into the domain but his username & password EXACTLY
match
the username and password on the server. Also only works with Named Pipes.
This was
commonly referred to as "workgroup security".
Looking around, I found a reference to being able to use integrated
security
with VPN if the client computer was a member of the same domain OR if the
same login name and password was used on the client. I've had no luck with
the latter.
-- Try this outside of the VPN scenario. Put a SQL Server and client
machine in a workgroup.
Set the Security Audit logging to log successful and failed logins.
Duplicate the username & password on the client and server.
Test with Trusted Connections using Named Pipes.
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.

Accessing SQL Server data using Thread

Hi,

How do we set credentials or contex to a thread.

I create a new thread and within that thread if I am use a connetion string with Integrated Security=True" to talk to the SQL Server, however it seems that the new thread's context/identity is blank and hence failing the SQL Server connection.

Please help.

Thanks

Read this thread. hopefully it's the same problem you are having..

http://www.msdner.com/forum/thread597465.html

|||

Thanks, It helped.