本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
設定 SQL Server 安全性通訊協定和密碼
您可以使用資料庫參數開啟和關閉特定安全性通訊協定和密碼。您可以設定的安全性參數 (TLS 1.2 版除外) 如下表所示。
| 資料庫參數 | 允許的值 (預設值以粗體表示) | 描述 |
|---|---|---|
| rds.tls10 | default、enabled、disabled | TLS 1.0。 |
| rds.tls11 | default、enabled、disabled | TLS 1.1。 |
| rds.tls12 | default | TLS 1.2。您無法修改此值。 |
| rds.fips | 0、1 |
當您將參數設定為 1 時,RDS 會強制使用符合美國聯邦資訊處理標準 (FIPS) 140-2 標準的模組。 如需詳細資訊,請參閱 Microsoft 文件中使用符合 FIPS 140-2 模式的 SQL Server 2016 |
| rds.rc4 | default、enabled、disabled | RC4 串流密碼。 |
| rds.diffie-hellman | default、enabled、disabled | Diffie-Hellman 金鑰交換加密。 |
| rds.diffie-hellman-min-key-bit-length | default、1024、2048、3072、4096 | Diffie-Hellman 金鑰的最小位元長度。 |
| rds.curve25519 | default、enabled、disabled | Curve25519 橢圓曲線加密密碼。並非所有引擎版本都支援此參數。 |
| rds.3des168 | default、enabled、disabled | 具有 168 位元金鑰長度的三重資料加密標準 (DES) 加密密碼。 |
注意
對於 16.00.4120.1、15.00.4365.2、14.00.3465.1、13.00.6435.1 和 12.00.6449.1 之後的次要引擎版本,會停用資料庫參數 rds.tls10、rds.tls11、rds.rc4、rds.curve25519 和 rds.3des168 的預設設定。其他版本的預設設定會啟用。
對於 16.00.4120.1、15.00.4365.2、14.00.3465.1、13.00.6435.1 和 12.00.6449.1 之後的次要引擎版本,rds.diffie-hellman-min-key-bit-length 的預設設定為 3072。其他版本的預設設定為 2048。
請使用下列程序來設定安全性通訊協定和密碼:
-
建立自訂資料庫參數群組。
-
修改參數群組中的參數。
-
將資料庫參數群組與您的資料庫執行個體建立關聯。
如需資料庫參數群組的詳細資訊,請參閱Amazon RDS 的參數群組。
建立安全性相關參數群組
為對應到 SQL Server 版本和資料庫執行個體版本的安全性相關參數建立參數群組。
下列範例會建立 SQL Server Standard Edition 2016 的參數群組。
建立參數群組
登入 AWS 管理主控台,開啟位於 https://console.aws.amazon.com/rds/
的 Amazon RDS 主控台。 -
在導覽窗格中,選擇 Parameter groups (參數群組)。
-
選擇 Create parameter group (建立參數群組)。
-
在 Create parameter group (建立參數群組) 窗格中執行下列動作:
-
對於 Parameter group family (參數群組家族),請選擇 sqlserver-se-13.0。
-
對於 Group name (群組名稱),輸入參數群組的識別碼,例如
sqlserver-ciphers-se-13。 -
對於 Description (說明),輸入
Parameter group for security protocols and ciphers。
-
-
選擇建立。
下列範例會建立 SQL Server Standard Edition 2016 的參數群組。
建立參數群組
-
請執行下列其中一個命令:
針對 Linux、macOS 或 Unix:
aws rds create-db-parameter-group \ --db-parameter-group-namesqlserver-ciphers-se-13\ --db-parameter-group-family "sqlserver-se-13.0" \ --description "Parameter group for security protocols and ciphers"針對 Windows:
aws rds create-db-parameter-group ^ --db-parameter-group-namesqlserver-ciphers-se-13^ --db-parameter-group-family "sqlserver-se-13.0" ^ --description "Parameter group for security protocols and ciphers"
修改安全性相關參數
修改參數群組中對應至 SQL Server 版本和資料庫執行個體版本的安全性相關參數。
下列範例會修改您為 SQL Server Standard Edition 2016 建立的參數群組。此範例會關閉 TLS 1.0 版。
修改參數群組
登入 AWS 管理主控台,開啟位於 https://console.aws.amazon.com/rds/
的 Amazon RDS 主控台。 -
在導覽窗格中,選擇 Parameter groups (參數群組)。
-
選擇參數群組,例如 sqlserver-ciphers-se-13。
-
在 Parameters (參數) 下,篩選
rds的參數清單。 -
選擇 Edit parameters (編輯參數)。
-
選擇 rds.tls10。
-
對於 Values (值),選擇 disabled。
-
選擇儲存變更。
下列範例會修改您為 SQL Server Standard Edition 2016 建立的參數群組。此範例會關閉 TLS 1.0 版。
修改參數群組
-
請執行下列其中一個命令:
針對 Linux、macOS 或 Unix:
aws rds modify-db-parameter-group \ --db-parameter-group-namesqlserver-ciphers-se-13\ --parameters "ParameterName='rds.tls10',ParameterValue='disabled',ApplyMethod=pending-reboot"針對 Windows:
aws rds modify-db-parameter-group ^ --db-parameter-group-namesqlserver-ciphers-se-13^ --parameters "ParameterName='rds.tls10',ParameterValue='disabled',ApplyMethod=pending-reboot"
將安全性相關參數群組與資料庫執行個體建立關聯
若要將參數群組與資料庫執行個體建立關聯,請使用 AWS 管理主控台 或 AWS CLI。
您可以將參數群組與新的或現有的資料庫執行個體建立關聯。
-
對於新的資料庫執行個體,請在啟動執行個體時建立關聯。如需更多詳細資訊,請參閱 建立 Amazon RDS 資料庫執行個體。
-
對於現有的資料庫執行個體,請透過修改執行個體來建立關聯。如需詳細資訊,請參閱 修改 Amazon RDS 資料庫執行個體。
您可以將參數群組與新的或現有的資料庫執行個體建立關聯。
使用參數群組建立資料庫執行個體
-
指定建立參數群組時所使用的相同資料庫引擎類型和主要版本。
針對 Linux、macOS 或 Unix:
aws rds create-db-instance \ --db-instance-identifiermydbinstance\ --db-instance-classdb.m5.2xlarge\ --enginesqlserver-se\ --engine-version13.00.5426.0.v1\ --allocated-storage100\ --master-user-passwordsecret123\ --master-usernameadmin\ --storage-typegp2\ --license-modelli\ --db-parameter-group-namesqlserver-ciphers-se-13針對 Windows:
aws rds create-db-instance ^ --db-instance-identifiermydbinstance^ --db-instance-classdb.m5.2xlarge^ --enginesqlserver-se^ --engine-version13.00.5426.0.v1^ --allocated-storage100^ --master-user-passwordsecret123^ --master-usernameadmin^ --storage-typegp2^ --license-modelli^ --db-parameter-group-namesqlserver-ciphers-se-13注意
指定此處所顯示提示以外的密碼,作為安全最佳實務。
修改資料庫執行個體並建立參數群組的關聯
-
請執行下列其中一個命令:
針對 Linux、macOS 或 Unix:
aws rds modify-db-instance \ --db-instance-identifiermydbinstance\ --db-parameter-group-namesqlserver-ciphers-se-13\ --apply-immediately針對 Windows:
aws rds modify-db-instance ^ --db-instance-identifiermydbinstance^ --db-parameter-group-namesqlserver-ciphers-se-13^ --apply-immediately