-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Fix DNS not supporting wildcard matching #13158
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
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
localstack-bot
left a comment
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.
Welcome to LocalStack! Thanks for raising your first Pull Request and landing in your contributions. Our team will reach out with any reviews or feedbacks that we have shortly. We recommend joining our Slack Community and share your PR on the #community channel to share your contributions with us. Please make sure you are following our contributing guidelines and our Code of Conduct.
Test Results (amd64) - Integration, Bootstrap 5 files 5 suites 2h 41m 45s ⏱️ Results for commit 17122ad. |
|
I have read the CLA Document and I hereby sign the CLA |
dfangl
left a comment
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.
Looks good! Nice and clean implementation and an added test!
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.
Daniel has already approved, and the implementation looks good, thanks!
TIL that the matchWildcard method exists, which gives me more confidence that the implementation is correct 👍
Motivation
The LocalStack DNS service doesn't support wildcards in aliases. In such cases, the DNS will not resolve the query to the record it points to.
For example, given the following DNS configuration:
See the following pseudo-output:
After the fix, the output is as follows:
Changes
It refactors the alias resolution from raw string comparison in favor of a pattern matching comparison by reusing the
DNSLabel.matchWildcardmethod.