-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow adding optional Client CA files #2306
Conversation
475c1e2
to
d2d991a
Compare
configuration/configuration_test.go
Outdated
@@ -133,7 +133,7 @@ func TestEntryPoints_Set(t *testing.T) { | |||
}{ | |||
{ | |||
name: "all parameters camelcase", | |||
expression: "Name:foo Address::8000 TLS:goo,gii TLS CA:car Redirect.EntryPoint:RedirectEntryPoint Redirect.Regex:RedirectRegex Redirect.Replacement:RedirectReplacement Compress:true WhiteListSourceRange:Range ProxyProtocol.TrustedIPs:192.168.0.1 ForwardedHeaders.TrustedIPs:10.0.0.3/24,20.0.0.3/24", | |||
expression: "Name:foo Address::8000 TLS:goo,gii TLS CA:car TLS CA.Optional:false Redirect.EntryPoint:RedirectEntryPoint Redirect.Regex:RedirectRegex Redirect.Replacement:RedirectReplacement Compress:true WhiteListSourceRange:Range ProxyProtocol.TrustedIPs:192.168.0.1 ForwardedHeaders.TrustedIPs:10.0.0.3/24,20.0.0.3/24", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TLS:goo,gii TLS CA:car TLS CA.Optional:false
->
TLS:goo,gii TLS CA:car CA.Optional:false
configuration/configuration_test.go
Outdated
@@ -163,7 +166,7 @@ func TestEntryPoints_Set(t *testing.T) { | |||
}, | |||
{ | |||
name: "all parameters lowercase", | |||
expression: "name:foo address::8000 tls:goo,gii tls ca:car redirect.entryPoint:RedirectEntryPoint redirect.regex:RedirectRegex redirect.replacement:RedirectReplacement compress:true whiteListSourceRange:Range proxyProtocol.trustedIPs:192.168.0.1 forwardedHeaders.trustedIPs:10.0.0.3/24,20.0.0.3/24", | |||
expression: "name:foo address::8000 tls:goo,gii tls ca:car tls ca.optional:true redirect.entryPoint:RedirectEntryPoint redirect.regex:RedirectRegex redirect.replacement:RedirectReplacement compress:true whiteListSourceRange:Range proxyProtocol.trustedIPs:192.168.0.1 forwardedHeaders.trustedIPs:10.0.0.3/24,20.0.0.3/24", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tls ca:car tls ca.optional:true
->
tls ca:car ca.optional:true
configuration/configuration.go
Outdated
optional := false | ||
if len(result["ca_optional"]) > 0 { | ||
optional = toBool(result, "ca_optional") | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
optional := false
if len(result["ca_optional"]) > 0 {
optional = toBool(result, "ca_optional")
}
->
optional := toBool(result, "ca_optional")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
974d8d6
to
3724775
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👏
3724775
to
82c71f5
Compare
82c71f5
to
71c3b2f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
Allow adding optional client CA files.
More details in proposal #2288.
Fixes #2286 #2288