Back to Influxdb

influxd-ctl token

content/enterprise_influxdb/v1/tools/influxd-ctl/token.md

latest964 B
Original Source

The influxd-ctl token command generates a signed JSON Web Token (JWT).

Usage

sh
influxd-ctl -auth-type jwt -secret <shared secret> token [flags]

{{% note %}}

Requires global flags

influxd-ctl token requires the -auth-type and -secret global flags.

  • Set -auth-type to jwt
  • Use -secret to provide your JWT shared secret {{% /note %}}

Flags {#command-flags}

FlagDescription
-expToken expiration duration (default is 1m0s)

{{% caption %}} Also see influxd-ctl global flags. {{% /caption %}}

Examples

Generate a JWT token that expires in 5 minutes
sh
influxd-ctl \
  -auth-type jwt \
  -secret sHaR3dS3cRe7 \
  token -exp 5m