-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Resolve trusted proxy host names to all available A/AAAA records #43188
base: main
Are you sure you want to change the base?
Resolve trusted proxy host names to all available A/AAAA records #43188
Conversation
Closes quarkusio#42782 Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
a53d50f
to
ba879ae
Compare
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.
LGTM, but yes, a bit more testing would be great.
Unfortunately, testing DNS is hard. @vietj how do you do that in Vert.x?
@ahus1 Look at https://github.com/eclipse-vertx/vert.x/blob/master/vertx-core/src/test/java/io/vertx/test/fakedns/FakeDNSServer.java.
You can look at the FakeDNSServer in vertx core tests (or reuse it) to do proper testing. |
Changes LGTM. +1 for test, I remember I didn't know how to make one. |
@ahus1 do you plan to add a test like @cescoffier mentions? |
Closes quarkusio#42782 Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
I had a look at FakeDNSServer. In commit 61f8329 I copied it over as I didn't find it available in a dependency, and used it in a first test which is green. A future commit might clear the bits that are not needed. As this is more like a PoC for a DNS based test, I kept it for now. It still tests only part of the code, as it is not testing IPv6 as the caller is using IPv4 all the time. Also |
Closes #42782
During my tests, I found that CNAMEs are resolved implicitly already, so no manual extra where necessary to handle those.
I might need some help for additional tests, as I don't know how to best mock a DNS.