Debian Codegraph @

xds/type/matcher/v3/domain.proto

raw
1 syntax = "proto3";
2
3 package xds.type.matcher.v3;
4
5 import "xds/annotations/v3/status.proto";
6 import "xds/type/matcher/v3/matcher.proto";
7
8 import "validate/validate.proto";
9
10 option java_package = "com.github.xds.type.matcher.v3";
11 option java_outer_classname = "ServerNameMatcherProto";
12 option java_multiple_files = true;
13 option go_package = "github.com/cncf/xds/go/xds/type/matcher/v3";
14
15 option (xds.annotations.v3.file_status).work_in_progress = true;
16
17 // [#protodoc-title: Server name matcher]
18
19 // Matches a fully qualified server name against a set of domain
20 // names with optional wildcards.
21 message ServerNameMatcher {
22 // Specifies a set of exact and wildcard domains and a match action. The
23 // wildcard symbol ``*`` must appear at most once as the left-most part of
24 // the domain on a dot border. The wildcard matches one or more non-empty
25 // domain parts.
26 message DomainMatcher {
27 // A non-empty set of domain names with optional wildcards, e.g.
28 // ``www.example.com``, ``*.com``, or ``*``.
29 repeated string domains = 1 [ (validate.rules).repeated = {min_items : 1} ];
30
31 // Match action to apply when the server name matches any of the domain
32 // names in the matcher.
33 Matcher.OnMatch on_match = 2;
34 }
35
36 // Match a server name by multiple domain matchers. Each domain, exact or
37 // wildcard, must appear at most once across all the domain matchers.
38 //
39 // The server name will be matched against all wildcard domains starting from
40 // the longest suffix, i.e. ``www.example.com`` input will be first matched
41 // against ``www.example.com``, then ``*.example.com``, then ``*.com``, then
42 // ``*``, until the associated matcher action accepts the input. Note that
43 // wildcards must be on a dot border, and values like ``*w.example.com`` are
44 // invalid.
45 repeated DomainMatcher domain_matchers = 1;
46 }