forked from traefik/traefik
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add serial number certificate to forward headers
- Loading branch information
Showing
8 changed files
with
52 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,6 +70,7 @@ http: | |
- "traefik.http.middlewares.test-passtlsclientcert.passtlsclientcert.info.notafter=true" | ||
- "traefik.http.middlewares.test-passtlsclientcert.passtlsclientcert.info.notbefore=true" | ||
- "traefik.http.middlewares.test-passtlsclientcert.passtlsclientcert.info.sans=true" | ||
- "traefik.http.middlewares.test-passtlsclientcert.passtlsclientcert.info.serialnumber=true" | ||
- "traefik.http.middlewares.test-passtlsclientcert.passtlsclientcert.info.subject.commonname=true" | ||
- "traefik.http.middlewares.test-passtlsclientcert.passtlsclientcert.info.subject.country=true" | ||
- "traefik.http.middlewares.test-passtlsclientcert.passtlsclientcert.info.subject.domaincomponent=true" | ||
|
@@ -482,7 +483,7 @@ SAN="*.cheese.org,*.cheese.net,*.cheese.com,[email protected],[email protected],10.0 | |
!!! info "multiple values" | ||
|
||
All the SANs data are separated by a `,`. | ||
|
||
#### `info.subject` | ||
|
||
The `info.subject` select the specific client certificate subject details you want to add to the `X-Forwarded-Tls-Client-Cert-Info` header. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -345,13 +345,15 @@ func TestPassTLSClientCert_certInfo(t *testing.T) { | |
minimalCheeseCertAllInfo := strings.Join([]string{ | ||
`Subject="C=FR,ST=Some-State,O=Cheese"`, | ||
`Issuer="DC=org,DC=cheese,C=FR,C=US,ST=Signing State,ST=Signing State 2,L=TOULOUSE,L=LYON,O=Cheese,O=Cheese 2,CN=Simple Signing CA 2"`, | ||
`SerialNumber="481535886039632329873080491016862977516759989652"`, | ||
`NB="1544094636"`, | ||
`NA="1632568236"`, | ||
}, fieldSeparator) | ||
|
||
completeCertAllInfo := strings.Join([]string{ | ||
`Subject="DC=org,DC=cheese,C=FR,C=US,ST=Cheese org state,ST=Cheese com state,L=TOULOUSE,L=LYON,O=Cheese,O=Cheese 2,CN=*.cheese.com"`, | ||
`Issuer="DC=org,DC=cheese,C=FR,C=US,ST=Signing State,ST=Signing State 2,L=TOULOUSE,L=LYON,O=Cheese,O=Cheese 2,CN=Simple Signing CA 2"`, | ||
`SerialNumber="1"`, | ||
`NB="1544094616"`, | ||
`NA="1607166616"`, | ||
`SAN="*.cheese.org,*.cheese.net,*.cheese.com,[email protected],[email protected],10.0.1.0,10.0.1.2"`, | ||
|
@@ -399,9 +401,10 @@ func TestPassTLSClientCert_certInfo(t *testing.T) { | |
certContents: []string{minimalCheeseCrt}, | ||
config: dynamic.PassTLSClientCert{ | ||
Info: &dynamic.TLSClientCertificateInfo{ | ||
NotAfter: true, | ||
NotBefore: true, | ||
Sans: true, | ||
NotAfter: true, | ||
NotBefore: true, | ||
Sans: true, | ||
SerialNumber: true, | ||
Subject: &dynamic.TLSCLientCertificateDNInfo{ | ||
CommonName: true, | ||
Country: true, | ||
|
@@ -446,9 +449,10 @@ func TestPassTLSClientCert_certInfo(t *testing.T) { | |
certContents: []string{completeCheeseCrt}, | ||
config: dynamic.PassTLSClientCert{ | ||
Info: &dynamic.TLSClientCertificateInfo{ | ||
NotAfter: true, | ||
NotBefore: true, | ||
Sans: true, | ||
NotAfter: true, | ||
NotBefore: true, | ||
Sans: true, | ||
SerialNumber: true, | ||
Subject: &dynamic.TLSCLientCertificateDNInfo{ | ||
Country: true, | ||
Province: true, | ||
|
@@ -476,9 +480,10 @@ func TestPassTLSClientCert_certInfo(t *testing.T) { | |
certContents: []string{minimalCheeseCrt, completeCheeseCrt}, | ||
config: dynamic.PassTLSClientCert{ | ||
Info: &dynamic.TLSClientCertificateInfo{ | ||
NotAfter: true, | ||
NotBefore: true, | ||
Sans: true, | ||
NotAfter: true, | ||
NotBefore: true, | ||
Sans: true, | ||
SerialNumber: true, | ||
Subject: &dynamic.TLSCLientCertificateDNInfo{ | ||
Country: true, | ||
Province: true, | ||
|