투케이2K

74. (Aws/Amazon) [Aws Iot Core] Aws Iot Core 프로비저닝에 사용 되는 클레임 인증서 종류 설명 및 생성 방법 정리 본문

Aws (Amazon)

74. (Aws/Amazon) [Aws Iot Core] Aws Iot Core 프로비저닝에 사용 되는 클레임 인증서 종류 설명 및 생성 방법 정리

투케이2K 2025. 7. 1. 20:11
728x90

[개발 환경 설정]

개발 환경 : Aws / Amazon Web Services

 

[설명 정리]

// --------------------------------------------------------------------------------------
[개발 및 환경]
// --------------------------------------------------------------------------------------

- 인프라 : Aws / Amazon Web Services

- 기술 구분 : Aws / Iot / 보안 / 인증서 / 정책

- 사전) aws iot core 프로비저닝 동작 수행 인프라 환경 구축 필요

// --------------------------------------------------------------------------------------






// --------------------------------------------------------------------------------------
[설 명]
// --------------------------------------------------------------------------------------

1. Aws Iot Core 프로비저닝 수행 인증서 파일 설명 : 

  >> certificate.pem.crt: 디바이스 인증서

  >> private.pem.key: 디바이스 개인 키

  >> public.pem.key: 디바이스 공개 키

  >> ca1.pem: AWS IoT Core에서 사용하는 CA 인증서


2. OpenSSL로 인증서 파일 생성하기 : 

  >> 디바이스 키 쌍 생성 (개인 키 & 공개 키)

    openssl genpkey -algorithm RSA -out private.pem.key -pkeyopt rsa_keygen_bits:2048
    openssl rsa -in private.pem.key -pubout -out public.pem.key


  >> 디바이스 인증서 서명 요청 (CSR)

    openssl req -new -key private.pem.key -out device.csr -subj "/CN=MyIoTDevice"


  >> 자체 CA로 디바이스 인증서 서명
    
    # Root CA 키 및 인증서 생성
    openssl genrsa -out rootCA.key 4096
    openssl req -x509 -new -nodes -key rootCA.key -sha256 -days 3650 -out ca1.pem -subj "/CN=MyRootCA"

    
    # 디바이스 인증서 서명
    openssl x509 -req -in device.csr -CA ca1.pem -CAkey rootCA.key -CAcreateserial -out certificate.pem.crt -days 365 -sha256


3. AWS IoT Core 에 등록하기

  >> CA 인증서 등록 : AWS IoT 콘솔 → "Security" → "CA certificates" → "Register a CA certificate"

  >> 디바이스 인증서 등록 : AWS IoT 콘솔 → "Security" → "Certificates" → "Create" → "Use my own certificate"

  >> 디바이스 등록 및 정책 연결 : Thing 생성 → 인증서 연결 → 정책 연결

// --------------------------------------------------------------------------------------






// --------------------------------------------------------------------------------------
[참고 사이트]
// --------------------------------------------------------------------------------------

[Aws 콘솔 로그인 방법]

https://blog.naver.com/kkh0977/223688994642


[Aws Iot Core 프로비저닝 수행 후 생성 된 사물 확인 및 인증서 정보 확인 방법]

https://blog.naver.com/kkh0977/223690097561


[Aws Iot Core 프로비저닝을 통해 생성된 사물 (ThingName) 과 매핑 된 템플릿 (Template) 종류 확인]

https://blog.naver.com/kkh0977/223698053435


[안드로이드 Aws 프로비저닝 로직 정리]

https://blog.naver.com/kkh0977/223558081843?trackingCode=blog_bloghome_searchlist

// --------------------------------------------------------------------------------------
 
 



728x90
반응형
Comments