Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

4.10.4. Tang을 사용하여 Clevis 시스템의 Encryption Client 배포

사전 요구 사항

절차

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) 매뉴얼 페이지를 참조하거나 기본 제공 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