-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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: fix and optimize tls in upstream_schema #10269
Conversation
@@ -402,16 +402,10 @@ local upstream_schema = { | |||
}, | |||
}, | |||
dependencies = { | |||
client_cert = { | |||
required = {"client_key"}, | |||
["not"] = {required = {"client_cert_id"}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you remove the not condition?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@soulbird please help to check this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The not condition is not required at both places client_cert
and client_cert_id
, having the not in clien_cert_id is enough to make both fields mutually exclusive. @monkeyDluffy6017
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As @Revolyssup said, there should only be the following three cases of the three properties(client_cert_id, client_cert, client_key) here:
- None of them exist
- Only client_cert, client_key
- Only client_cert_id
The modified conditions can ensure that "client_cert" and "client_key" must exist at the same time, and three properties will not exist at the same time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add some test cases to cover these conditions?
hi @wzy0618 , are you still working on this? |
yeah, I just finished my holiday and I will submit it this week. |
Description
Removed two redundant configurations.
Fixed the wrong variables mentioned in the issue.
Fixes #10260
Checklist