Skip to content
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

Merged
merged 1 commit into from
Nov 10, 2017

Conversation

nmengin
Copy link
Contributor

@nmengin nmengin commented Oct 24, 2017

Description

Allow adding optional client CA files.
More details in proposal #2288.

Fixes #2286 #2288

@@ -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",
Copy link
Contributor

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

@@ -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",
Copy link
Contributor

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

optional := false
if len(result["ca_optional"]) > 0 {
optional = toBool(result, "ca_optional")
}
Copy link
Contributor

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")

Copy link
Contributor

@ldez ldez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ldez ldez added the kind/enhancement a new or improved feature. label Oct 24, 2017
@nmengin nmengin force-pushed the feature/manage-cafile-level branch 2 times, most recently from 974d8d6 to 3724775 Compare October 27, 2017 14:19
Copy link
Member

@mmatur mmatur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👏

Copy link
Member

@juliens juliens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@traefiker traefiker merged commit 4f4491c into traefik:master Nov 10, 2017
@nmengin nmengin deleted the feature/manage-cafile-level branch August 3, 2018 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/tls kind/enhancement a new or improved feature. size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants