本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
與 Amazon DCV Connection Gateway 整合
Amazon DCV Connection Gateway 是可安裝的軟體套件,可讓使用者透過單一存取點存取 LAN或 的 Amazon DCV 伺服器機群VPC。
如果您的基礎設施包含可透過 Amazon DCV Connection Gateway 存取的 Amazon DCV 伺服器,您可以設定 Session Manager 來整合 Amazon DCV Connection Gateway。遵循下節中概述的步驟,代理程式將充當 Connection Gateway 的工作階段解析程式。換句話說,代理程式會公開其他HTTP端點。Connection Gateway 將API呼叫端點,以擷取將 Amazon DCV連線路由至代理程式選取的主機所需的資訊。
主題
將 Session Manager Broker 設定為 Amazon DCV Connection Gateway 的工作階段解析程式
Session Manager 代理程式端
/etc/dcv-session-manager-broker/session-manager-broker.properties
使用您偏好的文字編輯器開啟 ,並套用下列變更:設定
enable-gateway = true
gateway-to-broker-connector-https-port
設定為可用TCP連接埠 (預設為 8447)gateway-to-broker-connector-bind-host
設定為代理程式為 Amazon DCV Connection Gateway 連線繫結的主機 IP 地址 (預設為 0.0.0.0)
然後執行下列命令來停止並重新啟動代理程式:
sudo systemctl stop dcv-session-manager-broker
sudo systemctl start dcv-session-manager-broker
擷取代理程式自我簽署憑證的副本,並將其放在您的使用者目錄中。
sudo cp /var/lib/dcvsmbroker/security/dcvsmbroker_ca.pem $HOME
在下一個步驟中安裝 Amazon DCV Connection Gateway 時,您將需要它。
Amazon DCV Connection Gateway 端
-
請遵循 Amazon DCV Connection Gateway 文件中的 一節。
由於 Amazon DCV Connection Gateway HTTPAPI會呼叫代理程式,如果代理程式使用自我簽署憑證,您將需要將代理程式憑證複製到 Amazon DCV Connection Gateway 主機 (在上一個步驟中擷取),並在 Amazon DCV Connection Gateway 組態的
[resolver]
區段中設定ca-file
參數。
選用 - 啟用TLS用戶端身分驗證
完成上一個步驟後,Session Manager 和 Connection Gateway 可以透過安全頻道進行通訊,連線閘道可以驗證 Session Manager Brokers 的身分。如果您需要 Session Manager Brokers 在建立安全頻道之前驗證 Connection Gateway 的身分,則需要按照下一節中的步驟啟用TLS用戶端身分驗證功能。
注意
如果 Session Manager 位於負載平衡器後方,則無法使用已終止TLS連線的負載平衡器啟用TLS用戶端身分驗證,例如 Application Load Balancer (ALBs) 或 Gateway Load Balancer ()GLBs。僅支援沒有TLS終止的負載平衡器,例如 Network Load Balancer (NLBs)。如果您使用 ALBs或 GLBs,您可以強制執行只有特定安全群組可以聯絡負載平衡器,確保額外的安全層級;有關安全群組的詳細資訊,請參閱此處:您 的安全群組 VPC
Session Manager 代理程式端
若要啟用 Session Manager Brokers 與 Amazon DCV Connection Gateway 之間通訊的TLS用戶端身分驗證,請遵循下列步驟:
執行 來產生所需的金鑰和憑證: 命令的輸出會告訴您產生憑證的資料夾,以及用來建立 TrustStore 檔案的密碼。
sudo /usr/share/dcv-session-manager-broker/bin/gen-gateway-certificates.sh
將 Amazon DCV Connection Gateway 的私有金鑰和自我簽署憑證的副本放入您的使用者目錄中。在下一個步驟中,當您在 Amazon DCV Connection Gateway 中啟用TLS用戶端身分驗證時,將需要它。
sudo cp /etc/dcv-session-manager-broker/resolver-creds/dcv_gateway_key.pem $HOME
sudo cp /etc/dcv-session-manager-broker/resolver-creds/dcv_gateway_cert.pem $HOME
然後使用您偏好的文字編輯器open /etc/dcv-session-manager-broker/session執行下列動作:
enable-tls-client-auth-gateway
設定為true
gateway-to-broker-connector-trust-store-file
設定為上一個步驟中建立之 TrustStore 檔案的路徑gateway-to-broker-connector-trust-store-pass
設定為用於在上一個步驟中建立 TrustStore 檔案的密碼
然後執行下列命令來停止並重新啟動代理程式:
sudo systemctl stop dcv-session-manager-broker
sudo systemctl start dcv-session-manager-broker
Amazon DCV Connection Gateway 端
請遵循 Amazon DCV Connection Gateway 文件中的 一節。
在
[resolver]
區段中設定cert-file
參數時,使用您在上一個步驟中複製的憑證檔案的完整路徑在
[resolver]
區段中設定cert-key-file
參數時,使用您在上一個步驟中複製之金鑰檔案的完整路徑