mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-03 16:59:22 +02:00
all: fix misspelling of override (#50)
This commit is contained in:
parent
dbafc691c3
commit
6f93909194
7 changed files with 16 additions and 16 deletions
|
@ -25,10 +25,10 @@ type Options struct {
|
|||
// InternalAddr is the internal (behind the ingress) address to use when making an
|
||||
// authentication connection. If empty, Addr is used.
|
||||
InternalAddr string
|
||||
// OverideCertificateName overrides the server name used to verify the hostname on the
|
||||
// OverrideCertificateName overrides the server name used to verify the hostname on the
|
||||
// returned certificates from the server. gRPC internals also use it to override the virtual
|
||||
// hosting name if it is set.
|
||||
OverideCertificateName string
|
||||
OverrideCertificateName string
|
||||
// Shared secret is used to authenticate a authenticate-client with a authenticate-server.
|
||||
SharedSecret string
|
||||
}
|
||||
|
|
|
@ -45,13 +45,13 @@ func NewGRPC(opts *Options) (p Authenticator, err error) {
|
|||
}
|
||||
|
||||
log.Info().
|
||||
Str("OverideCertificateName", opts.OverideCertificateName).
|
||||
Str("OverrideCertificateName", opts.OverrideCertificateName).
|
||||
Str("addr", connAddr).Msgf("proxy/authenticator: grpc connection")
|
||||
cert := credentials.NewTLS(&tls.Config{RootCAs: cp})
|
||||
|
||||
// overide allowed certificate name string, typically used when doing behind ingress connection
|
||||
if opts.OverideCertificateName != "" {
|
||||
err = cert.OverrideServerName(opts.OverideCertificateName)
|
||||
// override allowed certificate name string, typically used when doing behind ingress connection
|
||||
if opts.OverrideCertificateName != "" {
|
||||
err = cert.OverrideServerName(opts.OverrideCertificateName)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
@ -193,7 +193,7 @@ func TestNewGRPC(t *testing.T) {
|
|||
{"empty connection", &Options{Addr: "", SharedSecret: "shh"}, true, "proxy/authenticator: connection address required"},
|
||||
{"empty connections", &Options{Addr: "", InternalAddr: "", SharedSecret: "shh"}, true, "proxy/authenticator: connection address required"},
|
||||
{"internal addr", &Options{Addr: "", InternalAddr: "intranet.local", SharedSecret: "shh"}, false, ""},
|
||||
{"cert overide", &Options{Addr: "", InternalAddr: "intranet.local", OverideCertificateName: "*.local", SharedSecret: "shh"}, false, ""},
|
||||
{"cert override", &Options{Addr: "", InternalAddr: "intranet.local", OverrideCertificateName: "*.local", SharedSecret: "shh"}, false, ""},
|
||||
|
||||
// {"addr and internal ", &Options{Addr: "localhost", InternalAddr: "local.localhost", SharedSecret: "shh"}, nil, true, ""},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue