clevis-encrypt-tang.1.adoc 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. CLEVIS-ENCRYPT-TANG(1)
  2. ======================
  3. :doctype: manpage
  4. == NAME
  5. clevis-encrypt-tang - Encrypts using a Tang binding server policy
  6. == SYNOPSIS
  7. *clevis encrypt tang* CONFIG < PT > JWE
  8. == OVERVIEW
  9. The *clevis encrypt tang* command encrypts using a Tang binding server policy.
  10. Its only argument is the JSON configuration object.
  11. Clevis provides support for the Tang network binding server. Tang provides
  12. a stateless, lightweight alternative to escrows. Encrypting data using the
  13. Tang pin works like this:
  14. $ clevis encrypt tang '{"url":"http://tang.srv"}' < PT > JWE
  15. The advertisement contains the following signing keys:
  16. _OsIk0T-E2l6qjfdDiwVmidoZjA
  17. Do you wish to trust these keys? [ynYN] y
  18. To decrypt the data, just pass it to the *clevis decrypt* command:
  19. $ clevis decrypt < JWE > PT
  20. As you can see above, Tang utilizes a trust-on-first-use workflow. If you
  21. already know the thumbprint of a trusted key, you can specify it in the
  22. configuration at encryption time:
  23. $ cfg='{"url":"http://tang.srv","thp":"_OsIk0T-E2l6qjfdDiwVmidoZjA"}'
  24. $ clevis encrypt tang "$cfg" < PT > JWE
  25. Obtaining the thumbprint of a trusted signing key is easy. If you
  26. have access to the Tang server, simply execute:
  27. $ tang-show-keys <PORT>
  28. where <PORT> is the port that the Tang server is listening on.
  29. If *tang-show-keys* is not available, but you have access to the Tang
  30. server's database directory, you can execute this instead:
  31. $ jose jwk thp -i $DBDIR/$SIG.jwk
  32. Tang can also perform entirely offline encryption if you pre-share the server
  33. advertisement. You can fetch the advertisement with a simple command (just be
  34. careful your network isn't compromised!):
  35. $ curl -f $URL/adv > adv.jws
  36. Once you have the advertisement file, just provide it:
  37. $ clevis encrypt tang '{"url":...,"adv":"adv.jws"}' < PT > JWE
  38. == CONFIG
  39. This command uses the following configuration properties:
  40. * *url* (string) :
  41. The base URL of the Tang server (REQUIRED)
  42. * *thp* (string) :
  43. The thumbprint of a trusted signing key
  44. * *adv* (string) :
  45. A filename containing a trusted advertisement
  46. * *adv* (object) :
  47. A trusted advertisement (raw JSON)
  48. == SEE ALSO
  49. link:clevis-decrypt.1.adoc[*clevis-decrypt*(1)]