🗃 Updates schema to allow for env vars on user passwords

This commit is contained in:
Alicia Sykes 2024-04-28 15:05:01 +01:00
parent 25ba708a9f
commit 29626ebb06
1 changed files with 15 additions and 8 deletions

View File

@ -500,14 +500,9 @@
"users": { "users": {
"title": "Users", "title": "Users",
"type": "array", "type": "array",
"description": "Usernames and hashed credentials for frontend authentication", "description": "Usernames and hashed credentials for frontend authentication. Needs to be set at build-time.",
"items": { "items": {
"type": "object", "type": "object",
"additionalProperties": false,
"required": [
"user",
"hash"
],
"properties": { "properties": {
"user": { "user": {
"title": "Username", "title": "Username",
@ -521,6 +516,12 @@
"minLength": 64, "minLength": 64,
"maxLength": 64 "maxLength": 64
}, },
"password": {
"title": "Password",
"type": "string",
"description": "The environmental variable pointing to a plaintext password for that user. Must start with VUE_APP_",
"pattern": "^VUE_APP_.*"
},
"type": { "type": {
"title": "Privileges", "title": "Privileges",
"type": "string", "type": "string",
@ -531,9 +532,15 @@
"description": "User type, denoting privilege level, either admin or normal", "description": "User type, denoting privilege level, either admin or normal",
"default": "normal" "default": "normal"
} }
} },
"additionalProperties": false,
"required": ["user"],
"oneOf": [
{ "required": ["hash"] },
{ "required": ["password"] }
]
} }
}, },
"enableHeaderAuth": { "enableHeaderAuth": {
"title": "Enable HeaderAuth?", "title": "Enable HeaderAuth?",
"type": "boolean", "type": "boolean",