Red Hat Training

A Red Hat training course is available for RHEL 8

78.10. TLS 클라이언트 인증서 인증 구성

클라이언트 인증서 인증을 통해 관리자는 인증서를 사용하여 인증한 사용자만 my_company.idm.example.com 웹 서버의 리소스에 액세스할 수 있습니다. /var/www/html/Example/ 디렉터리에 대한 클라이언트 인증서 인증을 구성할 수 있습니다.

중요

my_company.idm.example.com Apache 서버가 TLS 1.3 프로토콜을 사용하는 경우 특정 클라이언트에 추가 구성이 필요합니다. 예를 들어 Firefox에서 about:config 메뉴의 security.tls.enable_post_handshake_auth 매개 변수를 true로 설정합니다. 자세한 내용은 Red Hat Enterprise Linux 8의 전송 계층 보안 버전 1.3 을 참조하십시오.

절차

  1. /etc/httpd/conf/httpd.conf 파일을 편집하고 클라이언트 인증을 구성하려는 <VirtualHost> 지시문에 다음 설정을 추가합니다.

    <Directory "/var/www/html/Example/">
      SSLVerifyClient require
    </Directory>

    SSLVerifyClient 설정은 클라이언트가 /var/www/html/Example/ 디렉터리의 콘텐츠에 액세스할 수 있으려면 서버가 클라이언트 인증서를 성공적으로 검증해야 함을 정의합니다.

  2. httpd 서비스를 다시 시작하십시오.

    # systemctl restart httpd

검증 단계

  1. curl 유틸리티를 사용하여 클라이언트 인증없이 https://my_company.idm.example.com/Example/ URL에 액세스합니다.

    $ curl https://my_company.idm.example.com/Example/
    curl: (56) OpenSSL SSL_read: error:1409445C:SSL routines:ssl3_read_bytes:tlsv13 alert certificate required, errno 0

    이 오류는 my_company.idm.example.com 웹 서버에 클라이언트 인증서 인증이 필요함을 나타냅니다.

  2. 클라이언트 개인 키 및 인증서와 CA 인증서를 전달하여 클라이언트 인증으로 동일한 URL 액세스합니다.

    $ curl --cacert ca.crt --key client.key --cert client.crt https://my_company.idm.example.com/Example/

    요청이 성공하면 curl/var/www/ html/Example/ 디렉터리에 저장된 index. html 파일을 표시합니다.