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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃殌 Add mTLS and fix deprecation in TLS config #1715

Closed
ltns35 opened this issue Jan 15, 2022 · 1 comment 路 Fixed by #1761
Closed

馃殌 Add mTLS and fix deprecation in TLS config #1715

ltns35 opened this issue Jan 15, 2022 · 1 comment 路 Fixed by #1761

Comments

@ltns35
Copy link

ltns35 commented Jan 15, 2022

Is your feature request related to a problem?
Yes, when starting the app with ListenTLS it has the following default configuration where PreferServerCipherSuites is deprecated by the Go team.

config := &tls.Config{
			MinVersion:   tls.VersionTLS12,
			PreferServerCipherSuites: true, // deprecated and ignored
			Certificates: []tls.Certificate{
				cert,
			},
		}

It could be interesting to allow mTLS in the configuration because many times we have to use certificate authorization for our microservices.

Describe the solution you'd like
We should update the MinVersion to TLS13, remove PreferServerCipherSuites because is deprecated and allow to add the CA.

config := &tls.Config{
			MinVersion:  tls.VersionTLS13, // changed to TLS13
			Certificates: []tls.Certificate{
				cert,
			},
                        ClientCAs:    caCertPool,
			ClientAuth:   tls.RequireAndVerifyClientCert
		}

Describe alternatives you've considered
Maybe adding the CA for mTSL could be done with another function called ListenWithMutualTLS.

Additional context
Go version: 1.17.5
Fiber version: 2.24.0

@welcome
Copy link

welcome bot commented Jan 15, 2022

Thanks for opening your first issue here! 馃帀 Be sure to follow the issue template! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord

@ltns35 ltns35 changed the title Add mTLS and fix deprecation in TLS config馃殌 馃殌 Add mTLS and fix deprecation in TLS config Jan 15, 2022
@efectn efectn closed this as completed Feb 28, 2022
@ReneWerner87 ReneWerner87 linked a pull request Feb 28, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants