14.3.2. ユーザーの管理 (管理者、エージェント、および監査者)

各サブシステムのユーザーは別々に維持されます。あるサブシステムの管理者であるからといって、その人が別のサブシステムに対する権限 (またはユーザーエントリー) を持っているとは限りません。ユーザーを設定して、ユーザー証明書を使用してサブシステムのエージェント、管理者、または監査担当者として信頼できます。

14.3.2.1. ユーザーの作成

Certificate System をインストールしたら、セットアップ時に作成したユーザーのみが存在します。本セクションでは、追加のユーザーを作成する方法を説明します。
注記
セキュリティー上の理由から、Certificate System ユーザーに個別のアカウントを作成します。
14.3.2.1.1. コマンドラインでのユーザーの作成
コマンドラインでユーザーを作成するには、以下を実行します。
  1. ユーザーアカウントを追加します。たとえば、example ユーザーを CA に追加するには、以下を実行します。
    # pki -d ~/.dogtag/pki-instance_name/ca/alias/ -c password -n caadmin \
         ca-user-add example --fullName "Example User"
    ---------------------
    Added user "example"
    ---------------------
      User ID: example
      Full name: Example User
    このコマンドは、caadmin ユーザーを使用して新規アカウントを追加します。
  2. 必要に応じて、グループにユーザーを追加します。たとえば、example ユーザーを Certificate Manager Agents グループに追加するには、次のコマンドを実行します。
    # pki -d ~/.dogtag/pki-instance_name/ -p password -n "caadmin" \
         user-add-membership example Certificate Manager Agents
  3. 証明書要求を作成します。
    • Certificate System 環境に Key Recovery Authority (KRA) が存在する場合は、以下を行います。
      # CRMFPopClient -d ~/.dogtag/pki-instance_name/ -p password \
           -n "user_name" -q POP_SUCCESS -b kra.transport -w "AES/CBC/PKCS5Padding" \
           -v -o ~/user_name.req
      このコマンドは、証明書署名要求 (CSR) を ~/user_name.req ファイルに CRMF 形式を保存します。
    • 証明書システム環境に Key Recovery Authority (KRA) が存在しない場合は、以下を行います。
      # PKCS10Client -d ~/.dogtag/pki-instance_name/ -p password \
           -n "user_name" -o ~/user_name.req
      このコマンドは、CSR を pkcs10 形式で 、~/user_name.req ファイルに保存します。
  4. 登録リクエストを作成します。
    1. ~/cmc.role_crmf.cfg ファイルを以下の内容で作成します。
      #numRequests: Total number of PKCS10 requests or CRMF requests.
      numRequests=1
      
      #input: full path for the PKCS10 request or CRMF request,
      #the content must be in Base-64 encoded format
      #Multiple files are supported. They must be separated by space.
      input=~/user_name.req
      
      #output: full path for the CMC request in binary format
      output=~/cmc.role_crmf.req
      
      #tokenname: name of token where agent signing cert can be found (default is internal)
      tokenname=internal
      
      #nickname: nickname for agent certificate which will be used
      #to sign the CMC full request.
      nickname=PKI Administrator for Example.com
      
      #dbdir: directory for cert8.db, key3.db and secmod.db
      dbdir=~/.dogtag/pki-instance_name/
      
      #password: password for cert8.db which stores the agent
      #certificate
      password=password
      
      #format: request format, either pkcs10 or crmf
      format=crmf
      直前の手順で使用した環境および CSR 形式に基づいて、パラメーターを設定します。
    2. 以前に作成した設定ファイルを CMCRequest ユーティリティーに渡して、CMC 要求を作成します。
      # CMCRequest ~/cmc.role_crmf.cfg
  5. CMS (CMC) 要求で Certificate Management を送信します。
    1. ~/HttpClient_role_crmf.cfg ファイルを以下の内容で作成します。
      # #host: host name for the http server
      host=server.example.com
      
      #port: port number
      port=8443
      
      #secure: true for secure connection, false for nonsecure connection
      secure=true
      
      #input: full path for the enrollment request, the content must be in binary format
      input=~/cmc.role_crmf.req
      
      #output: full path for the response in binary format
      output=~/cmc.role_crmf.resp
      
      #tokenname: name of token where SSL client authentication cert can be found (default is internal)
      #This parameter will be ignored if secure=false
      tokenname=internal
      
      #dbdir: directory for cert8.db, key3.db and secmod.db
      #This parameter will be ignored if secure=false
      dbdir=~/.dogtag/pki-instance_name/
      
      #clientmode: true for client authentication, false for no client authentication
      #This parameter will be ignored if secure=false
      clientmode=true
      
      #password: password for cert8.db
      #This parameter will be ignored if secure=false and clientauth=false
      password=password
      
      #nickname: nickname for client certificate
      #This parameter will be ignored if clientmode=false
      nickname=PKI Administrator for Example.com
      
      #servlet: servlet name
      servlet=/ca/ee/ca/profileSubmitCMCFull
      
      環境に応じてパラメーターを設定します。
    2. CA に要求を送信します。
      # HttpClient ~/HttpClient_role_crmf.cfg
      Total number of bytes read = 3776
      after SSLSocket created, thread token is Internal Key Storage Token
      client cert is not null
      handshake happened
      writing to socket
      Total number of bytes read = 2523
      MIIJ1wYJKoZIhvcNAQcCoIIJyDCCCcQCAQMxDzANBglghkgBZQMEAgEFADAxBggr
      ...
      The response in data format is stored in ~/cmc.role_crmf.resp
    3. 結果を確認します。
      # CMCResponse ~/cmc.role_crmf.resp
      Certificates:
          Certificate:
              Data:
                  Version:  v3
                  Serial Number: 0xE
                  Signature Algorithm: SHA256withRSA - 1.2.840.113549.1.1.11
                  Issuer: CN=CA Signing Certificate,OU=pki-instance_name Security Domain
                  Validity:
                      Not Before: Friday, July 21, 2017 12:06:50 PM PDT America/Los_Angeles
                      Not  After: Wednesday, January 17, 2018 12:06:50 PM PST America/Los_Angeles
                  Subject: CN=user_name
      ...
      Number of controls is 1
      Control #0: CMCStatusInfoV2
         OID: {1 3 6 1 5 5 7 7 25}
         BodyList: 1
         Status: SUCCESS
  6. 必要に応じて、証明書をユーザー自身の ~/.dogtag/pki-instance_name/ データベースにインポートするには、次のコマンドを実行します。
    # certutil -d ~/.dogtag/pki-instance_name/ -A -t "u,u,u" -n "user_name certificate" -i ~/cmc.role_crmf.resp
  7. ユーザーレコードに証明書を追加します。
    1. ユーザーのシリアル番号を検出できる証明書を一覧表示します。たとえば、証明書のサブジェクトに example ユーザー名が含まれる証明書を一覧表示するには、次のコマンドを実行します。
      pki -d ~/.dogtag/pki-instance_name/ -c password -n caadmin ca-user-cert-find example
      -----------------
      1 entries matched
      -----------------
        Cert ID: 2;6;CN=CA Signing Certificate,O=EXAMPLE;CN=PKI Administrator,E=example@example.com,O=EXAMPLE
        Version: 2
        Serial Number: 0x6
        Issuer: CN=CA Signing Certificate,O=EXAMPLE
        Subject: CN=PKI Administrator,E=example@example.com,O=EXAMPLE
      ----------------------------
      Number of entries returned 1
      次の手順では、証明書のシリアル番号が必要です。
    2. シリアル番号を使用して、証明書リポジトリーから Certificate System データベースのユーザーアカウントに証明書を追加します。たとえば、CA ユーザーの場合は以下を実行します。
      pki -c password -n caadmin ca-user-cert-add example --serial 0x6
14.3.2.1.2. コンソールを使用したユーザーの作成
PKI コンソールを使用してユーザーを作成するには、次のコマンドを実行します。
  1. 管理コンソールにログインします。
    pkiconsole https://server.example.com:8443/subsystem_type
  2. Configuration タブで、Users and Groups を選択します。Add をクリックします。
  3. Edit User Information ダイアログに情報を入力します。
    情報のほとんどは、ユーザー名、メールアドレス、パスワードなどの標準のユーザー情報です。このウィンドウには、User State と呼ばれるフィールドも含まれ、このフィールドには、ユーザーに関する追加情報を追加するのに使用される文字列を含めることができます。ほとんどの場合、このフィールドは、アクティブユーザーであるかどうかを確認できます。
  4. ユーザーが属するグループを選択します。ユーザーのグループメンバーシップは、ユーザーが持つ特権を決定します。エージェント、管理者、および監査人を適切なサブシステムグループに割り当てます。
  5. ユーザーの証明書を保存します。
    1. CA エンドエンティティーサービスページでユーザー証明書を要求します。
    2. ユーザープロファイルに対して自動登録が設定されていない場合は、証明書要求を承認します。
    3. 通知メールで提供される URL を使用して証明書を取得し、base-64 でエンコードされた証明書をローカルファイルまたはクリップボードにコピーします。
    4. 新しいユーザーエントリーを選択し、Certificates をクリックします。
    5. Import をクリックし、Base-64 でエンコードされた証明書に貼り付けます。