envoy icon indicating copy to clipboard operation
envoy copied to clipboard

dns_filter: add support for wildcard name in DNS filter inline table

Open StupidScience opened this issue 1 year ago • 20 comments
trafficstars

Commit Message: Add support for wildcard name in DNS filter inline table Additional Description: Risk Level: Medium Testing: I ran only unit tests relevant to dns_filter Docs Changes: - Release Notes: Added support wildcard names in :ref:inline_dns_table <envoy_v3_api_field_extensions.filters.udp.dns_filter.v3.DnsFilterConfig.ServerContextConfig.inline_dns_table>. Platform Specific Features: N/A Fixes #32941

StupidScience avatar Jun 06 '24 14:06 StupidScience

Hi @StupidScience, welcome and thank you for your contribution.

We will try to review your Pull Request as quickly as possible.

In the meantime, please take a look at the contribution guidelines if you have not done so already.

:cat:

Caused by: https://github.com/envoyproxy/envoy/pull/34588 was opened by StupidScience.

see: more, trace.

Assigning Yanjun for a first-pass review as a code-owner: /assign @yanjunxiang-google

adisuissa avatar Jun 07 '24 11:06 adisuissa

Assigning to Yan for a review (after Yanjun's pass). /assign @yanavlasov

adisuissa avatar Jun 07 '24 11:06 adisuissa

Thanks @StupidScience for working on this! Could you please fix the CI error?

yanjunxiang-google avatar Jun 07 '24 12:06 yanjunxiang-google

/retest

StupidScience avatar Jun 07 '24 13:06 StupidScience

@yanjunxiang-google sorry, original error that is exposed (on screenshot) did not give me a good idea on what's wrong (it was speling) so I thought it was some CI infra failure. image

Should be fixed now.

StupidScience avatar Jun 07 '24 13:06 StupidScience

/retest

StupidScience avatar Jun 07 '24 14:06 StupidScience

@yanjunxiang-google all checks have passed finally

StupidScience avatar Jun 07 '24 16:06 StupidScience

@yanjunxiang-google PTAL

alyssawilk avatar Jun 11 '24 12:06 alyssawilk

/retest

StupidScience avatar Jun 13 '24 14:06 StupidScience

/retest

StupidScience avatar Jun 13 '24 16:06 StupidScience

@StupidScience can you update the doc for the virtual_domain api/envoy/data/dns/v3/dns_table.proto please? It needs to clarify semantics for how how wildcards are matched.

/wait

yanavlasov avatar Jun 18 '24 19:06 yanavlasov

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to (api/envoy/|docs/root/api-docs/). envoyproxy/api-shepherds assignee is @wbpcode CC @envoyproxy/api-watchers: FYI only for changes made to (api/envoy/|docs/root/api-docs/).

:cat:

Caused by: https://github.com/envoyproxy/envoy/pull/34588 was synchronize by StupidScience.

see: more, trace.

@yanavlasov done

StupidScience avatar Jun 24 '24 11:06 StupidScience

@yanavlasov done

Thanks. The important bit is how many subdomains can be matched by the wildcard. Will *.foo.com match only bar.foo.com or also baz.bar.foo.com ? Can you clarify it in the comment, please?

yanavlasov avatar Jun 24 '24 23:06 yanavlasov

/wait-any

yanavlasov avatar Jun 24 '24 23:06 yanavlasov

@yanavlasov thanks for feedback. Added this info as well as info about matching precedence. Can you think of any other info that should be covered?

StupidScience avatar Jun 25 '24 14:06 StupidScience

LGTM from me. Will wait for LGTM from @yanjunxiang-google and then submit

@StupidScience please resolve the merge error.

/wait

yanavlasov avatar Jun 27 '24 15:06 yanavlasov

@StupidScience Could you please also add a couple of integration test cases here: https://github.com/envoyproxy/envoy/blob/f3ee7c778bce18db1862774d70cd36e019344847/test/extensions/filters/udp/dns_filter/dns_filter_integration_test.cc#L263

It will help show how the wildcard domain name works end-to-end.

yanjunxiang-google avatar Jun 27 '24 17:06 yanjunxiang-google

@yanjunxiang-google added integration test, please check if that's smth you had in mind?

StupidScience avatar Jul 01 '24 13:07 StupidScience

LGTM

yanjunxiang-google avatar Jul 07 '24 20:07 yanjunxiang-google

@yanjunxiang-google added integration test, please check if that's smth you had in mind?

Looks good. Thanks for adding this feature!

yanjunxiang-google avatar Jul 07 '24 20:07 yanjunxiang-google

LGTM. @StupidScience please resolve merge error.

/wait

yanavlasov avatar Jul 09 '24 15:07 yanavlasov

@yanavlasov done

StupidScience avatar Jul 09 '24 15:07 StupidScience