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

fix: ssl need to be update when secret has been changed #337

Merged
merged 8 commits into from Apr 10, 2021

Conversation

gxthrj
Copy link
Contributor

@gxthrj gxthrj commented Apr 3, 2021

Please answer these questions before submitting a pull request

test/e2e/ingress/secret.go Show resolved Hide resolved
test/e2e/ingress/secret.go Show resolved Hide resolved
@tokers
Copy link
Contributor

tokers commented Apr 5, 2021

@gxthrj Now we only verify that data are passed to the DP but the verifications of the use of these certificates are missing.

@gxthrj
Copy link
Contributor Author

gxthrj commented Apr 5, 2021

@gxthrj Now we only verify that data are passed to the DP but the verifications of the use of these certificates are missing.

Yes, you are right, I will add it.

@tokers tokers added this to the 0.5.0 milestone Apr 9, 2021
@gxthrj gxthrj requested a review from tokers April 9, 2021 14:45
@codecov-io
Copy link

codecov-io commented Apr 10, 2021

Codecov Report

Merging #337 (16c3570) into master (c6e7180) will decrease coverage by 0.50%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #337      +/-   ##
==========================================
- Coverage   43.98%   43.47%   -0.51%     
==========================================
  Files          40       39       -1     
  Lines        3456     3457       +1     
==========================================
- Hits         1520     1503      -17     
- Misses       1767     1783      +16     
- Partials      169      171       +2     
Impacted Files Coverage Δ
pkg/ingress/controller/secret.go 0.00% <0.00%> (ø)
pkg/apisix/cluster.go 28.44% <0.00%> (-5.97%) ⬇️
pkg/apisix/route.go 44.84% <0.00%> (-1.82%) ⬇️
test/e2e/e2e.go

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c6e7180...16c3570. Read the comment docs.

@@ -175,6 +179,17 @@ func (s *Scaffold) NewAPISIXHttpsClient() *httpexpect.Expect {
// accept any certificate; for testing only!
InsecureSkipVerify: true,
},
DialContext: func(ctx context.Context, network, addr string) (net.Conn, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not set the ServerName in tls.Config?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great, use ServerName instead.

DualStack: true,
}

http.DefaultTransport.(*http.Transport).DialContext = func(ctx context.Context, network, addr string) (net.Conn, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think DialContext can also be removed if we already have the correct ServerName.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, dirty codes.

@tokers tokers merged commit 94a7b7c into apache:master Apr 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants