@marcel91200 / caddy Mirror · read-only / commits / b4bfa29b
Fork 0

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

Mirrored from https://github.com/Slazee/caddy.git

Synced Nov 14, 00:15 UTC

admin: Require identity for remote (fix #4478)

Matthew Holt committed Jan 5, 2022 at 17:55 UTC b4bfa29be2191ffacfa4ed747bd5cdce8da8917f
1 file changed +3
admin.go
+3
@@ -466,6 +466,9 @@ func replaceRemoteAdminServer(ctx Context, cfg *Config) error {
466 }
467
468 // create TLS config that will enforce mutual authentication
469 + if identityCertCache == nil {
470 + return fmt.Errorf("cannot enable remote admin without a certificate cache; configure identity management to initialize a certificate cache")
471 + }
472 cmCfg := cfg.Admin.Identity.certmagicConfig(remoteLogger, false)
473 tlsConfig := cmCfg.TLSConfig()
474 tlsConfig.NextProtos = nil // this server does not solve ACME challenges