mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-18 11:37:08 +02:00
cmd/pomerium: add service mode to log
This commit is contained in:
parent
e3f4bcae19
commit
afd5abdc09
4 changed files with 5 additions and 4 deletions
|
@ -155,7 +155,6 @@ func New(opts *Options, optionFuncs ...func(*Authenticate) error) (*Authenticate
|
|||
ProviderURL: opts.ProviderURL,
|
||||
ClientID: opts.ClientID,
|
||||
ClientSecret: opts.ClientSecret,
|
||||
// SessionLifetimeTTL: opts.CookieLifetimeTTL,
|
||||
Scopes: opts.Scopes,
|
||||
})
|
||||
if err != nil {
|
||||
|
|
|
@ -36,7 +36,7 @@ func main() {
|
|||
fmt.Printf("%s", version.FullVersion())
|
||||
os.Exit(0)
|
||||
}
|
||||
log.Info().Str("version", version.FullVersion()).Msg("cmd/pomerium")
|
||||
log.Info().Str("version", version.FullVersion()).Str("service-mode", mainOpts.Services).Msg("cmd/pomerium")
|
||||
|
||||
grpcAuth := middleware.NewSharedSecretCred(mainOpts.SharedKey)
|
||||
grpcOpts := []grpc.ServerOption{grpc.UnaryInterceptor(grpcAuth.ValidateRequest)}
|
||||
|
|
|
@ -23,12 +23,15 @@ type Options struct {
|
|||
// Services is a list enabled service mode. If none are selected, "all" is used.
|
||||
// Available options are : "all", "authenticate", "proxy".
|
||||
Services string `envconfig:"SERVICES"`
|
||||
|
||||
// Addr specifies the host and port on which the server should serve
|
||||
// HTTPS requests. If empty, ":https" is used.
|
||||
Addr string `envconfig:"ADDRESS"`
|
||||
|
||||
// Cert and Key specifies the base64 encoded TLS certificates to use.
|
||||
Cert string `envconfig:"CERTIFICATE"`
|
||||
Key string `envconfig:"CERTIFICATE_KEY"`
|
||||
|
||||
// CertFile and KeyFile specifies the TLS certificates to use.
|
||||
CertFile string `envconfig:"CERTIFICATE_FILE"`
|
||||
KeyFile string `envconfig:"CERTIFICATE_KEY_FILE"`
|
||||
|
|
|
@ -19,7 +19,6 @@ func Test_optionsFromEnvConfig(t *testing.T) {
|
|||
{"good default with no env settings", good, "", "", false},
|
||||
{"invalid service type", nil, "SERVICES", "invalid", true},
|
||||
{"good service", good, "SERVICES", "all", false},
|
||||
|
||||
{"bad debug boolean", nil, "POMERIUM_DEBUG", "yes", true},
|
||||
{"missing shared secret", nil, "SHARED_SECRET", "", true},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue