變更使用者 MFA 權杖簽署 - AWS CloudHSM

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

變更使用者 MFA 權杖簽署

使用 CloudHSM CLI 中的 user change-mfa 命令來更新使用者帳戶的多重要素驗證 (MFA) 設定。任何使用者帳戶均可執行此命令。具有管理員角色的帳戶可以為其他使用者執行此命令。

使用者類型

下列使用者可以執行此命令。

  • 管理員

  • 加密使用者

語法

目前,只有一個多重要素策略供使用者使用:字符簽署。

aws-cloudhsm > help user change-mfa Change a user's Mfa Strategy Usage: user change-mfa <COMMAND> Commands: token-sign Register or Deregister a public key using token-sign mfa strategy help Print this message or the help of the given subcommand(s)

Token Sign 策略需要一個權杖檔案將未簽署的權杖寫入其中。

aws-cloudhsm > help user change-mfa token-sign Register or Deregister a public key using token-sign mfa strategy Usage: user change-mfa token-sign [OPTIONS] --username <USERNAME> --role <ROLE> <--token <TOKEN>|--deregister> Options: --cluster-id <CLUSTER_ID> Unique Id to choose which of the clusters in the config file to run the operation against. If not provided, will fall back to the value provided when interactive mode was started, or error --username <USERNAME> Username of the user that will be modified --role <ROLE> Role the user has in the cluster Possible values: - crypto-user: A CryptoUser has the ability to manage and use keys - admin: An Admin has the ability to manage user accounts --change-password <CHANGE_PASSWORD> Optional: Plaintext user's password. If you do not include this argument you will be prompted for it --token <TOKEN> Filepath where the unsigned token file will be written. Required for enabling MFA for a user --approval <APPROVAL> Filepath of signed quorum token file to approve operation --deregister Deregister the MFA public key, if present --change-quorum Change the Quorum public key along with the MFA key -h, --help Print help (see a summary with '-h')

範例

此命令會將叢集中每個 HSM 的未簽署權杖寫入 token 指定的檔案。當系統提示您時,請在檔案中簽署權杖。

範例 :寫入叢集中每個 HSM 的未簽署權杖
aws-cloudhsm > user change-mfa token-sign --username cu1 --change-password password --role crypto-user --token /path/myfile Enter signed token file path (press enter if same as the unsigned token file): Enter public key PEM file path:/path/mypemfile { "error_code": 0, "data": { "username": "test_user", "role": "admin" } }

引數

<CLUSTER_ID>

執行此作業的叢集識別碼。

必要:如果已設定多個叢集。

<ROLE>

指賦予使用者帳戶的角色。此為必要參數。如需 HSM 上使用者類型的詳細資訊,請參閱了解 HSM 使用者

有效值

  • 管理員:管理員可以管理使用者,但無法管理金鑰。

  • 加密使用者:加密使用者可以建立管理金鑰並在密碼編譯操作時使用該金鑰。

<USERNAME>

為使用者指定易記的名稱。長度上限為 31 個字元。允許的唯一特殊字元是底線 (_)。

建立使用者之後,您就無法再變更使用者的名稱。在 CloudHSM CLI 命令中,角色和密碼需區分大小寫,但使用者名稱不區分大小寫。

必要:是

<CHANGE_PASSWORD>

指正在註冊/取消註冊 MFA 使用者的純文字新密碼。

必要:是

<TOKEN>

將寫入未簽署權杖檔案的檔案路徑。

必要:是

<APPROVAL>

指要核准操作的已簽署規定人數權杖檔案的檔案路徑。只有在規定人數使用者服務規定人數值大於 1 時才需要執行此操作。

<DEREGISTER>

取消註冊 MFA 公有金錀 (如有)。

<CHANGE-QUORUM>

變更規定人數公有金鑰以及 MFA 金鑰。

相關主題