Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

VPN access for vendor, multiple instance Expand / Collapse
Author
Message
Posted Monday, November 19, 2012 10:00 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Tuesday, July 22, 2014 6:38 AM
Points: 82, Visits: 496
Hello

I have a request to allow a vendor to have VPN access to my SQL Server that currently has one default instance.

The default instance contains multiple databases for multiple agencies - this creates a security concern.

Is it possible to create a second instance and only allow the vendor access to that second instance through VPN?

Is it possible to give a vendor VPN access but restrict their access to anything else but their database?

Thanks in advance
Dave

Post #1386477
Posted Monday, November 19, 2012 12:02 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 6:53 AM
Points: 12,890, Visits: 31,851
NJDave (11/19/2012)
Hello

I have a request to allow a vendor to have VPN access to my SQL Server that currently has one default instance.

The default instance contains multiple databases for multiple agencies - this creates a security concern.

Is it possible to create a second instance and only allow the vendor access to that second instance through VPN?

no need for additional instances...you can limit access simply by giving the vendor one login, that has a matching user in only a single database.

Is it possible to give a vendor VPN access but restrict their access to anything else but their database?

Thanks in advance
Dave



Remember SQL is deny by default, meaning if you don't explicitly give them access to something , whether by adding them to roles or mistakenly granting sysadmin privileges, they simply cannot access something that you diidn't give them.

I would create a user for your vendor , say VENDORACCESS, and that is the user they can use to access the database in question;

Create LOGIN [VendorAccess] WITH PASSWORD='NotTheRealPassword'

USE [WHATEVER]
Create USER [VendorAccess] FOR LOGIN [VendorAccess]
CREATE ROLE [AlmostOwners]
EXEC sp_addrolemember N'db_ddladmin', N'AlmostOwners'
EXEC sp_addrolemember N'db_datareader', N'AlmostOwners'
EXEC sp_addrolemember N'db_datawriter', N'AlmostOwners'
--can the users EXECUTE procedures? comment out if false
GRANT EXECUTE TO [AlmostOwners]
--allow the users to see view proc and function definitions
Grant View Definition ON SCHEMA::[dbo] To [AlmostOwners]

--finally add our user to the role:
EXEC sp_addrolemember N'AlmostOwners', N'VendorAccess'



Lowell

--There is no spoon, and there's no default ORDER BY in sql server either.
Actually, Common Sense is so rare, it should be considered a Superpower. --my son
Post #1386534
Posted Monday, November 19, 2012 5:28 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 11:45 PM
Points: 7,094, Visits: 12,582
Lowell has covered the database-level concerns well. All I'll add, at the server-level, is if you are concerned about the new vendor seeing databases other than their own when using the SSMS Object Explorer you can deny the VIEW ANY DATABASE permission. The permission is granted to all logins via the public Role at the server-level, and all logins inherit that permission by default because all logins are permanent members of public:

DENY VIEW ANY DATABASE TO [TheNewLogin];

edit: it's worth mentioning that you can also DENY or REVOKE the permission from public but that's a more drastic measure

The DENY on the login object will supercede the GRANT offered by the login's membership in public but it also means the login will not even see databases in Object Explorer that they legitimately can access. This means they'll have to know the database's name to change contexts into it in a query window using:

USE [DatabaseName];

Personally I would like for there to be an option to have Object Explorer only show the databases a login can potentially access, as opposed to all or none:

Connect > Can't see database with Object Explorer


__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
Post #1386644
Posted Tuesday, December 4, 2012 5:30 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, March 3, 2014 4:05 AM
Points: 47, Visits: 236
It is possible to give VPN access to SQL Server that currently has one default instance.

please check,how he connecting to sql server .if he using sql client component or taking access of entire server aceess.

create low priviledge windows login then map that login to particular database which he want to access.Bcoz as we all know windows authentication is more secure.

Is it possible to create a second instance and only allow the vendor access to that second instance through VPN?

yes.u can but plz check sql server browser service is not running .bcoz if it is running then it will show no of instances

please observed activity what time he is connecting .
Post #1392394
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse