検索

6.13. 新しいマスターキーの設定

download PDF
このセクションでは、Token Key Service (TKS) で新しいマスターキーを設定するのに必要な手順および設定を説明します。背景情報は、Red Hat Certificate System 計画、インストール、およびデプロイメントのガイド を参照してください。

手順6.1 新規マスターキーの作成

  1. TKS セキュリティーデータベースへのアクセスに必要な PIN の内部を取得します。
    # cat /var/lib/pki/pki-tomcat/tks/conf/password.conf
    internal=649713464822
    internaldb=secret12
    replicationdb=-752230707
    
  2. TKS インスタンスの alias/ ディレクトリーを開きます。
    # cd /var/lib/pki/pki-tomcat/alias
  3. tkstool ユーティリティーを使用して新規マスターキーを生成します。以下に例を示します。
    # tkstool -M -n new_master -d /var/lib/pki/pki-tomcat/alias -h <token_name>
    Enter Password or Pin for "NSS Certificate DB":
    
    Generating and storing the master key on the specified token . . .
    
    Naming the master key "new_master" . . .
    
    Computing and displaying KCV of the master key on the specified token . . .
    
    new_master key KCV:  CA5E 1764
    
  4. 鍵がデータベースに正しく追加されていることを確認します。
    # tkstool -L -d .
    
    
     slot:  NSS User Private Key and Certificate Services
    token:  NSS Certificate DB
    
    Enter Password or Pin for "NSS Certificate DB":
            <0> new_master
    

6.13.1. ラップされたマスターキーの生成および転送 (Key Ceremony)

マスターキーを外部トークンまたは複数の場所で使用する場合は、ハードウェアトークンに安全に転送できるように ラップ する必要があります。この tkstool ユーティリティーを使用するとトランスポートキーを生成できます。次に、トークンが生成されるファシリティーにマスターキーを送信します。ラップマスターキーを転送するプロセスは、一般的に キーセレモニー と呼ばれます。
注記
トランスポートキーは、生成されたマスターキーとのみ使用できます。

手順6.2 ラップされたマスターキーの生成および転送

  1. Token Key Service セキュリティーデータベースへのアクセスに必要な内部 PIN を取得します。
    # cat /var/lib/pki/pki-tomcat/tks/conf/password.conf
    
    internal=649713464822
    internaldb=secret12
    replicationdb=-752230707
    
  2. TKS インスタンスの alias/ ディレクトリーを開きます。
    # cd /var/lib/pki/pki-tomcat/alias
  3. transport という名前のトランスポートキーを作成します。
    # tkstool -T -d . -n transport
    注記
    tkstool ユーティリティーは、生成された 3 つのセッションキーごとにキー共有と KCV 値を出力します。この手順の後半で新しいデータベースにトランスポートキーを再生成する必要がある場合に、それらをファイルに保存し、失われた場合はキーを再生成します。
  4. プロンプトが表示されたら、データベースのパスワードを入力します。次に、画面の指示に従って、ランダムなシードを生成します。
    A random seed must be generated that will be used in the
    creation of your key.  One of the easiest ways to create a
    random seed is to use the timing of keystrokes on a keyboard.
    
    To begin, type keys on the keyboard until this progress meter
    is full.  DO NOT USE THE AUTOREPEAT FUNCTION ON YOUR KEYBOARD!
    
    
    Continue typing until the progress meter is full:
    
    |************************************************************|
    
    Finished.
    
    
    Type the word "proceed" and press enter
    
  5. 次のプロンプトにより、一連のセッションキーが生成されます。最終メッセージになるまで、画面の指示に従ってください。
    Successfully generated, stored, and named the transport key!
  6. トランスポートキーを使用してマスターキーを生成してラップし、これを file という名前のファイルに保存します。
    # tkstool -W -d . -n new_master -t transport -o file 
    Enter Password or Pin for "NSS Certificate DB":
    Retrieving the transport key (for wrapping) from the specified token . . .
    Generating and storing the master key on the specified token . . .
    Naming the master key "new_master" . . .
    Successfully generated, stored, and named the master key!
    Using the transport key to wrap and store the master key . . .
    Writing the wrapped data (and resident master key KCV) into the
     file called "file" . . .
    
           wrapped data:   47C0 06DB 7D3F D9ED
                           FE91 7E6F A7E5 91B9
           master key KCV: CED9 4A7B
           (computed KCV of the master key residing inside the wrapped data)
    
  7. ラップされたマスターキーを適切な場所またはファシリティーにコピーします。
  8. 必要な場合は、HSM またはファシリティーで新しいセキュリティーデータベースを生成します。
    # tkstool -N -d <directory>
    新たなデータベースで生成した鍵と同じ鍵を生成する -l オプションを追加します。この方法でトランスポートキーを再生成するには、この手順で前のステップで生成した各セッションキーに対してセッションキー共有と KCV を入力する必要があります。
    # tkstool -I -d <directory> -n verify_transport
  9. トランスポートキーを使用して、ファイルに保存されているマスターキーをアンラップします。要求されたら、セキュリティーデータベースの PIN を入力します。
    # tkstool -U -d directory -n new_master -t verify_transport -i file
    Enter Password or Pin for "NSS Certificate DB":
    Retrieving the transport key from the specified token (for
     unwrapping) . . .
    Reading in the wrapped data (and resident master key KCV) from
     the file called "file" . . .
    
         wrapped data:   47C0 06DB 7D3F D9ED
                         FE91 7E6F A7E5 91B9
         master key KCV: CED9 4A7B
         (pre-computed KCV of the master key residing inside the wrapped data)
    
    Using the transport key to temporarily unwrap the master key to
    recompute its KCV value to check against its pre-computed KCV value . . .
         master key KCV: CED9 4A7B
         (computed KCV of the master key residing inside the wrapped data)
         master key KCV: CED9 4A7B
         (pre-computed KCV of the master key residing inside the wrapped data)
    
    Using the transport key to unwrap and store the master key on the
     specified token . . .
    Naming the master key "new_master" . . .
    Successfully unwrapped, stored, and named the master key!
    
  10. 鍵がデータベースに追加されたことを確認します。
    # tkstool -L -d
    slot:  NSS User Private Key and Certificate Services
    token:  NSS Certificate DB
    
    Enter Password or Pin for "NSS Certificate DB":
    			 <0> transport
    			 <1> new_master
    
Red Hat logoGithubRedditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

© 2024 Red Hat, Inc.