키 임포트 펜 - AWS CloudHSM

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

키 임포트 펜

key import pem 명령은 PEM 형식 키를 HSM으로 AWS CloudHSM 가져옵니다. 이 명령을 사용하여 HSM 외부에서 생성된 퍼블릭 키를 가져올 수 있습니다.

참고

키 생성-파일명령을 사용하여 공개 키에서 표준 PEM 파일을 만들거나 개인 키에서 참조 PEM 파일을 만들 수 있습니다.

사용자 유형

다음 사용자 유형이 이 명령을 실행할 수 있습니다.

  • CU(Crypto User)

요구 사항

  • 이 명령을 실행하려면 CU로 로그인해야 합니다.

구문

aws-cloudhsm > help key import pem Import key from a PEM file Usage: key import pem [OPTIONS] --path <PATH> --label <LABEL> --key-type-class <KEY_TYPE_CLASS> 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 --path PATH> Path where the key is located in PEM format --label LABEL> Label for the imported key --key-type-class KEY_TYPE_CLASS> Key type and class of the imported key [possible values: ec-public, rsa-public] --attributes [IMPORT_KEY_ATTRIBUTES>...] Space separated list of key attributes in the form of KEY_ATTRIBUTE_NAME=KEY_ATTRIBUTE_VALUE for the imported key -h, --help Print help

예제

이 예제에서는 key import pem 명령을 사용하여 파일에서 PEM 형식의 RSA 공개 키를 가져오는 방법을 보여줍니다.

예: RSA 퍼블릭 키 가져오기
aws-cloudhsm > key import pem --path /home/example --label example-imported-key --key-type-class rsa-public { "error_code": 0, "data": { "key": { "key-reference": "0x00000000001e08e3", "key-info": { "key-owners": [ { "username": "cu1", "key-coverage": "full" } ], "shared-users": [], "cluster-coverage": "session" }, "attributes": { "key-type": "rsa", "label": "example-imported-key", "id": "0x", "check-value": "0x99fe93", "class": "public-key", "encrypt": false, "decrypt": false, "token": false, "always-sensitive": false, "derive": false, "destroyable": true, "extractable": true, "local": false, "modifiable": true, "never-extractable": false, "private": true, "sensitive": false, "sign": false, "trusted": false, "unwrap": false, "verify": false, "wrap": false, "wrap-with-trusted": false, "key-length-bytes": 512, "public-exponent": "0x010001", "modulus": "0x8e9c172c37aa22ed1ce25f7c3a7c936dadc532201400128b044ebb4b96│··3e4930ab910df5a2896eaeb8853cfea0e341227654a8337a7864cc8a87d136f006cfba9e68d0b329│··746c1ad60941668b18699fc8169ff1ec363d0d18292845b2454d6a0b8c5d111b79c047619d460cdf│··be59debbacb66b7abeaf3f3d35dd2b9cfa6b6b7b1258b6866cb4085ac749e9d8552b3a4509e1b86c│··828cc794e22767b4f6b5bc6ff5c96f4b7e60eab305d669cfa2197e85379cb35c659bb58fcd246d48│··d9f6a7f36063b42da025459275aa8e3abedad775387086bd6c198ded868403f4b87ffda5a2d455ac│··aa6cbd00003c31d8d2f51d10cd272b31cf0c4037791f48ad51fb35", "modulus-size-bits": 2048 } }, "message": "Successfully imported key" } }
예: 선택적 속성이 있는 RSA 공개 키 가져오기
aws-cloudhsm > key import pem --path /home/example --label example-imported-key-with-attributes --key-type-class rsa-public --attributes verify=true { "error_code": 0, "data": { "key": { "key-reference": "0x00000000001e08e3", "key-info": { "key-owners": [ { "username": "cu1", "key-coverage": "full" } ], "shared-users": [], "cluster-coverage": "session" }, "attributes": { "key-type": "rsa", "label": "example-imported-key-with-attributes", "id": "0x", "check-value": "0x99fe93", "class": "public-key", "encrypt": false, "decrypt": false, "token": false, "always-sensitive": false, "derive": false, "destroyable": true, "extractable": true, "local": false, "modifiable": true, "never-extractable": false, "private": true, "sensitive": false, "sign": false, "trusted": false, "unwrap": false, "verify": true, "wrap": false, "wrap-with-trusted": false, "key-length-bytes": 512, "public-exponent": "0x010001", "modulus": "0x8e9c172c37aa22ed1ce25f7c3a7c936dadc532201400128b044ebb4b96│··3e4930ab910df5a2896eaeb8853cfea0e341227654a8337a7864cc8a87d136f006cfba9e68d0b329│··746c1ad60941668b18699fc8169ff1ec363d0d18292845b2454d6a0b8c5d111b79c047619d460cdf│··be59debbacb66b7abeaf3f3d35dd2b9cfa6b6b7b1258b6866cb4085ac749e9d8552b3a4509e1b86c│··828cc794e22767b4f6b5bc6ff5c96f4b7e60eab305d669cfa2197e85379cb35c659bb58fcd246d48│··d9f6a7f36063b42da025459275aa8e3abedad775387086bd6c198ded868403f4b87ffda5a2d455ac│··aa6cbd00003c31d8d2f51d10cd272b31cf0c4037791f48ad51fb35", "modulus-size-bits": 2048 } }, "message": "Successfully imported key" } }

인수

<CLUSTER_ID>

이 작업을 실행할 클러스터의 ID입니다.

필수: 여러 클러스터가 구성된 경우.

<PATH>

키 파일이 있는 파일 경로를 지정합니다.

필수 여부: 예

<LABEL>

가져온 키의 사용자 정의 레이블을 지정합니다. label에 허용되는 최대 크기는 126자입니다.

필수 여부: 예

<KEY_TYPE_CLASS>

래핑된 키의 키 유형 및 클래스

가능한 값은 다음과 같습니다.

  • ec-퍼블릭

  • RS-퍼블릭

필수 여부: 예

<IMPORT_KEY_ATTRIBUTES>

가져온 키에 대해 설정할 키 속성의 공백으로 구분된 목록 KEY_ATTRIBUTE_NAME=KEY_ATTRIBUTE_VALUE (예:token=true) 을 지정합니다. 지원되는 키 속성 목록은 CloudHSM CLI의 키 속성 섹션을 참조하십시오.

필수 여부: 아니요

관련 주제