TMAegisベータ
mssql のその他のルール

Microsoft SQL Server

TMA-MSSQL2022-3.11

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

中レベル 1自動mssql

説明

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. Granting access to SQL Agent proxies for the public role would allow all users to utilize the proxy which may have high privileges. This would likely break the principle of least privileges.

チェック方法

監査方法: SQL クエリ

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';"
期待される出力
0

修正方法

修正方法: ガイダンスまたは IaC パッチ

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

プロパティ

オペレーティングシステム
すべて
タグ
access-controliammssqlsqlserver-2022
参照
CIS Microsoft SQL Server 2022 Benchmark v1.3.0 - 3.11 Ensure the public role in the msdb database is not granted access to SQL Agent proxies

このホストをチェック

監査が許可されているマシンで実行してください。スキャンは読み取り専用です。

shell
tmaegis scan --target mssql