user change-mfa token-sign - AWS CloudHSM

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

user change-mfa token-sign

使用 CloudHSM CLI 中的 user change-mfa 命令更新用户账户的多重身份验证(MFA)设置。任何用户账户均可运行此命令。担当管理员角色的账户可为其他用户运行此命令。

用户类型

以下用户均可运行此命令。

  • Admin

  • 加密用户

语法

目前,只有一种多重策略可供用户使用:令牌签名。

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)

令牌签名策略要求提供一个用于写入未签名令牌的令牌文件。

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>

要运行此操作的集群的 ID。

必需:如果已配置多个集群。

<ROLE>

指定赋予用户账户的角色。此参数为必需参数。有关 HSM 上的用户类型的详细信息,请参阅了解 HSM 用户

有效值

  • 管理员:管理员可以管理用户,却无法管理密钥。

  • 加密用户:加密用户可以创建管理密钥并在加密操作中使用密钥。

<USERNAME>

为用户指定友好名称。最大长度为 31 个字符。唯一允许的特殊字符是下划线 ( _ )。

用户名在创建之后无法更改。在 CloudHSM CLI 命令中,角色和密码区分大小写,但用户名不区分大小写。

必需:是

<CHANGE_PASSWORD>

指定要注册/注销 MFA 的用户的纯文本新密码。

必需:是

<TOKEN>

将写入未签名令牌文件的文件路径。

必需:是

<APPROVAL>

指定要批准操作的已签名仲裁令牌文件的文件路径。仅当仲裁用户服务仲裁值大于 1 时才需要。

<DEREGISTER>

注销 MFA 公有密钥(如有)。

<CHANGE-QUORUM>

更改仲裁公有密钥和 MFA 密钥。

相关 主题