fix: fix and optimize tls in upstream_schema#10269
Merged
Merged
Conversation
Revolyssup
self-requested a review
September 27, 2023 08:27
| dependencies = { | ||
| client_cert = { | ||
| required = {"client_key"}, | ||
| ["not"] = {required = {"client_cert_id"}} |
Contributor
There was a problem hiding this comment.
Why do you remove the not condition?
Contributor
There was a problem hiding this comment.
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
Contributor
Author
There was a problem hiding this comment.
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.
Contributor
There was a problem hiding this comment.
Could you add some test cases to cover these conditions?
Revolyssup
previously approved these changes
Sep 27, 2023
Contributor
|
hi @wzy0618 , are you still working on this? |
Contributor
Author
yeah, I just finished my holiday and I will submit it this week. |
juststillthinking
approved these changes
Oct 12, 2023
AlinsRan
approved these changes
Oct 12, 2023
Revolyssup
pushed a commit
to Revolyssup/apisix
that referenced
this pull request
Oct 15, 2023
shreemaan-abhishek
pushed a commit
to shreemaan-abhishek/apisix
that referenced
this pull request
Jan 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Removed two redundant configurations.
Fixed the wrong variables mentioned in the issue.
Fixes #10260
Checklist