Pass the TLS Cert infos in headers
This commit is contained in:
parent
56488d435f
commit
efc6560d83
58 changed files with 3352 additions and 927 deletions
|
@ -182,7 +182,8 @@ type Frontend struct {
|
|||
Backend string `json:"backend,omitempty"`
|
||||
Routes map[string]Route `json:"routes,omitempty" hash:"ignore"`
|
||||
PassHostHeader bool `json:"passHostHeader,omitempty"`
|
||||
PassTLSCert bool `json:"passTLSCert,omitempty"`
|
||||
PassTLSCert bool `json:"passTLSCert,omitempty"` // Deprecated use PassTLSClientCert instead
|
||||
PassTLSClientCert *TLSClientHeaders `json:"passTLSClientCert,omitempty"`
|
||||
Priority int `json:"priority"`
|
||||
BasicAuth []string `json:"basicAuth"` // Deprecated
|
||||
WhitelistSourceRange []string `json:"whitelistSourceRange,omitempty"` // Deprecated
|
||||
|
@ -611,3 +612,27 @@ func (h HTTPCodeRanges) Contains(statusCode int) bool {
|
|||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// TLSClientHeaders holds the TLS client cert headers configuration.
|
||||
type TLSClientHeaders struct {
|
||||
PEM bool `description:"Enable header with escaped client pem" json:"pem"`
|
||||
Infos *TLSClientCertificateInfos `description:"Enable header with configured client cert infos" json:"infos,omitempty"`
|
||||
}
|
||||
|
||||
// TLSClientCertificateInfos holds the client TLS certificate infos configuration
|
||||
type TLSClientCertificateInfos struct {
|
||||
NotAfter bool `description:"Add NotAfter info in header" json:"notAfter"`
|
||||
NotBefore bool `description:"Add NotBefore info in header" json:"notBefore"`
|
||||
Subject *TLSCLientCertificateSubjectInfos `description:"Add Subject info in header" json:"subject,omitempty"`
|
||||
Sans bool `description:"Add Sans info in header" json:"sans"`
|
||||
}
|
||||
|
||||
// TLSCLientCertificateSubjectInfos holds the client TLS certificate subject infos configuration
|
||||
type TLSCLientCertificateSubjectInfos struct {
|
||||
Country bool `description:"Add Country info in header" json:"country"`
|
||||
Province bool `description:"Add Province info in header" json:"province"`
|
||||
Locality bool `description:"Add Locality info in header" json:"locality"`
|
||||
Organization bool `description:"Add Organization info in header" json:"organization"`
|
||||
CommonName bool `description:"Add CommonName info in header" json:"commonName"`
|
||||
SerialNumber bool `description:"Add SerialNumber info in header" json:"serialNumber"`
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue