Skip to main content

Config for redis

Jobs that use the redis adaptor may require authentication. A "credential" for the redis adaptor will follow the schema below. When using the CLI, you can set up your own state.configuration by using the sample below.

Sample Configuration

Paste this into the configuration key of your state.json file and modify the values to run jobs locally.

{
"host": "redis.example.com",
"password": "@some(!)Str0ngp4ss0w0rd",
"username": "test@openfn.org"
}

Full Schema

The full configuration schema describes each attribute of the credential and notes those that are required.

{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"host": {
"title": "Host",
"type": "string",
"minLength": 1,
"description": "Redis server hostname",
"format": "uri",
"examples": [
"redis.example.com"
]
},
"database": {
"title": "Database Number",
"type": "integer",
"description": "Redis database number. New connections always use the database 0.",
"examples": [
0
]
},
"username": {
"title": "Username",
"type": "string",
"description": "Redis Access Control username",
"examples": [
"test@openfn.org"
]
},
"password": {
"title": "Password",
"type": "string",
"description": "Redis Access Control password",
"writeOnly": true,
"examples": [
"@some(!)Str0ngp4ss0w0rd"
]
},
"port": {
"title": "Port",
"type": "string",
"description": "Redis server port",
"writeOnly": true,
"default": "6379",
"examples": [
"16652"
]
}
},
"type": "object",
"additionalProperties": true,
"required": [
"host",
"password",
"username"
]
}