aws ssl 인증서 갱신 2

문학적인유사성·2022년 6월 10일
0

AWS

목록 보기
19/64

aws 인증서 갱신하면서 겪었던 일들 정리

aws에서 발급한 확장자로 하면 자동 갱신이 알아서되고, 그냥 인증만 하면 되었다.. 너무 쉬웠는데
1) 외부CA업체에서 인증을 하거나
2) self-signed ssl인증서를 갱신할 때는 문제가 있었음...

일단 필요한 파일은 다음과 같았다.
1) 도메인 인증서 (.crt or .cer )
2) 키체인(중간인증서 + CAroot인증서) (.crt or .cer ) 이 부분에 대한 개념이 정확하게 잡혀있지 않았다.
3) 프라이빗 키 (.key or .pem )

ACM 등록시 오류는 클라우드 트레일 이벤트 확인으로 정확한 오류가 생기는 것을 확인이 가능하다.

  • EventName 'ImportCertificate' and see multiple failed calls with the error code "ValidationException" and the error message as "Provided certificate is not a valid self signed.
  • provide either a valid self-signed certificate or certificate chain." This error message indicates that you were trying to import the certificate without a certificate chain.

형식이 맞지않아 import가 안되는 오류가 생길 때

처음에 안되었을때는 형식이 달랐다.
형식을 바꾸는 것은 openssl에서 대부분 지원한다.
$ openssl rsa -in -out 이 것 사용하면 되었었다.
참조했던 형식은 다음과 같았다.

[1]https://docs.aws.amazon.com/ko_kr/acm/latest/userguide/import-certificate-format.html
[2]https://docs.aws.amazon.com/acm/latest/userguide/import-certificate-prerequisites.html
[3]https://docs.aws.amazon.com/acm/latest/userguide/import-certificate-api-cli.html

중간 인증서와 루트 인증서

CA인증기관에서 ssl인증서를 발급받은 경우, 키체인이 필요하다.
ssl(도메인) -> 중간인증서(인증서를 서명해줌) -> 루트 인증서 (인증기관의 자체서명)

1) TLS Handshaking ( 인증서 전달받음 )
2) root인증서 비교
3) Root 인증서로 본인것 확인
4) 중간 인증서로 root 확인
5) 인증서로 확인
6) ok.

이런 구조로 흘러가는 것같다.


벨로그에 바로 확인한 인증서 모습이다.
[4] https://brunch.co.kr/@sangjinkang/47
[5] https://eunhyee.tistory.com/238
[6] https://infoacetech.net/ko/%E7%B6%B2%E7%B5%A1%E5%AE%89%E5%85%A8/ssl%E8%AD%89%E6%9B%B8%E9%8F%88/

profile
유사 IT 항해

0개의 댓글