You've already forked oauth2-proxy
mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2025-06-17 00:17:40 +02:00
Add option to specify the tls-min-version for the server
This commit is contained in:
@ -785,6 +785,7 @@ var _ = Describe("Legacy Options", func() {
|
||||
secureMetricsAddr = ":9443"
|
||||
crtPath = "tls.crt"
|
||||
keyPath = "tls.key"
|
||||
minVersion = "TLS1.3"
|
||||
)
|
||||
|
||||
var tlsConfig = &TLS{
|
||||
@ -796,6 +797,12 @@ var _ = Describe("Legacy Options", func() {
|
||||
},
|
||||
}
|
||||
|
||||
var tlsConfigMinVersion = &TLS{
|
||||
Cert: tlsConfig.Cert,
|
||||
Key: tlsConfig.Key,
|
||||
MinVersion: minVersion,
|
||||
}
|
||||
|
||||
DescribeTable("should convert to app and metrics servers",
|
||||
func(in legacyServersTableInput) {
|
||||
appServer, metricsServer := in.legacyServer.convert()
|
||||
@ -823,6 +830,19 @@ var _ = Describe("Legacy Options", func() {
|
||||
TLS: tlsConfig,
|
||||
},
|
||||
}),
|
||||
Entry("with TLS options specified with MinVersion", legacyServersTableInput{
|
||||
legacyServer: LegacyServer{
|
||||
HTTPAddress: insecureAddr,
|
||||
HTTPSAddress: secureAddr,
|
||||
TLSKeyFile: keyPath,
|
||||
TLSCertFile: crtPath,
|
||||
TLSMinVersion: minVersion,
|
||||
},
|
||||
expectedAppServer: Server{
|
||||
SecureBindAddress: secureAddr,
|
||||
TLS: tlsConfigMinVersion,
|
||||
},
|
||||
}),
|
||||
Entry("with metrics HTTP and HTTPS addresses", legacyServersTableInput{
|
||||
legacyServer: LegacyServer{
|
||||
HTTPAddress: insecureAddr,
|
||||
|
Reference in New Issue
Block a user