Menu Close
Red Hat Training
A Red Hat training course is available for Red Hat Enterprise Linux
4.10.4. Tang を使用する NBDE システムへの暗号化クライアントのデプロイメント
前提条件
- Clevis フレームワークがインストールされている。「暗号化クライアント (Clevis) のインストール」を参照してください。
- Tang サーバーが利用できる。「SELinux を Enforcing モードで有効にした Tang サーバーのデプロイメント」を参照してください。
手順
Clevis 暗号化クライアントを Tang サーバーにバインドするには、clevis encrypt tang サブコマンドを使用します。
~]$ clevis encrypt tang '{"url":"http://tang.srv"}' < PLAINTEXT > JWE
The advertisement contains the following signing keys:
_OsIk0T-E2l6qjfdDiwVmidoZjA
Do you wish to trust these keys? [ynYN] y
先ほどの例の http://tang.srv の URL を、tang がインストールされているサーバーの URL と一致するように変更します。JWE 出力ファイルには、暗号化された暗号文が含まれます。この暗号文は、PLAINTEXT 入力ファイルから読み込まれます。
データを複号するには、clevis decrypt コマンドを実行して、暗号文 (JWE) を提供します。
~]$ clevis decrypt < JWE > PLAINTEXT
詳細は、
clevis-encrypt-tang(1)
の man ページを参照するか、CLI ヘルプを使用してください。
~]$ clevis Usage: clevis COMMAND [OPTIONS] clevis decrypt Decrypts using the policy defined at encryption time clevis encrypt http Encrypts using a REST HTTP escrow server policy clevis encrypt sss Encrypts using a Shamir's Secret Sharing policy clevis encrypt tang Encrypts using a Tang binding server policy clevis encrypt tang Encrypts using a Tang binding server policy clevis luks bind Binds a LUKSv1 device using the specified policy clevis luks unlock Unlocks a LUKSv1 volume ~]$ clevis decrypt Usage: clevis decrypt < JWE > PLAINTEXT Decrypts using the policy defined at encryption time ~]$ clevis encrypt tang Usage: clevis encrypt tang CONFIG < PLAINTEXT > JWE Encrypts using a Tang binding server policy This command uses the following configuration properties: url: <string> The base URL of the Tang server (REQUIRED) thp: <string> The thumbprint of a trusted signing key adv: <string> A filename containing a trusted advertisement adv: <object> A trusted advertisement (raw JSON) Obtaining the thumbprint of a trusted signing key is easy. If you have access to the Tang server's database directory, simply do: $ jose jwk thp -i $DBDIR/$SIG.jwk Alternatively, if you have certainty that your network connection is not compromised (not likely), you can download the advertisement yourself using: $ curl -f $URL/adv > adv.jws