This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.1.13.4. 외부 인증 기관 키 및 인증서 추가
기본적으로 Red Hat OpenShift Service Mesh는 자체 서명된 루트 인증서와 키를 생성하고 이를 사용하여 워크로드 인증서에 서명합니다. 사용자 정의 인증서 및 키를 사용하여 사용자 정의 루트 인증서로 워크로드 인증서에 서명할 수도 있습니다. 이 작업은 인증서와 키를 서비스 메시에 연결하는 예제를 보여줍니다.
사전 요구 사항
- 인증서를 구성하려면 상호 TLS가 활성화된 Red Hat OpenShift Service Mesh를 설치합니다.
- 이 예제에서는 Maistra 리포지토리의 인증서를 사용합니다. 프로덕션의 경우 인증 기관의 자체 인증서를 사용합니다.
- 이러한 지침으로 결과를 확인하려면 Bookinfo 샘플 애플리케이션을 배포합니다.
1.13.4.1. 기존 인증서 및 키 추가
기존 서명(CA) 인증서 및 키를 사용하려면 CA 인증서, 키, 루트 인증서가 포함된 신뢰 파일 체인을 생성해야 합니다. 해당 인증서 각각에 대해 다음과 같은 정확한 파일 이름을 사용해야 합니다. CA 인증서를 ca-cert.pem
, 키는 ca-key.pem
이라고 합니다. ca-cert.pem
을 서명하는 루트 인증서는 root-cert.pem
이라고 합니다. 워크로드에서 중개 인증서를 사용하는 경우 cert-chain.pem
파일에 인증서를 지정해야 합니다.
다음 단계에 따라 서비스 메시에 인증서를 추가합니다. Maistra 리포지토리에서 로컬로 예제 인증서를 저장하고 <path>
를 인증서 경로로 바꿉니다.
입력 파일
ca-cert.pem
,ca-key.pem
,root-cert.pem
,cert-chain.pem
을 포함하는 시크릿cacert
를 생성합니다.oc create secret generic cacerts -n istio-system --from-file=<path>/ca-cert.pem \ --from-file=<path>/ca-key.pem --from-file=<path>/root-cert.pem \ --from-file=<path>/cert-chain.pem
Copy to clipboardCopied$ oc create secret generic cacerts -n istio-system --from-file=<path>/ca-cert.pem \ --from-file=<path>/ca-key.pem --from-file=<path>/root-cert.pem \ --from-file=<path>/cert-chain.pem
ServiceMeshControlPlane
리소스에서spec.security.dataPlane.mtls: true
를true
로 설정하고 다음 예제와 같이 certificateAuthority를 구성합니다. 기본rootCADir
는/etc/cacerts
입니다. 키와 인증서가 기본 위치에 마운트된 경우privateKey
를 설정할 필요가 없습니다. 서비스 메시는 secret-mount 파일에서 인증서와 키를 읽습니다.apiVersion: maistra.io/v2 kind: ServiceMeshControlPlane spec: security: dataPlane: mtls: true certificateAuthority: type: Istiod istiod: type: PrivateKey privateKey: rootCADir: /etc/cacerts
Copy to clipboardCopiedapiVersion: maistra.io/v2 kind: ServiceMeshControlPlane spec: security: dataPlane: mtls: true certificateAuthority: type: Istiod istiod: type: PrivateKey privateKey: rootCADir: /etc/cacerts