Documentation
¶
Overview ¶
Package enroll owns the enrollment token: its format, how it is made and read back, and the command an operator runs on a new edge. The admin API, the CLI and the gateway all go through it.
A token is "<id>.<secret>": 16 hex digits, a dot, then 32 random bytes in base64url. Only the sha256 of the secret is stored.
Index ¶
Constants ¶
View Source
const ( DefaultTTL = 24 * time.Hour MaxTTL = 7 * 24 * time.Hour )
Variables ¶
View Source
var ErrMalformed = errors.New("malformed token")
ErrMalformed is returned by Parse for anything that is not a token.
Functions ¶
func Command ¶
Command is what to run on the edge to enroll it. The token goes through stdin (printf is a shell builtin): it never shows in the process list.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.