mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-06 10:21:05 +02:00
add yaml tags to all pointers in config (#397)
This commit is contained in:
parent
ebee64b70b
commit
e5b13a9bf6
3 changed files with 23 additions and 21 deletions
|
@ -66,7 +66,7 @@ type Options struct {
|
||||||
KeyFile string `mapstructure:"certificate_key_file" yaml:"certificate_key_file,omitempty"`
|
KeyFile string `mapstructure:"certificate_key_file" yaml:"certificate_key_file,omitempty"`
|
||||||
|
|
||||||
// TLSCertificate is the hydrated tls.Certificate.
|
// TLSCertificate is the hydrated tls.Certificate.
|
||||||
TLSCertificate *tls.Certificate
|
TLSCertificate *tls.Certificate `yaml:",omitempty"`
|
||||||
|
|
||||||
// HttpRedirectAddr, if set, specifies the host and port to run the HTTP
|
// HttpRedirectAddr, if set, specifies the host and port to run the HTTP
|
||||||
// to HTTPS redirect server on. If empty, no redirect server is started.
|
// to HTTPS redirect server on. If empty, no redirect server is started.
|
||||||
|
@ -80,13 +80,13 @@ type Options struct {
|
||||||
|
|
||||||
// Policies define per-route configuration and access control policies.
|
// Policies define per-route configuration and access control policies.
|
||||||
Policies []Policy
|
Policies []Policy
|
||||||
PolicyEnv string
|
PolicyEnv string `yaml:",omitempty"`
|
||||||
PolicyFile string `mapstructure:"policy_file" yaml:"policy_file,omitempty"`
|
PolicyFile string `mapstructure:"policy_file" yaml:"policy_file,omitempty"`
|
||||||
|
|
||||||
// AuthenticateURL represents the externally accessible http endpoints
|
// AuthenticateURL represents the externally accessible http endpoints
|
||||||
// used for authentication requests and callbacks
|
// used for authentication requests and callbacks
|
||||||
AuthenticateURLString string `mapstructure:"authenticate_service_url" yaml:"authenticate_service_url,omitempty"`
|
AuthenticateURLString string `mapstructure:"authenticate_service_url" yaml:"authenticate_service_url,omitempty"`
|
||||||
AuthenticateURL *url.URL
|
AuthenticateURL *url.URL `yaml:"-,omitempty"`
|
||||||
|
|
||||||
// Session/Cookie management
|
// Session/Cookie management
|
||||||
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie
|
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie
|
||||||
|
@ -115,7 +115,7 @@ type Options struct {
|
||||||
// gRPC endpoint. NOTE: As many load balancers do not support
|
// gRPC endpoint. NOTE: As many load balancers do not support
|
||||||
// externally routed gRPC so this may be an internal location.
|
// externally routed gRPC so this may be an internal location.
|
||||||
AuthorizeURLString string `mapstructure:"authorize_service_url" yaml:"authorize_service_url,omitempty"`
|
AuthorizeURLString string `mapstructure:"authorize_service_url" yaml:"authorize_service_url,omitempty"`
|
||||||
AuthorizeURL *url.URL
|
AuthorizeURL *url.URL `yaml:",omitempty"`
|
||||||
|
|
||||||
// Settings to enable custom behind-the-ingress service communication
|
// Settings to enable custom behind-the-ingress service communication
|
||||||
OverrideCertificateName string `mapstructure:"override_certificate_name" yaml:"override_certificate_name,omitempty"`
|
OverrideCertificateName string `mapstructure:"override_certificate_name" yaml:"override_certificate_name,omitempty"`
|
||||||
|
@ -127,8 +127,8 @@ type Options struct {
|
||||||
SigningKey string `mapstructure:"signing_key" yaml:"signing_key,omitempty"`
|
SigningKey string `mapstructure:"signing_key" yaml:"signing_key,omitempty"`
|
||||||
|
|
||||||
// Headers to set on all proxied requests. Add a 'disable' key map to turn off.
|
// Headers to set on all proxied requests. Add a 'disable' key map to turn off.
|
||||||
HeadersEnv string
|
HeadersEnv string `yaml:",omitempty"`
|
||||||
Headers map[string]string
|
Headers map[string]string `yaml:",omitempty"`
|
||||||
|
|
||||||
// RefreshCooldown limits the rate a user can refresh her session
|
// RefreshCooldown limits the rate a user can refresh her session
|
||||||
RefreshCooldown time.Duration `mapstructure:"refresh_cooldown" yaml:"refresh_cooldown,omitempty"`
|
RefreshCooldown time.Duration `mapstructure:"refresh_cooldown" yaml:"refresh_cooldown,omitempty"`
|
||||||
|
@ -172,7 +172,7 @@ type Options struct {
|
||||||
// with an external server or service. Pomerium can be configured to accept
|
// with an external server or service. Pomerium can be configured to accept
|
||||||
// these requests with this switch
|
// these requests with this switch
|
||||||
ForwardAuthURLString string `mapstructure:"forward_auth_url" yaml:"forward_auth_url,omitempty"`
|
ForwardAuthURLString string `mapstructure:"forward_auth_url" yaml:"forward_auth_url,omitempty"`
|
||||||
ForwardAuthURL *url.URL
|
ForwardAuthURL *url.URL `yaml:",omitempty"`
|
||||||
|
|
||||||
viper *viper.Viper
|
viper *viper.Viper
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,8 +20,8 @@ type Policy struct {
|
||||||
AllowedGroups []string `mapstructure:"allowed_groups" yaml:"allowed_groups,omitempty"`
|
AllowedGroups []string `mapstructure:"allowed_groups" yaml:"allowed_groups,omitempty"`
|
||||||
AllowedDomains []string `mapstructure:"allowed_domains" yaml:"allowed_domains,omitempty"`
|
AllowedDomains []string `mapstructure:"allowed_domains" yaml:"allowed_domains,omitempty"`
|
||||||
|
|
||||||
Source *url.URL
|
Source *url.URL `yaml:",omitempty"`
|
||||||
Destination *url.URL
|
Destination *url.URL `yaml:",omitempty"`
|
||||||
|
|
||||||
// Allow unauthenticated HTTP OPTIONS requests as per the CORS spec
|
// Allow unauthenticated HTTP OPTIONS requests as per the CORS spec
|
||||||
// https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Preflighted_requests
|
// https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Preflighted_requests
|
||||||
|
@ -56,7 +56,7 @@ type Policy struct {
|
||||||
// route when verifying server certificates.
|
// route when verifying server certificates.
|
||||||
TLSCustomCA string `mapstructure:"tls_custom_ca" yaml:"tls_custom_ca,omitempty"`
|
TLSCustomCA string `mapstructure:"tls_custom_ca" yaml:"tls_custom_ca,omitempty"`
|
||||||
TLSCustomCAFile string `mapstructure:"tls_custom_ca_file" yaml:"tls_custom_ca_file,omitempty"`
|
TLSCustomCAFile string `mapstructure:"tls_custom_ca_file" yaml:"tls_custom_ca_file,omitempty"`
|
||||||
RootCAs *x509.CertPool
|
RootCAs *x509.CertPool `yaml:",omitempty"`
|
||||||
|
|
||||||
// Contains the x.509 client certificate to to present to the downstream
|
// Contains the x.509 client certificate to to present to the downstream
|
||||||
// host.
|
// host.
|
||||||
|
@ -64,7 +64,7 @@ type Policy struct {
|
||||||
TLSClientKey string `mapstructure:"tls_client_key" yaml:"tls_client_key,omitempty"`
|
TLSClientKey string `mapstructure:"tls_client_key" yaml:"tls_client_key,omitempty"`
|
||||||
TLSClientCertFile string `mapstructure:"tls_client_cert_file" yaml:"tls_client_cert_file,omitempty"`
|
TLSClientCertFile string `mapstructure:"tls_client_cert_file" yaml:"tls_client_cert_file,omitempty"`
|
||||||
TLSClientKeyFile string `mapstructure:"tls_client_key_file" yaml:"tls_client_key_file,omitempty"`
|
TLSClientKeyFile string `mapstructure:"tls_client_key_file" yaml:"tls_client_key_file,omitempty"`
|
||||||
ClientCertificate *tls.Certificate
|
ClientCertificate *tls.Certificate `yaml:",omitempty"`
|
||||||
|
|
||||||
// SetRequestHeaders adds a collection of headers to the downstream request
|
// SetRequestHeaders adds a collection of headers to the downstream request
|
||||||
// in the form of key value pairs. Note bene, this will overwrite the
|
// in the form of key value pairs. Note bene, this will overwrite the
|
||||||
|
|
|
@ -6,7 +6,9 @@
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- Added yaml tags to all options structs [GH-394](https://github.com/pomerium/pomerium/pull/394)
|
- Added yaml tags to all options struct fields
|
||||||
|
- [GH-394](https://github.com/pomerium/pomerium/pull/394)
|
||||||
|
- [GH-397](https://github.com/pomerium/pomerium/pull/397)
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue