Skip to content

Instantly share code, notes, and snippets.

View jooststolk's full-sized avatar

Yuana jooststolk

View GitHub Profile
@jooststolk
jooststolk / sqlserver-integrated-security-least-privilege.sql
Created September 30, 2025 14:08
Integrated Security setup with privacy-conscious access control
-- SQL Server: Integrated Security with Least Privilege Access
-- Author: Joost (Yuana Consulting & Development Services)
-- Purpose: Secure access for Windows-authenticated users while preventing destructive actions like DROP TABLE
-- Note: Let your network admin create a group like DOMAIN\YourAppUsers. Add only the users who need access to the app.
-- STEP 1: Create a login for the Windows group
CREATE LOGIN [DOMAIN\YourAppUsers] FROM WINDOWS;
-- STEP 2: Map the login to a database user
USE YourDB;