設定 ONTAP 中介器屬性
您可以設定 ONTAP Mediator 主機端屬性,包括憑證相關設定和組態置換。
ONTAP Mediator 可設定的設定
ONTAP Mediator 支援多個可設定的設定。這些設定的預設值提供於一個 `low_space_threshold_mib: 10`唯讀檔案中。該檔案位於:
/opt/netapp/lib/ontap_mediator/ontap_mediator/server_config/ontap_mediator.user_config.yaml
所有放置在 `ontap_mediator.user_config.yaml`中的值都將置換預設值,並在所有 ONTAP Mediator 升級中保持不變。
修改完成後 ontap_mediator.user_config.yaml,重新啟動 ONTAP Mediator:
systemctl restart ontap_mediator
本節所述的 ONTAP Mediator 屬性可以根據需要進行修改。
|
|
ontap_mediator.config.yaml 中的其他預設值不應變更,因為在 ONTAP Mediator 升級期間不會保留修改後的值。
|
您可以藉由將所需的變數複製到 ontap_mediator.user_config.yaml 檔案來修改 ONTAP Mediator 屬性,以置換預設設定。
安裝第三方 SSL 憑證
您可以透過修改 ONTAP Mediator 組態檔案,將預設的自簽憑證取代為第三方 SSL 憑證。
若要將預設的自簽憑證替換為第三方 SSL 憑證,請修改下列檔案中的某些屬性:
-
/opt/netapp/lib/ontap_mediator/ontap_mediator/server_config/ontap_mediator.config.yaml -
/opt/netapp/lib/ontap_mediator/uwsgi/ontap_mediator.ini
這些檔案中的變數用於控制 ONTAP Mediator 使用的憑證檔案。
下表列出的預設變數包含在 /opt/netapp/lib/ontap_mediator/ontap_mediator/server_config/ontap_mediator.config.yaml 檔案中。
| 變數 | 路徑 |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-
cert_valid_days用於設定用戶端憑證的有效期限。最大值為三年(1095 天)。 -
x509_passin_pwd是已簽署用戶端憑證的密碼短語。
下表列出的預設變數包含在 /opt/netapp/lib/ontap_mediator/uwsgi/ontap_mediator.ini 檔案中。
| 變數 | 路徑 |
|---|---|
|
|
|
|
|
|
下表列出的預設變數包含在 /opt/netapp/lib/ontap_mediator/ontap_mediator/server_config/ontap_mediator.config.yaml 檔案中。
| 變數 | 路徑 |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-
cert_valid_days用於設定用戶端憑證的有效期限。最大值為三年(1095 天)。 -
x509_passin_pwd是已簽署用戶端憑證的密碼短語。
下表列出的預設變數包含在 /opt/netapp/lib/ontap_mediator/uwsgi/ontap_mediator.ini 檔案中。
| 變數 | 路徑 |
|---|---|
|
|
|
|
|
|
如果您修改了這些屬性,請重新啟動 ONTAP Mediator 以套用變更。如需如何以第三方憑證取代預設憑證的詳細指示,請參閱 "以受信任的第三方憑證取代自簽憑證"。
設定密碼攻擊保護
以下設定可提供保護,以防範暴力密碼猜測攻擊。
若要啟用該功能,請為 `window_seconds`和 `retry_limit`設定一個值。
-
提供 5 分鐘的猜測時間,然後將失敗次數重設為零:
authentication_lock_window_seconds: 300 -
如果在時間範圍內發生五次失敗,則鎖定帳戶:
authentication_retry_limit: 5 -
透過在拒絕每次嘗試之前設定延遲來降低暴力破解密碼攻擊的影響,從而減緩攻擊速度。
authentication_failure_delay_seconds: 5authentication_failure_delay_seconds: 0 # seconds (float) to delay failed auth attempts prior to response, 0 = no delay authentication_lock_window_seconds: null # seconds (int) since the oldest failure before resetting the retry counter, null = no window authentication_retry_limit: null # number of retries to allow before locking API access, null = unlimited
設定密碼複雜度規則
以下欄位控制 ONTAP Mediator API 使用者帳戶的密碼複雜度規則。
password_min_length: 8 password_max_length: 64 password_uppercase_chars: 0 # min. uppercase characters password_lowercase_chars: 1 # min. lowercase character password_special_chars: 1 # min. non-letter, non-digit password_nonletter_chars: 2 # min. non-letter characters (digits, specials, anything)
設定 ONTAP Mediator 磁碟和記錄空間設定,包括可用空間臨界值和保留的記錄空間。
設定可用空間臨界值
有些設定可以控制 `/opt/netapp/lib/ontap_mediator`磁碟上所需的可用空間。
如果空間小於設定的臨界值,則服務會發出警告事件。
low_space_threshold_mib: 10
設定預留記錄空間
此 `RESERVE_LOG_SPACE`功能由特定設定控制。預設情況下,ONTAP Mediator 安裝會建立一個分隔的磁碟空間用於儲存日誌。安裝程式會建立一個新的固定大小的檔案,佔用 700MB 的磁碟空間,專門用於 ONTAP Mediator 記錄。
若要停用此功能並使用預設磁碟空間,請執行下列步驟:
-
將下列檔案中的 RESERVE_LOG_SPACE 值從 1 改為 0:
/opt/netapp/lib/ontap_mediator/tools/mediator_env-
執行下列命令:
cat /opt/netapp/lib/ontap_mediator/tools/mediator_env | grep "RESERVE_LOG_SPACE"RESERVE_LOG_SPACE=0
-
重新啟動 ONTAP 中介器:
systemctl restart ontap_mediator
-
若要重新啟用功能,請將值從 0 變更為 1,然後重新啟動 Mediator。
|
|
切換磁碟空間不會清除現有的記錄。所有先前的記錄都會備份,然後在切換並重新啟動 Mediator 後移至目前的磁碟空間。 |