mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-06 02:09:15 +02:00
config: default to authenticate.pomerium.app when authenticate url is not specified
This commit is contained in:
parent
949454e886
commit
566d41840f
3 changed files with 7 additions and 0 deletions
|
@ -311,6 +311,7 @@ var defaultOptions = Options{
|
||||||
GRPCAddr: ":443",
|
GRPCAddr: ":443",
|
||||||
GRPCClientTimeout: 10 * time.Second, // Try to withstand transient service failures for a single request
|
GRPCClientTimeout: 10 * time.Second, // Try to withstand transient service failures for a single request
|
||||||
GRPCClientDNSRoundRobin: true,
|
GRPCClientDNSRoundRobin: true,
|
||||||
|
AuthenticateURLString: "https://authenticate.pomerium.app",
|
||||||
AuthenticateCallbackPath: "/oauth2/callback",
|
AuthenticateCallbackPath: "/oauth2/callback",
|
||||||
TracingSampleRate: 0.0001,
|
TracingSampleRate: 0.0001,
|
||||||
|
|
||||||
|
|
|
@ -297,6 +297,7 @@ func TestOptionsFromViper(t *testing.T) {
|
||||||
CookieSecure: true,
|
CookieSecure: true,
|
||||||
InsecureServer: true,
|
InsecureServer: true,
|
||||||
CookieHTTPOnly: true,
|
CookieHTTPOnly: true,
|
||||||
|
AuthenticateURLString: "https://authenticate.pomerium.app",
|
||||||
AuthenticateCallbackPath: "/oauth2/callback",
|
AuthenticateCallbackPath: "/oauth2/callback",
|
||||||
DataBrokerStorageType: "memory",
|
DataBrokerStorageType: "memory",
|
||||||
EnvoyAdminAccessLogPath: os.DevNull,
|
EnvoyAdminAccessLogPath: os.DevNull,
|
||||||
|
@ -310,6 +311,7 @@ func TestOptionsFromViper(t *testing.T) {
|
||||||
&Options{
|
&Options{
|
||||||
Policies: []Policy{{From: "https://from.example", To: mustParseWeightedURLs(t, "https://to.example")}},
|
Policies: []Policy{{From: "https://from.example", To: mustParseWeightedURLs(t, "https://to.example")}},
|
||||||
CookieName: "_pomerium",
|
CookieName: "_pomerium",
|
||||||
|
AuthenticateURLString: "https://authenticate.pomerium.app",
|
||||||
AuthenticateCallbackPath: "/oauth2/callback",
|
AuthenticateCallbackPath: "/oauth2/callback",
|
||||||
CookieSecure: true,
|
CookieSecure: true,
|
||||||
CookieHTTPOnly: true,
|
CookieHTTPOnly: true,
|
||||||
|
|
|
@ -449,6 +449,10 @@ func sourceHostnames(cfg *config.Config) []string {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// remove any hosted authenticate URLs
|
||||||
|
delete(dedupe, "authenticate.pomerium.app")
|
||||||
|
delete(dedupe, "authenticate.staging.pomerium.app")
|
||||||
|
|
||||||
var h []string
|
var h []string
|
||||||
for k := range dedupe {
|
for k := range dedupe {
|
||||||
h = append(h, k)
|
h = append(h, k)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue