chore: add new randomDefault value
This commit is contained in:
@@ -752,6 +752,7 @@ CONF_SCHEMA = {
|
|||||||
"jwt_secret_key": {
|
"jwt_secret_key": {
|
||||||
"description": "Secret key for JWT authentication.",
|
"description": "Secret key for JWT authentication.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
"default": "somethingRandomSomethingRandom123",
|
||||||
},
|
},
|
||||||
"CORS_origins": {
|
"CORS_origins": {
|
||||||
"description": "List of allowed CORS origins.",
|
"description": "List of allowed CORS origins.",
|
||||||
@@ -764,7 +765,14 @@ CONF_SCHEMA = {
|
|||||||
"enum": ["error", "info"],
|
"enum": ["error", "info"],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"required": ["enabled", "listen_ip_address", "listen_port", "username", "password"],
|
"required": [
|
||||||
|
"enabled",
|
||||||
|
"listen_ip_address",
|
||||||
|
"listen_port",
|
||||||
|
"username",
|
||||||
|
"password",
|
||||||
|
"jwt_secret_key",
|
||||||
|
],
|
||||||
},
|
},
|
||||||
# end of RPC section
|
# end of RPC section
|
||||||
"db_url": {
|
"db_url": {
|
||||||
|
|||||||
@@ -302,7 +302,9 @@ class ApiServer(RPCHandler):
|
|||||||
)
|
)
|
||||||
|
|
||||||
if self._config["api_server"].get("jwt_secret_key", "super-secret") in (
|
if self._config["api_server"].get("jwt_secret_key", "super-secret") in (
|
||||||
"super-secret, somethingrandom"
|
"super-secret",
|
||||||
|
"somethingrandom",
|
||||||
|
"somethingRandomSomethingRandom123",
|
||||||
):
|
):
|
||||||
logger.warning(
|
logger.warning(
|
||||||
"SECURITY WARNING - `jwt_secret_key` seems to be default."
|
"SECURITY WARNING - `jwt_secret_key` seems to be default."
|
||||||
|
|||||||
Reference in New Issue
Block a user