Consumers

Client requests are mapped to consumers using one of the authentication modules. Whenever a consumer has been authenticated and authorized, the response headers will identify the consumer using the X-Auth-User header that contains the unique name of the consumer.

Consumers are configured by writing JSON files in /var/lib/policy-engine/consumers/ or using the HTTP API. Changes made using the HTTP API are persisted as JSON files the same directory.

The following is a minimal consumer definition, stored as doe.json in the /var/lib/policy-engine/consumers/ directory.

{
    "name": "doe",
    "email": "doe@example.com",
    "group": "developer",
    "blocked": false
}

Attributes

Attribute Required Type Description
name Yes String The name under which a consumer is identified throughout the configuration. It is required to be unique and must only contain alphanumeric characters.
email Yes String The consumer email address. It is required to be unique, as certain modules, such as OAuth2 use it for authentication purposes.
group No String The group defines the name of a logical collection of which the consumer is a part.
blocked No Bool Defines a boolean value that tells the auth-modules to deny the consumer regardless of its configured access rules.

Additional consumer-specific configuration, such as credentials can be specified in the same file or in the various Endpoints.


®Varnish Software, Wallingatan 12, 111 60 Stockholm, Organization nr. 556805-6203