mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2024-12-26 05:19:05 +01:00
Extend config schema
This commit is contained in:
parent
56d559fdd7
commit
6185635aa9
@ -25,7 +25,7 @@ type LdapConfig struct {
|
|||||||
type JWTAuthConfig struct {
|
type JWTAuthConfig struct {
|
||||||
// Specifies for how long a JWT token shall be valid
|
// Specifies for how long a JWT token shall be valid
|
||||||
// as a string parsable by time.ParseDuration().
|
// as a string parsable by time.ParseDuration().
|
||||||
MaxAge int64 `json:"max-age"`
|
MaxAge string `json:"max-age"`
|
||||||
|
|
||||||
// Specifies which cookie should be checked for a JWT token (if no authorization header is present)
|
// Specifies which cookie should be checked for a JWT token (if no authorization header is present)
|
||||||
CookieName string `json:"cookieName"`
|
CookieName string `json:"cookieName"`
|
||||||
|
@ -127,10 +127,35 @@
|
|||||||
"description": "Do not show running jobs shorter than X seconds.",
|
"description": "Do not show running jobs shorter than X seconds.",
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
"": {
|
"jwts": {
|
||||||
"description": "",
|
"description": "For JWT token authentication.",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"max-age": {
|
||||||
|
"description": "Configure how long a token is valid. As string parsable by time.ParseDuration()",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"cookieName": {
|
||||||
|
"description": "Cookie that should be checked for a JWT token.",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"validateUser": {
|
||||||
|
"description": "Deny login for users not in database (but defined in JWT). Overwrite roles in JWT with database roles.",
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"trustedIssuer": {
|
||||||
|
"description": "Issuer that should be accepted when validating external JWTs ",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"syncUserOnLogin": {
|
||||||
|
"description": "Add non-existent user to DB at login attempt with values provided in JWT.",
|
||||||
|
"type": "boolean"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"max-age"
|
||||||
|
]
|
||||||
|
},
|
||||||
"ldap": {
|
"ldap": {
|
||||||
"description": "For LDAP Authentication and user synchronisation.",
|
"description": "For LDAP Authentication and user synchronisation.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@ -398,6 +423,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
|
"jwts",
|
||||||
"clusters"
|
"clusters"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user