in redash/query_runner/corporate_memory.py [0:0]
def configuration_schema(cls):
"""provide the configuration of the data source as json schema"""
return {
"type": "object",
"properties": {
"CMEM_BASE_URI": {"type": "string", "title": "Base URL"},
"OAUTH_GRANT_TYPE": {
"type": "string",
"title": "Grant Type",
"default": "client_credentials",
"extendedEnum": [
{"value": "client_credentials", "name": "client_credentials"},
{"value": "password", "name": "password"},
],
},
"OAUTH_CLIENT_ID": {
"type": "string",
"title": "Client ID (e.g. cmem-service-account)",
"default": "cmem-service-account",
},
"OAUTH_CLIENT_SECRET": {
"type": "string",
"title": "Client Secret - only needed for grant type 'client_credentials'",
},
"OAUTH_USER": {
"type": "string",
"title": "User account - only needed for grant type 'password'",
},
"OAUTH_PASSWORD": {
"type": "string",
"title": "User Password - only needed for grant type 'password'",
},
"SSL_VERIFY": {
"type": "boolean",
"title": "Verify SSL certificates for API requests",
"default": True,
},
"REQUESTS_CA_BUNDLE": {
"type": "string",
"title": "Path to the CA Bundle file (.pem)",
},
},
"required": ["CMEM_BASE_URI", "OAUTH_GRANT_TYPE", "OAUTH_CLIENT_ID"],
"secret": ["OAUTH_CLIENT_SECRET", "OAUTH_PASSWORD"],
"extra_options": [
"OAUTH_GRANT_TYPE",
"OAUTH_USER",
"OAUTH_PASSWORD",
"SSL_VERIFY",
"REQUESTS_CA_BUNDLE",
],
}