mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-03 16:59:22 +02:00
config: require shared key if using redis backed databroker (#1801)
This commit is contained in:
parent
d4037f0010
commit
f946d940f5
2 changed files with 7 additions and 1 deletions
|
@ -47,6 +47,11 @@ func Test_Validate(t *testing.T) {
|
|||
badSignoutRedirectURL := testOptions()
|
||||
badSignoutRedirectURL.SignOutRedirectURLString = "--"
|
||||
|
||||
missingSharedSecretWithPersistence := testOptions()
|
||||
missingSharedSecretWithPersistence.SharedKey = ""
|
||||
missingSharedSecretWithPersistence.DataBrokerStorageType = StorageRedisName
|
||||
missingSharedSecretWithPersistence.DataBrokerStorageConnectionString = "redis://somehost:6379"
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
testOpts *Options
|
||||
|
@ -60,6 +65,7 @@ func Test_Validate(t *testing.T) {
|
|||
{"invalid databroker storage type", invalidStorageType, true},
|
||||
{"missing databroker storage dsn", missingStorageDSN, true},
|
||||
{"invalid signout redirect url", badSignoutRedirectURL, true},
|
||||
{"no shared key with databroker persistence", missingSharedSecretWithPersistence, true},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue