2021-01-03 04:28:46 +00:00
|
|
|
package server
|
|
|
|
|
|
|
|
import (
|
2023-01-03 03:49:02 +00:00
|
|
|
"bytes"
|
|
|
|
"crypto/sha1" //nolint:gosec
|
|
|
|
"encoding/hex"
|
2021-01-03 04:28:46 +00:00
|
|
|
"fmt"
|
|
|
|
"os"
|
2023-02-28 09:01:09 +00:00
|
|
|
"path"
|
2021-01-03 04:28:46 +00:00
|
|
|
"path/filepath"
|
2022-12-17 00:49:05 +00:00
|
|
|
"strconv"
|
2022-02-20 23:14:09 +00:00
|
|
|
"strings"
|
2023-01-03 03:49:02 +00:00
|
|
|
"sync"
|
2021-01-03 04:28:46 +00:00
|
|
|
|
2022-09-16 01:19:16 +00:00
|
|
|
"github.com/valyala/fasthttp"
|
|
|
|
|
2022-12-17 00:49:05 +00:00
|
|
|
"github.com/authelia/authelia/v4/internal/configuration/schema"
|
2022-02-06 13:37:28 +00:00
|
|
|
"github.com/authelia/authelia/v4/internal/middlewares"
|
2023-01-07 00:19:41 +00:00
|
|
|
"github.com/authelia/authelia/v4/internal/random"
|
2023-01-12 10:57:44 +00:00
|
|
|
"github.com/authelia/authelia/v4/internal/session"
|
2023-01-03 03:49:02 +00:00
|
|
|
"github.com/authelia/authelia/v4/internal/templates"
|
2021-01-03 04:28:46 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// ServeTemplatedFile serves a templated version of a specified file,
|
|
|
|
// this is utilised to pass information between the backend and frontend
|
|
|
|
// and generate a nonce to support a restrictive CSP while using material-ui.
|
2023-01-03 03:49:02 +00:00
|
|
|
func ServeTemplatedFile(t templates.Template, opts *TemplatedFileOptions) middlewares.RequestHandler {
|
2022-12-17 00:49:05 +00:00
|
|
|
isDevEnvironment := os.Getenv(environment) == dev
|
2023-02-28 09:01:09 +00:00
|
|
|
ext := path.Ext(t.Name())
|
2021-08-10 00:31:08 +00:00
|
|
|
|
2022-12-17 00:49:05 +00:00
|
|
|
return func(ctx *middlewares.AutheliaCtx) {
|
2023-01-03 03:49:02 +00:00
|
|
|
var err error
|
|
|
|
|
|
|
|
logoOverride := strFalse
|
2021-11-15 08:37:58 +00:00
|
|
|
|
2022-12-17 00:49:05 +00:00
|
|
|
if opts.AssetPath != "" {
|
|
|
|
if _, err = os.Stat(filepath.Join(opts.AssetPath, fileLogo)); err == nil {
|
2023-01-03 03:49:02 +00:00
|
|
|
logoOverride = strTrue
|
2021-11-15 08:37:58 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-03 03:49:02 +00:00
|
|
|
switch ext {
|
2022-12-17 00:49:05 +00:00
|
|
|
case extHTML:
|
|
|
|
ctx.SetContentTypeTextHTML()
|
|
|
|
case extJSON:
|
|
|
|
ctx.SetContentTypeApplicationJSON()
|
2021-01-03 04:28:46 +00:00
|
|
|
default:
|
2022-12-17 00:49:05 +00:00
|
|
|
ctx.SetContentTypeTextPlain()
|
2021-01-03 04:28:46 +00:00
|
|
|
}
|
|
|
|
|
2023-01-07 00:19:41 +00:00
|
|
|
nonce := ctx.Providers.Random.StringCustom(32, random.CharSetAlphaNumeric)
|
2022-12-17 00:49:05 +00:00
|
|
|
|
2021-01-03 04:28:46 +00:00
|
|
|
switch {
|
2022-02-20 23:14:09 +00:00
|
|
|
case ctx.Configuration.Server.Headers.CSPTemplate != "":
|
2022-10-22 11:19:32 +00:00
|
|
|
ctx.Response.Header.Add(fasthttp.HeaderContentSecurityPolicy, strings.ReplaceAll(ctx.Configuration.Server.Headers.CSPTemplate, placeholderCSPNonce, nonce))
|
2022-12-17 00:49:05 +00:00
|
|
|
case isDevEnvironment:
|
2022-10-22 11:19:32 +00:00
|
|
|
ctx.Response.Header.Add(fasthttp.HeaderContentSecurityPolicy, fmt.Sprintf(tmplCSPDevelopment, nonce))
|
2021-01-03 04:28:46 +00:00
|
|
|
default:
|
2022-10-22 11:19:32 +00:00
|
|
|
ctx.Response.Header.Add(fasthttp.HeaderContentSecurityPolicy, fmt.Sprintf(tmplCSPDefault, nonce))
|
2021-01-03 04:28:46 +00:00
|
|
|
}
|
|
|
|
|
2023-01-12 10:57:44 +00:00
|
|
|
var (
|
|
|
|
rememberMe string
|
2023-04-08 04:48:55 +00:00
|
|
|
baseURL string
|
|
|
|
domain string
|
2023-01-12 10:57:44 +00:00
|
|
|
provider *session.Session
|
|
|
|
)
|
|
|
|
|
|
|
|
if provider, err = ctx.GetSessionProvider(); err == nil {
|
2023-04-08 04:48:55 +00:00
|
|
|
if provider.Config.AutheliaURL != nil {
|
|
|
|
baseURL = provider.Config.AutheliaURL.String()
|
|
|
|
} else {
|
|
|
|
baseURL = ctx.RootURLSlash().String()
|
|
|
|
}
|
|
|
|
|
|
|
|
domain = provider.Config.Domain
|
2023-01-12 10:57:44 +00:00
|
|
|
rememberMe = strconv.FormatBool(!provider.Config.DisableRememberMe)
|
2023-04-08 04:48:55 +00:00
|
|
|
} else {
|
|
|
|
baseURL = ctx.RootURLSlash().String()
|
2023-01-12 10:57:44 +00:00
|
|
|
}
|
|
|
|
|
2023-02-28 09:01:09 +00:00
|
|
|
data := &bytes.Buffer{}
|
|
|
|
|
2023-04-08 04:48:55 +00:00
|
|
|
if err = t.Execute(data, opts.CommonData(ctx.BasePath(), baseURL, domain, nonce, logoOverride, rememberMe)); err != nil {
|
2023-02-28 09:01:09 +00:00
|
|
|
ctx.RequestCtx.Error("an error occurred", fasthttp.StatusServiceUnavailable)
|
2023-01-03 03:49:02 +00:00
|
|
|
ctx.Logger.WithError(err).Errorf("Error occcurred rendering template")
|
|
|
|
|
|
|
|
return
|
|
|
|
}
|
2023-02-28 09:01:09 +00:00
|
|
|
|
|
|
|
switch {
|
|
|
|
case ctx.IsHead():
|
|
|
|
ctx.Response.ResetBody()
|
|
|
|
ctx.Response.SkipBody = true
|
|
|
|
ctx.Response.Header.Set(fasthttp.HeaderContentLength, strconv.Itoa(data.Len()))
|
|
|
|
default:
|
|
|
|
if _, err = data.WriteTo(ctx.Response.BodyWriter()); err != nil {
|
|
|
|
ctx.RequestCtx.Error("an error occurred", fasthttp.StatusServiceUnavailable)
|
|
|
|
ctx.Logger.WithError(err).Errorf("Error occcurred writing body")
|
|
|
|
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
2023-01-03 03:49:02 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ServeTemplatedOpenAPI serves templated OpenAPI related files.
|
|
|
|
func ServeTemplatedOpenAPI(t templates.Template, opts *TemplatedFileOptions) middlewares.RequestHandler {
|
2023-02-28 09:01:09 +00:00
|
|
|
ext := path.Ext(t.Name())
|
2023-01-03 03:49:02 +00:00
|
|
|
|
|
|
|
spec := ext == extYML
|
|
|
|
|
|
|
|
return func(ctx *middlewares.AutheliaCtx) {
|
|
|
|
var nonce string
|
|
|
|
|
|
|
|
if spec {
|
|
|
|
ctx.Response.Header.Add(fasthttp.HeaderContentSecurityPolicy, tmplCSPSwagger)
|
|
|
|
} else {
|
2023-01-07 00:19:41 +00:00
|
|
|
nonce = ctx.Providers.Random.StringCustom(32, random.CharSetAlphaNumeric)
|
2023-01-03 03:49:02 +00:00
|
|
|
ctx.Response.Header.Add(fasthttp.HeaderContentSecurityPolicy, fmt.Sprintf(tmplCSPSwaggerNonce, nonce, nonce))
|
|
|
|
}
|
|
|
|
|
|
|
|
switch ext {
|
|
|
|
case extHTML:
|
|
|
|
ctx.SetContentTypeTextHTML()
|
|
|
|
case extYML:
|
|
|
|
ctx.SetContentTypeApplicationYAML()
|
|
|
|
default:
|
|
|
|
ctx.SetContentTypeTextPlain()
|
|
|
|
}
|
|
|
|
|
2023-04-08 04:48:55 +00:00
|
|
|
var (
|
|
|
|
baseURL string
|
|
|
|
domain string
|
|
|
|
provider *session.Session
|
|
|
|
err error
|
|
|
|
)
|
|
|
|
|
|
|
|
if provider, err = ctx.GetSessionProvider(); err == nil {
|
|
|
|
if provider.Config.AutheliaURL != nil {
|
|
|
|
baseURL = provider.Config.AutheliaURL.String()
|
|
|
|
} else {
|
|
|
|
baseURL = ctx.RootURLSlash().String()
|
|
|
|
}
|
|
|
|
|
|
|
|
domain = provider.Config.Domain
|
|
|
|
} else {
|
|
|
|
baseURL = ctx.RootURLSlash().String()
|
|
|
|
}
|
2023-01-03 03:49:02 +00:00
|
|
|
|
2023-02-28 09:01:09 +00:00
|
|
|
data := &bytes.Buffer{}
|
|
|
|
|
2023-04-08 04:48:55 +00:00
|
|
|
if err = t.Execute(data, opts.OpenAPIData(ctx.BasePath(), baseURL, domain, nonce)); err != nil {
|
2023-02-28 09:01:09 +00:00
|
|
|
ctx.RequestCtx.Error("an error occurred", fasthttp.StatusServiceUnavailable)
|
2023-01-03 03:49:02 +00:00
|
|
|
ctx.Logger.WithError(err).Errorf("Error occcurred rendering template")
|
2021-01-03 04:28:46 +00:00
|
|
|
|
|
|
|
return
|
|
|
|
}
|
2023-02-28 09:01:09 +00:00
|
|
|
|
|
|
|
switch {
|
|
|
|
case ctx.IsHead():
|
|
|
|
ctx.Response.ResetBody()
|
|
|
|
ctx.Response.SkipBody = true
|
|
|
|
ctx.Response.Header.Set(fasthttp.HeaderContentLength, strconv.Itoa(data.Len()))
|
|
|
|
default:
|
|
|
|
if _, err = data.WriteTo(ctx.Response.BodyWriter()); err != nil {
|
|
|
|
ctx.RequestCtx.Error("an error occurred", fasthttp.StatusServiceUnavailable)
|
|
|
|
ctx.Logger.WithError(err).Errorf("Error occcurred writing body")
|
|
|
|
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
2021-01-03 04:28:46 +00:00
|
|
|
}
|
|
|
|
}
|
2021-08-05 04:02:07 +00:00
|
|
|
|
2023-01-03 03:49:02 +00:00
|
|
|
// ETagRootURL dynamically matches the If-None-Match header and adds the ETag header.
|
|
|
|
func ETagRootURL(next middlewares.RequestHandler) middlewares.RequestHandler {
|
|
|
|
etags := map[string][]byte{}
|
|
|
|
|
|
|
|
h := sha1.New() //nolint:gosec // Usage is for collision avoidance not security.
|
|
|
|
mu := &sync.Mutex{}
|
|
|
|
|
|
|
|
return func(ctx *middlewares.AutheliaCtx) {
|
|
|
|
k := ctx.RootURLSlash().String()
|
|
|
|
|
|
|
|
mu.Lock()
|
|
|
|
|
|
|
|
etag, ok := etags[k]
|
|
|
|
|
|
|
|
mu.Unlock()
|
|
|
|
|
|
|
|
if ok && bytes.Equal(etag, ctx.Request.Header.PeekBytes(headerIfNoneMatch)) {
|
|
|
|
ctx.Response.Header.SetBytesKV(headerETag, etag)
|
|
|
|
ctx.Response.Header.SetBytesKV(headerCacheControl, headerValueCacheControlETaggedAssets)
|
|
|
|
|
|
|
|
ctx.SetStatusCode(fasthttp.StatusNotModified)
|
|
|
|
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
next(ctx)
|
|
|
|
|
2023-02-28 09:01:09 +00:00
|
|
|
if ctx.Response.SkipBody || ctx.Response.StatusCode() != fasthttp.StatusOK {
|
|
|
|
// Skip generating the ETag as the response body should be empty.
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2023-01-03 03:49:02 +00:00
|
|
|
mu.Lock()
|
|
|
|
|
|
|
|
h.Write(ctx.Response.Body())
|
|
|
|
sum := h.Sum(nil)
|
|
|
|
h.Reset()
|
|
|
|
|
|
|
|
etagNew := make([]byte, hex.EncodedLen(len(sum)))
|
|
|
|
|
|
|
|
hex.Encode(etagNew, sum)
|
|
|
|
|
|
|
|
if !ok || !bytes.Equal(etag, etagNew) {
|
|
|
|
etags[k] = etagNew
|
|
|
|
}
|
|
|
|
|
|
|
|
mu.Unlock()
|
|
|
|
|
|
|
|
ctx.Response.Header.SetBytesKV(headerETag, etagNew)
|
|
|
|
ctx.Response.Header.SetBytesKV(headerCacheControl, headerValueCacheControlETaggedAssets)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-08-05 04:02:07 +00:00
|
|
|
func writeHealthCheckEnv(disabled bool, scheme, host, path string, port int) (err error) {
|
|
|
|
if disabled {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
_, err = os.Stat("/app/healthcheck.sh")
|
|
|
|
if err != nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
_, err = os.Stat("/app/.healthcheck.env")
|
|
|
|
if err != nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
file, err := os.OpenFile("/app/.healthcheck.env", os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0755)
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
_ = file.Close()
|
|
|
|
}()
|
|
|
|
|
|
|
|
if host == "0.0.0.0" {
|
2022-04-07 00:58:51 +00:00
|
|
|
host = localhost
|
2022-03-25 00:56:23 +00:00
|
|
|
} else if strings.Contains(host, ":") {
|
|
|
|
host = "[" + host + "]"
|
2021-08-05 04:02:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
_, err = file.WriteString(fmt.Sprintf(healthCheckEnv, scheme, host, port, path))
|
|
|
|
|
|
|
|
return err
|
|
|
|
}
|
2022-12-17 00:49:05 +00:00
|
|
|
|
|
|
|
// NewTemplatedFileOptions returns a new *TemplatedFileOptions.
|
|
|
|
func NewTemplatedFileOptions(config *schema.Configuration) (opts *TemplatedFileOptions) {
|
|
|
|
opts = &TemplatedFileOptions{
|
|
|
|
AssetPath: config.Server.AssetPath,
|
2023-01-03 03:49:02 +00:00
|
|
|
DuoSelfEnrollment: strFalse,
|
2023-01-12 10:57:44 +00:00
|
|
|
RememberMe: strconv.FormatBool(!config.Session.DisableRememberMe),
|
2022-12-17 00:49:05 +00:00
|
|
|
ResetPassword: strconv.FormatBool(!config.AuthenticationBackend.PasswordReset.Disable),
|
|
|
|
ResetPasswordCustomURL: config.AuthenticationBackend.PasswordReset.CustomURL.String(),
|
|
|
|
Theme: config.Theme,
|
2023-01-03 03:49:02 +00:00
|
|
|
|
|
|
|
EndpointsPasswordReset: !(config.AuthenticationBackend.PasswordReset.Disable || config.AuthenticationBackend.PasswordReset.CustomURL.String() != ""),
|
2023-04-14 16:04:42 +00:00
|
|
|
EndpointsWebAuthn: !config.WebAuthn.Disable,
|
2023-01-03 03:49:02 +00:00
|
|
|
EndpointsTOTP: !config.TOTP.Disable,
|
|
|
|
EndpointsDuo: !config.DuoAPI.Disable,
|
|
|
|
EndpointsOpenIDConnect: !(config.IdentityProviders.OIDC == nil),
|
2023-01-25 09:36:40 +00:00
|
|
|
EndpointsAuthz: config.Server.Endpoints.Authz,
|
2022-12-17 00:49:05 +00:00
|
|
|
}
|
|
|
|
|
2023-01-22 08:58:07 +00:00
|
|
|
if config.PrivacyPolicy.Enabled {
|
|
|
|
opts.PrivacyPolicyURL = config.PrivacyPolicy.PolicyURL.String()
|
|
|
|
opts.PrivacyPolicyAccept = strconv.FormatBool(config.PrivacyPolicy.RequireUserAcceptance)
|
|
|
|
}
|
|
|
|
|
2022-12-17 00:49:05 +00:00
|
|
|
if !config.DuoAPI.Disable {
|
|
|
|
opts.DuoSelfEnrollment = strconv.FormatBool(config.DuoAPI.EnableSelfEnrollment)
|
|
|
|
}
|
|
|
|
|
|
|
|
return opts
|
|
|
|
}
|
|
|
|
|
|
|
|
// TemplatedFileOptions is a struct which is used for many templated files.
|
|
|
|
type TemplatedFileOptions struct {
|
|
|
|
AssetPath string
|
|
|
|
DuoSelfEnrollment string
|
|
|
|
RememberMe string
|
|
|
|
ResetPassword string
|
|
|
|
ResetPasswordCustomURL string
|
2023-01-22 08:58:07 +00:00
|
|
|
PrivacyPolicyURL string
|
|
|
|
PrivacyPolicyAccept string
|
2022-12-17 00:49:05 +00:00
|
|
|
Session string
|
|
|
|
Theme string
|
2023-01-03 03:49:02 +00:00
|
|
|
|
|
|
|
EndpointsPasswordReset bool
|
2023-04-14 16:04:42 +00:00
|
|
|
EndpointsWebAuthn bool
|
2023-01-03 03:49:02 +00:00
|
|
|
EndpointsTOTP bool
|
|
|
|
EndpointsDuo bool
|
|
|
|
EndpointsOpenIDConnect bool
|
2023-01-25 09:36:40 +00:00
|
|
|
|
|
|
|
EndpointsAuthz map[string]schema.ServerAuthzEndpoint
|
2022-12-17 00:49:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// CommonData returns a TemplatedFileCommonData with the dynamic options.
|
2023-04-08 04:48:55 +00:00
|
|
|
func (options *TemplatedFileOptions) CommonData(base, baseURL, domain, nonce, logoOverride, rememberMe string) TemplatedFileCommonData {
|
2023-01-12 10:57:44 +00:00
|
|
|
if rememberMe != "" {
|
2023-04-08 04:48:55 +00:00
|
|
|
return options.commonDataWithRememberMe(base, baseURL, domain, nonce, logoOverride, rememberMe)
|
2023-01-12 10:57:44 +00:00
|
|
|
}
|
|
|
|
|
2022-12-17 00:49:05 +00:00
|
|
|
return TemplatedFileCommonData{
|
|
|
|
Base: base,
|
|
|
|
BaseURL: baseURL,
|
2023-04-08 04:48:55 +00:00
|
|
|
Domain: domain,
|
2022-12-17 00:49:05 +00:00
|
|
|
CSPNonce: nonce,
|
|
|
|
LogoOverride: logoOverride,
|
|
|
|
DuoSelfEnrollment: options.DuoSelfEnrollment,
|
|
|
|
RememberMe: options.RememberMe,
|
|
|
|
ResetPassword: options.ResetPassword,
|
|
|
|
ResetPasswordCustomURL: options.ResetPasswordCustomURL,
|
2023-01-22 08:58:07 +00:00
|
|
|
PrivacyPolicyURL: options.PrivacyPolicyURL,
|
|
|
|
PrivacyPolicyAccept: options.PrivacyPolicyAccept,
|
2022-12-17 00:49:05 +00:00
|
|
|
Session: options.Session,
|
|
|
|
Theme: options.Theme,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-12 10:57:44 +00:00
|
|
|
// CommonDataWithRememberMe returns a TemplatedFileCommonData with the dynamic options.
|
2023-04-08 04:48:55 +00:00
|
|
|
func (options *TemplatedFileOptions) commonDataWithRememberMe(base, baseURL, domain, nonce, logoOverride, rememberMe string) TemplatedFileCommonData {
|
2023-01-12 10:57:44 +00:00
|
|
|
return TemplatedFileCommonData{
|
|
|
|
Base: base,
|
|
|
|
BaseURL: baseURL,
|
2023-04-08 04:48:55 +00:00
|
|
|
Domain: domain,
|
2023-01-12 10:57:44 +00:00
|
|
|
CSPNonce: nonce,
|
|
|
|
LogoOverride: logoOverride,
|
|
|
|
DuoSelfEnrollment: options.DuoSelfEnrollment,
|
|
|
|
RememberMe: rememberMe,
|
|
|
|
ResetPassword: options.ResetPassword,
|
|
|
|
ResetPasswordCustomURL: options.ResetPasswordCustomURL,
|
|
|
|
Session: options.Session,
|
|
|
|
Theme: options.Theme,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-03 03:49:02 +00:00
|
|
|
// OpenAPIData returns a TemplatedFileOpenAPIData with the dynamic options.
|
2023-04-08 04:48:55 +00:00
|
|
|
func (options *TemplatedFileOptions) OpenAPIData(base, baseURL, domain, nonce string) TemplatedFileOpenAPIData {
|
2023-01-03 03:49:02 +00:00
|
|
|
return TemplatedFileOpenAPIData{
|
|
|
|
Base: base,
|
|
|
|
BaseURL: baseURL,
|
2023-04-08 04:48:55 +00:00
|
|
|
Domain: domain,
|
2023-01-03 03:49:02 +00:00
|
|
|
CSPNonce: nonce,
|
|
|
|
|
2023-01-25 09:36:40 +00:00
|
|
|
Session: options.Session,
|
|
|
|
PasswordReset: options.EndpointsPasswordReset,
|
2023-04-14 16:04:42 +00:00
|
|
|
WebAuthn: options.EndpointsWebAuthn,
|
2023-01-25 09:36:40 +00:00
|
|
|
TOTP: options.EndpointsTOTP,
|
|
|
|
Duo: options.EndpointsDuo,
|
|
|
|
OpenIDConnect: options.EndpointsOpenIDConnect,
|
|
|
|
EndpointsAuthz: options.EndpointsAuthz,
|
2023-01-03 03:49:02 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-12-17 00:49:05 +00:00
|
|
|
// TemplatedFileCommonData is a struct which is used for many templated files.
|
|
|
|
type TemplatedFileCommonData struct {
|
|
|
|
Base string
|
|
|
|
BaseURL string
|
2023-04-08 04:48:55 +00:00
|
|
|
Domain string
|
2022-12-17 00:49:05 +00:00
|
|
|
CSPNonce string
|
|
|
|
LogoOverride string
|
|
|
|
DuoSelfEnrollment string
|
|
|
|
RememberMe string
|
|
|
|
ResetPassword string
|
|
|
|
ResetPasswordCustomURL string
|
2023-01-22 08:58:07 +00:00
|
|
|
PrivacyPolicyURL string
|
|
|
|
PrivacyPolicyAccept string
|
2022-12-17 00:49:05 +00:00
|
|
|
Session string
|
|
|
|
Theme string
|
|
|
|
}
|
2023-01-03 03:49:02 +00:00
|
|
|
|
|
|
|
// TemplatedFileOpenAPIData is a struct which is used for the OpenAPI spec file.
|
|
|
|
type TemplatedFileOpenAPIData struct {
|
|
|
|
Base string
|
|
|
|
BaseURL string
|
2023-04-08 04:48:55 +00:00
|
|
|
Domain string
|
2023-01-03 03:49:02 +00:00
|
|
|
CSPNonce string
|
|
|
|
Session string
|
|
|
|
PasswordReset bool
|
2023-04-14 16:04:42 +00:00
|
|
|
WebAuthn bool
|
2023-01-03 03:49:02 +00:00
|
|
|
TOTP bool
|
|
|
|
Duo bool
|
|
|
|
OpenIDConnect bool
|
2023-01-25 09:36:40 +00:00
|
|
|
|
|
|
|
EndpointsAuthz map[string]schema.ServerAuthzEndpoint
|
2023-01-03 03:49:02 +00:00
|
|
|
}
|