# SDK3のCloudHSMのクライアントツールを起動します
PS C:\Program Files\Amazon\CloudHSM> .\cloudhsm_mgmt_util.exe C:\ProgramData\Amazon\CloudHSM\data\cloudhsm_mgmt_util.cfg
Ignoring E2E enable flag in the configuration file
Connecting to the server(s), it may take time
depending on the server(s) load, please wait...
Connecting to server '172.31.55.66': hostname '172.31.55.66', port 2225...
Connected to server '172.31.55.66': hostname '172.31.55.66', port 2225.
# end to endの暗号化を有効にします
aws-cloudhsm>enable_e2e
E2E enabled on server 0(172.31.55.66)
# 必須ではないですが、現在のUserの一覧を確認します。PRECOとAUが存在していることが確認できます。
aws-cloudhsm>listUsers
Users on server 0(172.31.55.66):
Number of users found:2
User Id User Type User Name MofnPubKey LoginFailureCnt 2FA
1 PRECO admin NO 0 NO
2 AU app_user NO 0 NO
# HSMをアクティベートするための一時的なユーザを作成します。passwordはこの後変更するのでわかりやすいものにしても問題ないです。
aws-cloudhsm>loginHSM PRECO admin password
loginHSM success on server 0(172.31.55.66)
# こちらのコマンドで、PRECOのユーザーであるadminのパスワードを変更します。
aws-cloudhsm>changePswd PRECO admin {NewPassword}
*************************CAUTION********************************
This is a CRITICAL operation, should be done on all nodes in the
cluster. AWS does NOT synchronize these changes automatically with the
nodes on which this operation is not executed or failed, please
ensure this operation is executed on all nodes in the cluster.
****************************************************************
# 問題なければyを選択し続ける
Do you want to continue(y/n)?y
Changing password for admin(PRECO) on 1 nodes
changePswd success on server 0(172.31.55.66)
# 念のためもう一度ユーザーの確認をします。
aws-cloudhsm>listUsers
Users on server 0(172.31.55.66):
Number of users found:2
User Id User Type User Name MofnPubKey LoginFailureCnt 2FA
1 CO admin NO 0 NO
2 AU app_user NO 0 NO
# SDK3のCloudHSMのクライアントツールを起動します
C:\Program Files\Amazon\CloudHSM>.\cloudhsm_mgmt_util.exe C:\ProgramData\Amazon\CloudHSM\data\cloudhsm_mgmt_util.cfg
Ignoring E2E enable flag in the configuration file
Connecting to the server(s), it may take time
depending on the server(s) load, please wait...
Connecting to server '172.31.58.6': hostname '172.31.58.6', port 2225...
Connected to server '172.31.58.6': hostname '172.31.58.6', port 2225.
E2E enabled on server 0(172.31.58.6)
# COのユーザでログインします。{CO_password}は前の手順でPRECOのパスワード変更時に入れたものと同じです。
aws-cloudhsm>loginHSM CO admin {CO_password}
loginHSM success on server 0(172.31.58.6)
# CUのユーザを作成します、{CU_user} {CU_password}には任意のユーザー名とパスワードを入れてください
aws-cloudhsm>createUser CU {CU_user} {CU_password}
*************************CAUTION********************************
This is a CRITICAL operation, should be done on all nodes in the
cluster. AWS does NOT synchronize these changes automatically with the
nodes on which this operation is not executed or failed, please
ensure this operation is executed on all nodes in the cluster.
****************************************************************
# 問題なければyを選択し続ける
Do you want to continue(y/n)?y
Creating User CU_user(CU) on 1 nodes
createUser success on server 0(172.31.58.6)
# すでに作成済みのCOと既存のAUユーザーのほかに、CUユーザーが作成されたか確認する
aws-cloudhsm>listUsers
Users on server 0(172.31.58.6):
Number of users found:3
User Id User Type User Name MofnPubKey LoginFailureCnt 2FA
1 CO admin NO 0 NO
2 AU app_user NO 0 NO
3 CU CU_user NO 0 NO