mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-24 13:38:17 +02:00
config: remove validate side effects (#2109)
* config: default shared key * handle additional errors * update grpc addr and grpc insecure * update google cloud service authentication service account * fix set response headers * fix qps * fix test
This commit is contained in:
parent
2806b67bee
commit
b1d62bb541
19 changed files with 138 additions and 81 deletions
|
@ -20,7 +20,11 @@ import (
|
|||
// ValidateOptions checks that configuration are complete and valid.
|
||||
// Returns on first error found.
|
||||
func ValidateOptions(o *config.Options) error {
|
||||
if _, err := cryptutil.NewAEADCipherFromBase64(o.SharedKey); err != nil {
|
||||
sharedKey, err := o.GetSharedKey()
|
||||
if err != nil {
|
||||
return fmt.Errorf("authenticate: 'SHARED_SECRET' invalid: %w", err)
|
||||
}
|
||||
if _, err := cryptutil.NewAEADCipher(sharedKey); err != nil {
|
||||
return fmt.Errorf("authenticate: 'SHARED_SECRET' invalid: %w", err)
|
||||
}
|
||||
if _, err := cryptutil.NewAEADCipherFromBase64(o.CookieSecret); err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue