재해 복구를 위해 AWS Private Certificate Authority를 구성하는 방법을 알고 싶습니다.
해결 방법
AWS Private CA는 여러 AWS 리전에서 사용할 수 있으므로 여러 리전에 중복된 하위 CA를 생성할 수 있습니다. 그런 다음, 하위 CA를 단일 리전의 동일한 루트 CA에 체이닝합니다.
다음 단계를 완료하십시오.
-
루트 CA 리전(root_CA_region)과 다른 AWS 리전(sub_CA_2_region)에서 하위 CA(sub_CA_2)를 생성합니다.
-
다음 명령을 실행하여 sub_CA_2_region에서 sub_CA_2를 가져옵니다.
aws acm-pca get-certificate-authority-csr --certificate-authority-arn sub_CA_2_ARN --region sub_CA_2_region
-
다음 명령을 실행하여 root_CA_region의 루트 CA에서 sub_CA_2 인증서를 발급합니다.
aws acm-pca issue-certificate --certificate-authority-arn root_CA_ARN --csr fileb://<CSRfile> --signing-algorithm SHA256WITHRSA --template-arn arn:aws:acm-pca:::template/SubordinateCACertificate_PathLen1/V1 --validity Value=5,Type="YEARS" --region root_CA_region
-
다음 명령을 실행하여 sub_CA_2 인증서의 인증서 및 인증서 체인을 가져옵니다.
aws acm-pca get-certificate --certificate-authority-arn root_CA_ARN --certificate-arn certificate-arn-from-the-previous-step --region root_CA_region --output json > cert.json
-
다음 명령을 실행하여 인증서 및 인증서 체인을 두 파일로 분리합니다.
cert.pem for the subordinate CA certificate
cert_chain.pem for the root CA certificate chain details
cat cert.json | jq -r .Certificate > cert.pem
cat cert.json | jq -r .CertificateChain > cert_chain.pem
-
다음 명령을 실행하여 sub_CA_2에 서명된 인증서를 sub_CA_2_region으로 가져옵니다.
aws acm-pca import-certificate-authority-certificate --certificate-authority-arn sub_CA_2_ARN --certificate fileb://cert.pem --certificate-chain fileb://cert_chain.pem --region sub_CA_2_region
이제 두 번째 리전의 하위 CA 설정이 완료되었으며 재해 복구용 프라이빗 인증서를 발급하는 데 사용할 수 있습니다.
자세한 내용은 중복성 및 재해 복구를 참조하십시오.
관련 정보
AWS Private CA 모범 사례