mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-10 23:57:34 +02:00
config: generate cookie secret if not set in all-in-one mode (#3742)
* config: generate cookie secret if not set in all-in-one mode * fix tests * config: add warning about cookie_secret * breakup lines
This commit is contained in:
parent
2c9087f5e7
commit
9413123c0f
8 changed files with 111 additions and 17 deletions
|
@ -32,8 +32,6 @@ func TestOptions_Validate(t *testing.T) {
|
|||
emptyClientID.ClientID = ""
|
||||
emptyClientSecret := newTestOptions(t)
|
||||
emptyClientSecret.ClientSecret = ""
|
||||
emptyCookieSecret := newTestOptions(t)
|
||||
emptyCookieSecret.CookieSecret = ""
|
||||
invalidCookieSecret := newTestOptions(t)
|
||||
invalidCookieSecret.CookieSecret = "OromP1gurwGWjQPYb1nNgSxtbVB5NnLzX6z5WOKr0Yw^"
|
||||
shortCookieLength := newTestOptions(t)
|
||||
|
@ -53,7 +51,6 @@ func TestOptions_Validate(t *testing.T) {
|
|||
}{
|
||||
{"minimum options", good, false},
|
||||
{"nil options", &config.Options{}, true},
|
||||
{"no cookie secret", emptyCookieSecret, true},
|
||||
{"invalid cookie secret", invalidCookieSecret, true},
|
||||
{"short cookie secret", shortCookieLength, true},
|
||||
{"no shared secret", badSharedKey, true},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue