diff --git a/jsonschema/api-docs.md b/jsonschema/api-docs.md index 0795fdf5..1afd6d9f 100644 --- a/jsonschema/api-docs.md +++ b/jsonschema/api-docs.md @@ -17,7 +17,7 @@ Config contains the configuration for the core server |[**redis**](#redis)|`object`|Config for the redis client used to store key-value pairs
|| |[**tracer**](#tracer)|`object`|Config defines the configuration settings for opentelemetry tracing
|| |[**email**](#email)|`object`||| -|[**sessions**](#sessions)|`object`|Config contains the configuration for the session store
|| +|[**sessions**](#sessions)|`object`||| |[**posthog**](#posthog)|`object`|Config is the configuration for PostHog
|| |[**totp**](#totp)|`object`||| |[**ratelimit**](#ratelimit)|`object`|Config defines the configuration settings for the default rate limiter
|| @@ -245,7 +245,7 @@ Auth settings including oauth2 providers and token configuration |Name|Type|Description|Required| |----|----|-----------|--------| |**enabled**|`boolean`|Enabled authentication on the server, not recommended to disable
|no| -|[**token**](#authtoken)|`object`|Config defines the configuration settings for authentication tokens used in the server
|yes| +|[**token**](#authtoken)|`object`||yes| |[**supportedProviders**](#authsupportedproviders)|`string[]`||no| |[**providers**](#authproviders)|`object`|OauthProviderConfig represents the configuration for OAuth providers such as Github and Google
|no| @@ -253,23 +253,20 @@ Auth settings including oauth2 providers and token configuration ### auth\.token: object -Config defines the configuration settings for authentication tokens used in the server - - **Properties** |Name|Type|Description|Required| |----|----|-----------|--------| -|**kid**|`string`|KID represents the Key ID used in the configuration.
|yes| -|**audience**|`string`|Audience represents the target audience for the tokens.
|yes| -|**refreshAudience**|`string`|RefreshAudience represents the audience for refreshing tokens.
|no| -|**issuer**|`string`|Issuer represents the issuer of the tokens
|yes| -|**accessDuration**|`integer`|AccessDuration represents the duration of the access token is valid for
|no| -|**refreshDuration**|`integer`|RefreshDuration represents the duration of the refresh token is valid for
|no| -|**refreshOverlap**|`integer`|RefreshOverlap represents the overlap time for a refresh and access token
|no| -|**jwksEndpoint**|`string`|JWKSEndpoint represents the endpoint for the JSON Web Key Set
|no| +|**kid**|`string`||yes| +|**audience**|`string`||yes| +|**refreshAudience**|`string`||no| +|**issuer**|`string`||yes| +|**accessDuration**|`integer`||no| +|**refreshDuration**|`integer`||no| +|**refreshOverlap**|`integer`||no| +|**jwksEndpoint**|`string`||no| |[**keys**](#authtokenkeys)|`object`||yes| -|**generateKeys**|`boolean`|GenerateKeys is a boolean to determine if the keys should be generated
|no| +|**generateKeys**|`boolean`||no| **Additional Properties:** not allowed @@ -297,26 +294,23 @@ OauthProviderConfig represents the configuration for OAuth providers such as Git |Name|Type|Description|Required| |----|----|-----------|--------| |**redirectUrl**|`string`|RedirectURL is the URL that the OAuth2 client will redirect to after authentication is complete
|| -|[**github**](#authprovidersgithub)|`object`|ProviderConfig represents the configuration settings for a Github Oauth Provider
|yes| -|[**google**](#authprovidersgoogle)|`object`|ProviderConfig represents the configuration settings for a Google Oauth Provider
|yes| -|[**webauthn**](#authproviderswebauthn)|`object`|ProviderConfig represents the configuration settings for a Webauthn Provider
|yes| +|[**github**](#authprovidersgithub)|`object`||yes| +|[**google**](#authprovidersgoogle)|`object`||yes| +|[**webauthn**](#authproviderswebauthn)|`object`||yes| **Additional Properties:** not allowed #### auth\.providers\.github: object -ProviderConfig represents the configuration settings for a Github Oauth Provider - - **Properties** |Name|Type|Description|Required| |----|----|-----------|--------| -|**clientId**|`string`|ClientID is the public identifier for the GitHub oauth2 client
|yes| -|**clientSecret**|`string`|ClientSecret is the secret for the GitHub oauth2 client
|yes| -|**clientEndpoint**|`string`|ClientEndpoint is the endpoint for the GitHub oauth2 client
|no| +|**clientId**|`string`||yes| +|**clientSecret**|`string`||yes| +|**clientEndpoint**|`string`||no| |[**scopes**](#authprovidersgithubscopes)|`string[]`||yes| -|**redirectUrl**|`string`|RedirectURL is the URL that the GitHub oauth2 client will redirect to after authentication with Github
|yes| +|**redirectUrl**|`string`||yes| **Additional Properties:** not allowed @@ -328,18 +322,15 @@ ProviderConfig represents the configuration settings for a Github Oauth Provider #### auth\.providers\.google: object -ProviderConfig represents the configuration settings for a Google Oauth Provider - - **Properties** |Name|Type|Description|Required| |----|----|-----------|--------| -|**clientId**|`string`|ClientID is the public identifier for the Google oauth2 client
|yes| -|**clientSecret**|`string`|ClientSecret is the secret for the Google oauth2 client
|yes| -|**clientEndpoint**|`string`|ClientEndpoint is the endpoint for the Google oauth2 client
|no| +|**clientId**|`string`||yes| +|**clientSecret**|`string`||yes| +|**clientEndpoint**|`string`||no| |[**scopes**](#authprovidersgooglescopes)|`string[]`||yes| -|**redirectUrl**|`string`|RedirectURL is the URL that the Google oauth2 client will redirect to after authentication with Google
|yes| +|**redirectUrl**|`string`||yes| **Additional Properties:** not allowed @@ -351,21 +342,18 @@ ProviderConfig represents the configuration settings for a Google Oauth Provider #### auth\.providers\.webauthn: object -ProviderConfig represents the configuration settings for a Webauthn Provider - - **Properties** |Name|Type|Description|Required| |----|----|-----------|--------| -|**enabled**|`boolean`|Enabled is the provider enabled
|no| -|**displayName**|`string`|DisplayName is the site display name
|yes| -|**relyingPartyId**|`string`|RelyingPartyID is the relying party identifier
set to localhost for development, no port
|yes| +|**enabled**|`boolean`||no| +|**displayName**|`string`||yes| +|**relyingPartyId**|`string`||yes| |[**requestOrigins**](#authproviderswebauthnrequestorigins)|`string[]`||yes| -|**maxDevices**|`integer`|MaxDevices is the maximum number of devices that can be associated with a user
|no| -|**enforceTimeout**|`boolean`|EnforceTimeout at the Relying Party / Server. This means if enabled and the user takes too long that even if the browser does not
enforce a timeout, the server will
|no| -|**timeout**|`integer`|Timeout is the timeout in seconds
|no| -|**debug**|`boolean`|Debug enables debug mode
|no| +|**maxDevices**|`integer`||no| +|**enforceTimeout**|`boolean`||no| +|**timeout**|`integer`||no| +|**debug**|`boolean`||no| **Additional Properties:** not allowed @@ -562,16 +550,13 @@ OTLP settings for the otlp provider ## sessions: object -Config contains the configuration for the session store - - **Properties** |Name|Type|Description|Required| |----|----|-----------|--------| -|**signingKey**|`string`|SigningKey must be a 16, 32, or 64 character string used to encode the cookie
|| -|**encryptionKey**|`string`|EncryptionKey must be a 16, 32, or 64 character string used to encode the cookie
|| -|**domain**|`string`|Domain is the domain for the cookie, leave empty to use the default value of the server
|| +|**signingKey**|`string`||| +|**encryptionKey**|`string`||| +|**domain**|`string`||| **Additional Properties:** not allowed diff --git a/jsonschema/core.config.json b/jsonschema/core.config.json index 92c94f60..000f0618 100644 --- a/jsonschema/core.config.json +++ b/jsonschema/core.config.json @@ -481,24 +481,19 @@ "github.ProviderConfig": { "properties": { "clientId": { - "type": "string", - "description": "ClientID is the public identifier for the GitHub oauth2 client" + "type": "string" }, "clientSecret": { - "type": "string", - "description": "ClientSecret is the secret for the GitHub oauth2 client" + "type": "string" }, "clientEndpoint": { - "type": "string", - "description": "ClientEndpoint is the endpoint for the GitHub oauth2 client" + "type": "string" }, "scopes": { - "$ref": "#/$defs/[]string", - "description": "Scopes are the scopes that the GitHub oauth2 client will request" + "$ref": "#/$defs/[]string" }, "redirectUrl": { - "type": "string", - "description": "RedirectURL is the URL that the GitHub oauth2 client will redirect to after authentication with Github" + "type": "string" } }, "additionalProperties": false, @@ -508,30 +503,24 @@ "clientSecret", "scopes", "redirectUrl" - ], - "description": "ProviderConfig represents the configuration settings for a Github Oauth Provider" + ] }, "google.ProviderConfig": { "properties": { "clientId": { - "type": "string", - "description": "ClientID is the public identifier for the Google oauth2 client" + "type": "string" }, "clientSecret": { - "type": "string", - "description": "ClientSecret is the secret for the Google oauth2 client" + "type": "string" }, "clientEndpoint": { - "type": "string", - "description": "ClientEndpoint is the endpoint for the Google oauth2 client" + "type": "string" }, "scopes": { - "$ref": "#/$defs/[]string", - "description": "Scopes are the scopes that the Google oauth2 client will request" + "$ref": "#/$defs/[]string" }, "redirectUrl": { - "type": "string", - "description": "RedirectURL is the URL that the Google oauth2 client will redirect to after authentication with Google" + "type": "string" } }, "additionalProperties": false, @@ -541,8 +530,7 @@ "clientSecret", "scopes", "redirectUrl" - ], - "description": "ProviderConfig represents the configuration settings for a Google Oauth Provider" + ] }, "handlers.OauthProviderConfig": { "properties": { @@ -801,63 +789,49 @@ "sessions.Config": { "properties": { "signingKey": { - "type": "string", - "description": "SigningKey must be a 16, 32, or 64 character string used to encode the cookie" + "type": "string" }, "encryptionKey": { - "type": "string", - "description": "EncryptionKey must be a 16, 32, or 64 character string used to encode the cookie" + "type": "string" }, "domain": { - "type": "string", - "description": "Domain is the domain for the cookie, leave empty to use the default value of the server" + "type": "string" } }, "additionalProperties": false, - "type": "object", - "description": "Config contains the configuration for the session store" + "type": "object" }, "tokens.Config": { "properties": { "kid": { - "type": "string", - "description": "KID represents the Key ID used in the configuration." + "type": "string" }, "audience": { - "type": "string", - "description": "Audience represents the target audience for the tokens." + "type": "string" }, "refreshAudience": { - "type": "string", - "description": "RefreshAudience represents the audience for refreshing tokens." + "type": "string" }, "issuer": { - "type": "string", - "description": "Issuer represents the issuer of the tokens" + "type": "string" }, "accessDuration": { - "type": "integer", - "description": "AccessDuration represents the duration of the access token is valid for" + "type": "integer" }, "refreshDuration": { - "type": "integer", - "description": "RefreshDuration represents the duration of the refresh token is valid for" + "type": "integer" }, "refreshOverlap": { - "type": "integer", - "description": "RefreshOverlap represents the overlap time for a refresh and access token" + "type": "integer" }, "jwksEndpoint": { - "type": "string", - "description": "JWKSEndpoint represents the endpoint for the JSON Web Key Set" + "type": "string" }, "keys": { - "$ref": "#/$defs/map[string]string", - "description": "Keys represents the key pairs used for signing the tokens" + "$ref": "#/$defs/map[string]string" }, "generateKeys": { - "type": "boolean", - "description": "GenerateKeys is a boolean to determine if the keys should be generated" + "type": "boolean" } }, "additionalProperties": false, @@ -867,8 +841,7 @@ "audience", "issuer", "keys" - ], - "description": "Config defines the configuration settings for authentication tokens used in the server" + ] }, "totp.Config": { "properties": { @@ -900,36 +873,28 @@ "webauthn.ProviderConfig": { "properties": { "enabled": { - "type": "boolean", - "description": "Enabled is the provider enabled" + "type": "boolean" }, "displayName": { - "type": "string", - "description": "DisplayName is the site display name" + "type": "string" }, "relyingPartyId": { - "type": "string", - "description": "RelyingPartyID is the relying party identifier\nset to localhost for development, no port" + "type": "string" }, "requestOrigins": { - "$ref": "#/$defs/[]string", - "description": "RequestOrigins the origin domain(s) for authentication requests\ninclude the scheme and port" + "$ref": "#/$defs/[]string" }, "maxDevices": { - "type": "integer", - "description": "MaxDevices is the maximum number of devices that can be associated with a user" + "type": "integer" }, "enforceTimeout": { - "type": "boolean", - "description": "EnforceTimeout at the Relying Party / Server. This means if enabled and the user takes too long that even if the browser does not\nenforce a timeout, the server will" + "type": "boolean" }, "timeout": { - "type": "integer", - "description": "Timeout is the timeout in seconds" + "type": "integer" }, "debug": { - "type": "boolean", - "description": "Debug enables debug mode" + "type": "boolean" } }, "additionalProperties": false, @@ -938,8 +903,7 @@ "displayName", "relyingPartyId", "requestOrigins" - ], - "description": "ProviderConfig represents the configuration settings for a Webauthn Provider" + ] } }, "properties": { diff --git a/jsonschema/schema_generator.go b/jsonschema/schema_generator.go index 1282d3c0..ac2a36f9 100644 --- a/jsonschema/schema_generator.go +++ b/jsonschema/schema_generator.go @@ -38,10 +38,6 @@ var includedPackages = []string{ "./internal/entdb", "./internal/httpserve/handlers", "./pkg/otelx", - "./pkg/sessions", - "./pkg/tokens", - "./pkg/utils", - "./pkg/providers", "./pkg/analytics", "./pkg/middleware", "./pkg/events/kafka/kafkaconfig",