如何為我的 Amazon RDS for SQL Server 執行個體設定密碼政策?

1 分的閱讀內容
0

我想在 Amazon Relational Database Service (Amazon RDS) 中為 Microsoft SQL Server 執行個體設定密碼政策。

簡短說明

系統會在主機層級 (作業系統、Microsoft Windows 層) 設定密碼政策、鎖定和到期間隔。由於 Amazon RDS 為受管服務,因此對作業系統的存取權會受到限制。若要設定密碼政策,請使用資料庫參數。如需詳細資訊,請參閱 Using password policy for SQL Server logins on Amazon RDS for SQL Server

當您使用 SQL Server Management Studio (SSMS) 或 T-SQL 建立或修改登入時,依預設會開啟密碼政策。

解決方法

使用 SQL Server 驗證的登入

如果您的登入使用 SQL Server 驗證,請修改 SQL Server 密碼政策以設定複雜性、長度、到期和鎖定的自訂需求。在自訂資料庫參數群組中設定下列密碼政策資料庫參數:

  • rds.password_complexity_enabled
  • rds.password_min_length
  • rds.password_min_age
  • rds.password_max_age
  • rds.password_lockout_threshold
  • rds.password_lockout_duration
  • rds.password_lockout_reset_counter_after

如需詳細資訊,請參閱密碼政策參數

若要識別執行個體上使用密碼政策和密碼到期設定的 SQL Server 登入,請執行下列查詢:

select name, type_desc, create_date, modify_date, is_policy_checked,
       is_expiration_checked,  isnull(loginproperty(name,'DaysUntilExpiration'),'-') Days_to_Expire,  is_disabled

from sys.sql_logins

以下是 SQL Server 登入密碼政策強制執行和密碼到期的可用選項:

  • policy_checked 欄為 0: SQL Server 登入不會強制執行密碼政策。
  • policy_checked 欄為 1is_expiration_checked0: SQL Server 登入會強制執行密碼複雜性和鎖定,但不會強制執行密碼到期。
  • policy_checked 欄和 is_expiration_checked 皆為 1: SQL Server 登入會強制執行密碼複雜性、鎖定和密碼到期。

使用 Windows 驗證的登入

在 Microsoft Active Directory 中設定 Windows 登入的密碼政策。如需詳細資訊,請參閱 Working with Active Directory with Amazon RDS for SQL Server

AWS 官方
AWS 官方已更新 6 個月前