Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
M

Member_16178831

@Member_16178831
About
Posts
1
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Best practice for creating a limited access ms-sql user ?
    M Member_16178831

    Creating a limited access MS-SQL user, especially in scenarios involving a DMZ server and corporate SQL server, requires careful consideration of security and access control. Here are some best practices and alternative approaches:

    Schema-Based Access:
    Instead of granting access at the database level, consider granting access at the schema level. Create a specific schema within DB_X and grant permissions only on that schema to WEBAPI_USER. This way, the user can see and interact with objects within that schema but won't have visibility into other schemas or databases.

    Stored Procedures:
    Limit interactions with the database through stored procedures. Grant execute permissions on specific stored procedures that the WEBAPI_USER needs to access, and ensure that these procedures encapsulate the necessary logic. This way, direct access to tables or other objects is not required.

    Row-Level Security (RLS):
    Depending on your SQL Server version, consider utilizing Row-Level Security (RLS) if applicable. RLS allows you to control access to rows in a table based on a user's identity or role. This can provide fine-grained control over data access.

    Database Ownership Chaining:
    While it's true that making WEBAPI_USER the owner of the database (DB_X) would grant visibility to all objects, it's generally not recommended for security reasons. Instead, consider enabling database ownership chaining selectively for specific scenarios where it makes sense.

    Custom Views:
    Create custom views that encapsulate the necessary logic and limit the columns and rows that WEBAPI_USER can access. Grant permissions on these views rather than directly on tables.

    Use Roles:
    Leverage database roles to group permissions logically. Grant the roles the necessary permissions and then add WEBAPI_USER to these roles. This helps in managing permissions in a more organized manner.

    Database database question sql-server sysadmin discussion
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups