authentication.txt 1.5 KB

12345678910111213141516171819202122232425262728293031323334
  1. CFSSL AUTHENTICATION
  2. In order to prevent a CFSSL signer from being directly available, an
  3. authentication mechanism is available to provide additional
  4. security. It is implemented as the concept of an authentication
  5. provider; a provider can generate "authentication tokens" for a given
  6. request, and verify that the token is valid for a given
  7. request. Requests are generally the JSON-encoded form of the request to
  8. be sent to the server.
  9. An authenticated request has the following fields:
  10. * token: this is a required field; it contains the computed
  11. authentication token.
  12. * request: this is a required field; the JSON-encoded request being
  13. made.
  14. * timestamp: an optional field containing a Unix timestamp. This
  15. might be used by an authentication provider; the standard
  16. authenticator does not use this.
  17. * remote_address: an optional field containing the address or
  18. hostname of the server; this may be used by an authentication
  19. provider. The standard authenticator does not use this field.
  20. The standard authenticator provided as a reference implementation uses
  21. HMAC-SHA-256 to compute the HMAC of the request, with the hex-encoded
  22. authentication key specified in the configuration file. The key may be
  23. specified in one of three ways:
  24. * hex-encoded string (e.g. "000102030405060708")
  25. * an environment variable prefixed with "env:"
  26. (e.g. "env:AUTH_KEY") that contains a hex-encoded string.
  27. * a path to a file containing the hex-encoded key, prefixed with
  28. "file:" (e.g. "file:/path/to/auth.key")