User Group
User groups combine an authentication method with a set of user records.
Users come from two places:
Static users are configured through static users in the YAML configuration. Dynamic users are fetched periodically from source, usually in JSON format. Both are optional and share the same underlying data structure.
The Cap’n Proto RPC publish_dynamic_users command is supported. The
published data should be an array of
user.
Each user-group item is a map with a required name key and an
optional type key:
Groups
Common Keys
name
required, type: metric node name
The name of the user group.
type
optional, type: str
Authentication type of the user group. It also determines how the remaining keys are interpreted.
default: basic
Added in version 1.13.0.
static_users
optional, type: seq
Static users can be added in this array.
See user for detailed structure of user.
source
optional, type: url str | map
Source used to fetch dynamic users.
Multiple source types are supported. The type is detected either from the
scheme of the URL or from the type key in the map.
See source for the supported source
types.
Existing dynamic users are updated in place. If fetching fails, the previously loaded users are kept.
default: not set
cache
optional, type: file path
Local file used to cache remote results. It is read during initial user-group loading.
The file will be created if not existed.
Note
This should be set if you want to publish dynamic users.
default: not set
Added in version 1.7.22.
refresh_interval
optional, type: humanize duration
Interval used for user-expiration checks and for refreshing dynamic users.
default: 60s
anonymous_user
optional, type: user
Configures and enables the anonymous user.
This user is used when no matching username is found in either the static or dynamic users, or when the client request carries no authentication information.
default: not set
Added in version 1.7.13.