Public server role


Job details

Name: Public server role
Platform: Sqlserver
Category: Security
Premium package: Security and compliance package
Description: Checks if extra permissions have been granted to the public server role.
Long description: Checks if extra permissions have been granted to the public server role. Every SQL Server login belongs to the public role and cannot be removed from this role.
Version: 1.2
Default schedule: 22 1 1 *
Requires engine install: Yes
Compatibility tag: .[type=‘instance’ & databasetype=‘sqlserver’]/instance[maj_version > ‘2005′ & hasengine=‘YES’ & eng_inst_priv = 0 & (engine_edition = ‘Microsoft SQL Server’ engine_edition = ‘Azure SQL Managed Instance’)]

Parameters

Name Default value Description
return status 1 Return status value (ALARM – 2, WARNING – 1, or OK – 0) when extra permissions have been granted to the public server role.
revoke extra permission NO If set to “YES“ the alert will revoke extra permission from the public server role by running “REVOKE <permission_name> FROM public”.
history threshold 365 The maximum number of days to keep statistics for in the historic tables.

Job Summary

SELECT * FROM master.sys.server_permissions WHERE grantee_principal_id = SUSER_SID(N'public') and state_desc LIKE 'GRANT%';

Core Functionality

Implementation Details

Parameters Overview

Tables and Dependency Management

Security and Compliance

Scheduled Execution

Job Outputs

Permission Name State
permission1 Granted
permission2 Granted

Historical Representation

System Requirements

In essence, this dbWatch job automatically audits and manages server role permissions in SQL Server environments, providing both active management through revocation options and historical tracking for compliance and auditing purposes.