dicer token create
Makes a token for the daemon’s TCP listener, and prints it. It is shown only this once: the daemon keeps only the SHA-256 of its secret.
--scopes says what the token allows: * for everything, which is the
default, or RESOURCE:ACTION, such as instances:write. RESOURCE is
instances, snapshots, networks, volumes, images, kernels, tokens or
events, and ACTION is read or write. Events have only read. A write scope
allows reading too. A token can make only tokens its own scopes allow.
--secret-stdin reads the token’s secret instead of having the daemon make
one: at least 32 letters and digits. It is for a tool that must know the
token before it exists.
Usage
$ dicer token create NAME [flags]
Examples
$ dicer token create laptop
$ dicer token create ci --scopes instances:write,images:write
Flags
| Flag | Description |
|---|---|
--format string | Output format: table for the token alone, json or yaml. Default: table. |
--scopes strings | What the token allows, comma-separated (default: * for everything). |
--secret-stdin | Read the token’s secret from standard input. |
Global flags
| Flag | Description |
|---|---|
-D, --debug | Trace every call to the daemon on stderr (or set $DICER_DEBUG). |
-r, --remote string | Daemon to talk to: a remote’s name, or an address (unix:///PATH or HOST:PORT) (default $DICER_REMOTE, then the current remote, then local). |
--request-timeout duration | Give up on a single call to the daemon after this long, e.g. 30s (0: never; streams such as logs -f and exec are not bounded). |