10.3. IdM Kerberos KDC가 PKINIT를 사용할 수 있고 CA 인증서가 올바르게 위치하는지 확인


PKINIT 인증이 성공하면 유효한 인증서 체인을 사용합니다. kinitopenssl 을 사용하여 클라이언트가 인증 기관을 신뢰하고 스마트 카드 인증서가 Kerberos 티켓 검색에 유효한지 확인할 수 있습니다.

사전 요구 사항

프로세스

  1. kinit 유틸리티를 실행하여 스마트 카드에 저장된 인증서로 idmuser1 로 인증합니다.

    $ kinit -X X509_user_identity=PKCS11: idmuser1
    MyEID (sctest)                   PIN:
  2. 스마트 카드 PIN을 입력합니다. PIN을 입력하라는 메시지가 표시되지 않으면 스마트 카드 리더를 감지하고 스마트 카드의 내용을 표시할 수 있는지 확인하십시오. 링크 참조:https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/10/html/managing_smart_card_authentication/troubleshooting-authentication-with-smart-cards#testing-smart-card-access-on-the-system
  3. PIN이 수락되고 암호를 입력하라는 메시지가 표시되면 CA 서명 인증서가 누락되었을 수 있습니다.

    1. openssl 명령을 사용하여 CA 체인이 기본 인증서 번들 파일에 나열되어 있는지 확인합니다.

      $ openssl crl2pkcs7 -nocrl -certfile /var/lib/ipa-client/pki/ca-bundle.pem | openssl pkcs7 -print_certs -noout
      subject=O = IDM.EXAMPLE.COM, CN = Certificate Authority
      
      issuer=O = IDM.EXAMPLE.COM, CN = Certificate Authority
    2. 인증서의 유효성을 확인합니다.

      1. idmuser1 의 사용자 인증 인증서 ID를 찾습니다.

        $ pkcs11-tool --list-objects --login
        [...]
        Certificate Object; type = X.509 cert
          label:      Certificate
          subject:    DN: O=IDM.EXAMPLE.COM, CN=idmuser1
         ID: 01
      2. DER 형식의 스마트 카드에서 사용자 인증서 정보를 읽습니다.

        $ pkcs11-tool --read-object --id 01 --type cert --output-file cert.der
        Using slot 0 with a present token (0x0)
      3. DER 인증서를 PEM 형식으로 변환합니다.

        $ openssl x509 -in cert.der -inform DER -out cert.pem -outform PEM
      4. 인증서에 CA까지 유효한 발행자 서명이 있는지 확인합니다.

        $ openssl verify -CAfile /var/lib/ipa-client/pki/ca-bundle.pem <path>/cert.pem
        cert.pem: OK
  4. 스마트 카드에 여러 인증서가 포함된 경우 kinit 가 인증을 위해 올바른 인증서를 선택하지 못할 수 있습니다. 이 경우 certid=<ID> 옵션을 사용하여 kinit 명령의 인수로 인증서 ID를 지정해야 합니다.

    1. 스마트 카드에 저장되는 인증서 수를 확인하고 사용 중인 인증서 ID를 가져옵니다.

      $ pkcs11-tool --list-objects --type cert --login
      Using slot 0 with a present token (0x0)
      Logging in to "MyEID (sctest)".
      Please enter User PIN:
      Certificate Object; type = X.509 cert
        label:      Certificate
        subject:    DN: O=IDM.EXAMPLE.COM, CN=idmuser1
        ID:         01
      Certificate Object; type = X.509 cert
        label:      Second certificate
        subject:    DN: O=IDM.EXAMPLE.COM, CN=ipauser1
        ID:         02
    2. 인증서 ID 01을 사용하여 kinit 를 실행합니다.

      $ kinit -X kinit -X X509_user_identity=PKCS11:certid=01 idmuser1
      MyEID (sctest)                   PIN:
  5. klist 를 실행하여 Kerberos 인증 정보 캐시의 콘텐츠를 확인합니다.

    $ klist
    Ticket cache: KCM:0:11485
    Default principal: idmuser1@EXAMPLE.COM
    
    Valid starting       Expires              Service principal
    10/04/2021 10:50:04  10/05/2021 10:49:55  krbtgt/EXAMPLE.COM@EXAMPLE.COM
  6. 완료되면 활성 Kerberos 티켓을 삭제합니다.

    $ kdestroy -A
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 문서 정보

Legal Notice

Theme

© 2026 Red Hat
맨 위로 이동