TMAegis
mssql için daha fazla kural

TMA-MSSQL-3.11

Ensure the public role in the msdb database is not granted access to SQL Agent proxies

OrtaDüzey 1Otomatikmssql

Açıklama

The public database role contains every user in the msdb database. SQL Agent proxies define a security context in which a job step can run. Default: By default, the msdb public database role does not have access to any proxy. Runs one sqlcmd query with its defaults (Windows authentication to the local default instance); set SQLCMDSERVER, SQLCMDUSER and SQLCMDPASSWORD for another instance or SQL authentication. Needs VIEW SERVER STATE / sysadmin-level read access.

Nasıl denetlenir

Denetim yöntemi: SQL sorgusu

sql_query
sqlcmd -b -h -1 -W -Q "SET NOCOUNT ON; SELECT COUNT(*) FROM msdb.dbo.sysproxylogin spl JOIN msdb.sys.database_principals dp ON dp.sid = spl.sid JOIN msdb.dbo.sysproxies sp ON sp.proxy_id = spl.proxy_id WHERE dp.name = 'public';"
Beklenen çıktı
0

Nasıl düzeltilir

Düzeltme yöntemi: Kılavuz veya altyapı yaması

1. Ensure the required security principals are explicitly granted access to the proxy (use sp_grant_login_to_proxy). 2. Revoke access to the <proxyname> from the public role. USE [msdb] GO EXEC dbo.sp_revoke_login_from_proxy @name = N'public', @proxy_name = N'<proxyname>'; GO

Özellikler

İşletim sistemleri
Herhangi biri
Etiketler
mssqldatabaseprivilegessql-agent
Referans
CIS Microsoft SQL Server 2025 Benchmark v1.0.0 - 3.11 Ensure the public role in the msdb database is not granted access to SQL Agent proxies

Bu ana makineyi denetle

Bunu denetleme izniniz olan bir makinede çalıştırın. Tarama salt okunurdur.

shell
tmaegis scan --target mssql