VPN access for vendor, multiple instance

  • 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

  • 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


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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

  • 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 .

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply