initialize insecure options

This commit is contained in:
Willy Kloucek
2022-04-27 15:46:17 +02:00
parent a261fc8c88
commit 5b572b3852
4 changed files with 111 additions and 68 deletions

View File

@@ -38,25 +38,25 @@ type Service struct {
}
type Debug struct {
Addr string `yaml:"addr" env:"AUTH_BEARER_DEBUG_ADDR"`
Token string `yaml:"token" env:"AUTH_BEARER_DEBUG_TOKEN"`
Pprof bool `yaml:"pprof" env:"AUTH_BEARER_DEBUG_PPROF"`
Zpages bool `yaml:"zpages" env:"AUTH_BEARER_DEBUG_ZPAGES"`
Addr string `yaml:"addr,omitempty" env:"AUTH_BEARER_DEBUG_ADDR"`
Token string `yaml:"token,omitempty" env:"AUTH_BEARER_DEBUG_TOKEN"`
Pprof bool `yaml:"pprof,omitempty" env:"AUTH_BEARER_DEBUG_PPROF"`
Zpages bool `yaml:"zpages,omitempty" env:"AUTH_BEARER_DEBUG_ZPAGES"`
}
type GRPCConfig struct {
Addr string `yaml:"addr" env:"AUTH_BEARER_GRPC_ADDR" desc:"The address of the grpc service."`
Protocol string `yaml:"protocol" env:"AUTH_BEARER_GRPC_PROTOCOL" desc:"The transport protocol of the grpc service."`
Addr string `yaml:"addr,omitempty" env:"AUTH_BEARER_GRPC_ADDR" desc:"The address of the grpc service."`
Protocol string `yaml:"protocol,omitempty" env:"AUTH_BEARER_GRPC_PROTOCOL" desc:"The transport protocol of the grpc service."`
}
type AuthProviders struct {
OIDC OIDCProvider `yaml:"oidc"`
OIDC OIDCProvider `yaml:"oidc,omitempty"`
}
type OIDCProvider struct {
Issuer string `yaml:"issuer" env:"OCIS_URL;AUTH_BEARER_OIDC_ISSUER"`
Insecure bool `yaml:"insecure" env:"OCIS_INSECURE;AUTH_BEARER_OIDC_INSECURE"`
IDClaim string `yaml:"id_claim"`
UIDClaim string `yaml:"uid_claim"`
GIDClaim string `yaml:"gid_claim"`
Issuer string `yaml:"issuer,omitempty" env:"OCIS_URL;AUTH_BEARER_OIDC_ISSUER"`
Insecure bool `yaml:"insecure,omitempty" env:"OCIS_INSECURE;AUTH_BEARER_OIDC_INSECURE"`
IDClaim string `yaml:"id_claim,omitempty"`
UIDClaim string `yaml:"uid_claim,omitempty"`
GIDClaim string `yaml:"gid_claim,omitempty"`
}