refactor(config): 🔥 Remove old oidc section in config

This commit is contained in:
Jesse Wierzbinski 2024-10-11 17:03:33 +02:00
parent ce781f3336
commit 9f1e89b592
No known key found for this signature in database
9 changed files with 116 additions and 147 deletions

View file

@ -53,35 +53,6 @@ rules = [
"Don't post illegal content",
]
[oidc]
# Run Versia Server with this value missing to generate a new key
# [oidc.keys]
# public = "XXXX"
# private = "XXXX"
# If enabled, Versia Server will require users to log in with an OAuth provider
forced = false
# Allow registration with OAuth providers
# Overriden by the signups.registration setting
allow_registration = true
# The provider MUST support OpenID Connect with .well-known discovery
# Most notably, GitHub does not support this
# Redirect URLs in your OAuth provider can be set to this:
# <base_url>/oauth/sso/<provider_id>/callback*
# The asterisk is important, as it allows for any query parameters to be passed
# Authentik for example uses regex so it can be set to (regex):
# <base_url>/oauth/sso/<provider_id>/callback.*
# [[oidc.providers]]
# name = "CPlusPatch ID"
# id = "cpluspatch-id"
# This MUST match the provider's issuer URI, including the trailing slash (or lack thereof)
# url = "https://id.cpluspatch.com/application/o/versia-testing/"
# client_id = "XXXX"
# client_secret = "XXXXX"
# icon = "https://cpluspatch.com/images/icons/logo.svg"
[http]
# The full URL Versia Server will be reachable by (paths are not supported)
base_url = "https://versia.localhost:9900"
@ -424,3 +395,41 @@ max_coeff = 1.0
# Applies before the global ratelimit changes
# "/api/v1/accounts/:id/block" = { duration = 30, max = 60 }
# "/api/v1/timelines/public" = { duration = 60, max = 200 }
[plugins]
# Whether to automatically load all plugins in the plugins directory
autoload = true
# Override for autoload
[plugins.overrides]
enabled = []
disabled = []
[plugins.config."@versia/openid"]
# If enabled, Versia will require users to log in with an OAuth provider
forced = false
# Allow registration with OAuth providers
# Overriden by the signups.registration setting
allow_registration = true
# [plugins.config."@versia/openid".keys]
# Run Versia Server with those values missing to generate a new key
# public = ""
# private = ""
# The provider MUST support OpenID Connect with .well-known discovery
# Most notably, GitHub does not support this
# Redirect URLs in your OAuth provider can be set to this:
# <base_url>/oauth/sso/<provider_id>/callback*
# The asterisk is important, as it allows for any query parameters to be passed
# Authentik for example uses regex so it can be set to (regex):
# <base_url>/oauth/sso/<provider_id>/callback.*
# [[oidc.providers]]
# name = "CPlusPatch ID"
# id = "cpluspatch-id"
# This MUST match the provider's issuer URI, including the trailing slash (or lack thereof)
# url = "https://id.cpluspatch.com/application/o/versia-testing/"
# client_id = "XXXX"
# client_secret = "XXXXX"
# icon = "https://cpluspatch.com/images/icons/logo.svg"

View file

@ -185,75 +185,6 @@
},
"additionalProperties": false
},
"oidc": {
"type": "object",
"properties": {
"forced": {
"type": "boolean",
"default": false
},
"allow_registration": {
"type": "boolean",
"default": true
},
"providers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1
},
"id": {
"type": "string",
"minLength": 1
},
"url": {
"type": "string",
"minLength": 1
},
"client_id": {
"type": "string",
"minLength": 1
},
"client_secret": {
"type": "string",
"minLength": 1
},
"icon": {
"type": "string",
"minLength": 1
}
},
"required": [
"name",
"id",
"url",
"client_id",
"client_secret"
],
"additionalProperties": false
},
"default": []
},
"keys": {
"type": "object",
"properties": {
"public": {
"type": "string",
"minLength": 1
},
"private": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"http": {
"type": "object",
"properties": {
@ -4049,12 +3980,10 @@
"redis",
"sonic",
"signups",
"oidc",
"http",
"smtp",
"filters",
"ratelimits",
"plugins"
"ratelimits"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"