Skip to content

Commit

Permalink
move common.StringMatcher to policy.proto (#614)
Browse files Browse the repository at this point in the history
  • Loading branch information
yangminzhu authored and geeknoid committed Aug 16, 2018
1 parent 168b2a7 commit e0ffa87
Show file tree
Hide file tree
Showing 9 changed files with 680 additions and 957 deletions.
31 changes: 1 addition & 30 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,7 @@ generate: \
generate-authn-go \
generate-authn-python \
generate-envoy-go \
generate-envoy-python \
generate-common-go \
generate-common-python
generate-envoy-python

#####################
# mcp/...
Expand Down Expand Up @@ -331,32 +329,6 @@ $(envoy_pb_pythons): $(envoy_protos)
clean-envoy:
rm -f $(envoy_pb_gos)

#####################
# common/...
#####################

common_v1alpha1_path := common/v1alpha1
common_v1alpha1_protos := $(shell find $(common_v1alpha1_path) -type f -name '*.proto' | sort)
common_v1alpha1_pb_gos := $(common_v1alpha1_protos:.proto=.pb.go)
common_v1alpha1_pb_pythons := $(common_v1alpha1_protos:.proto=_pb2.py)
common_v1alpha1_pb_doc := $(common_v1alpha1_path)/istio.common.v1alpha1.pb.html

generate-common-go: $(common_v1alpha1_pb_gos) $(common_v1alpha1_pb_doc)

$(common_v1alpha1_pb_gos) $(common_v1alpha1_pb_doc): $(common_v1alpha1_protos)
## Generate common/v1alpha1/*.pb.go
$(docker_gen) $(gogofast_plugin) $(protoc_gen_docs_plugin)$(common_v1alpha1_path) $^

generate-common-python: $(common_v1alpha1_pb_pythons)

$(common_v1alpha1_pb_pythons): $(common_v1alpha1_protos)
## Generate python/istio_api/common/v1alpha1/*_pb2.py
@$(docker_gen) $(protoc_gen_python_plugin) $^

clean-common:
rm -f $(common_v1alpha1_pb_gos)
rm -f $(common_v1alpha1_pb_doc)

#####################
# Cleanup
#####################
Expand All @@ -371,5 +343,4 @@ clean: clean-mcp \
clean-rbac \
clean-authn \
clean-envoy \
clean-common \
clean-python
55 changes: 52 additions & 3 deletions authentication/v1alpha1/istio.authentication.v1alpha1.pb.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
location: https://istio.io/docs/reference/config/istio.authentication.v1alpha1.html
layout: protoc-gen-docs
generator: protoc-gen-docs
number_of_entries: 10
number_of_entries: 11
---
<p>This package defines user-facing authentication policy.</p>

Expand Down Expand Up @@ -176,7 +176,7 @@ <h2 id="Jwt-TriggerRule">Jwt.TriggerRule</h2>
<tbody>
<tr id="Jwt-TriggerRule-excluded_paths">
<td><code>excludedPaths</code></td>
<td><code><a href="https://istio.io/docs/reference/config/istio.string.v1alpha1.html#StringMatch">istio.common.v1alpha1.StringMatch[]</a></code></td>
<td><code><a href="#StringMatch">StringMatch[]</a></code></td>
<td>
<p>List of paths to be excluded from the request. The rule is satisfied if
request path does not match to any of the path in this list.</p>
Expand All @@ -185,7 +185,7 @@ <h2 id="Jwt-TriggerRule">Jwt.TriggerRule</h2>
</tr>
<tr id="Jwt-TriggerRule-included_paths">
<td><code>includedPaths</code></td>
<td><code><a href="https://istio.io/docs/reference/config/istio.string.v1alpha1.html#StringMatch">istio.common.v1alpha1.StringMatch[]</a></code></td>
<td><code><a href="#StringMatch">StringMatch[]</a></code></td>
<td>
<p>List of paths that the request must include. If the list is not empty, the
rule is satisfied if request path matches at least one of the path in the list.
Expand Down Expand Up @@ -507,6 +507,55 @@ <h2 id="PrincipalBinding">PrincipalBinding</h2>
<td>
<p>Principal will be set to the identity from origin authentication.</p>

</td>
</tr>
</tbody>
</table>
</section>
<h2 id="StringMatch">StringMatch</h2>
<section>
<p>Describes how to match a given string. Match is case-sensitive.</p>

<table class="message-fields">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr id="StringMatch-exact" class="oneof oneof-start">
<td><code>exact</code></td>
<td><code>string (oneof)</code></td>
<td>
<p>exact string match.</p>

</td>
</tr>
<tr id="StringMatch-prefix" class="oneof">
<td><code>prefix</code></td>
<td><code>string (oneof)</code></td>
<td>
<p>prefix-based match.</p>

</td>
</tr>
<tr id="StringMatch-suffix" class="oneof">
<td><code>suffix</code></td>
<td><code>string (oneof)</code></td>
<td>
<p>suffix-based match.</p>

</td>
</tr>
<tr id="StringMatch-regex" class="oneof">
<td><code>regex</code></td>
<td><code>string (oneof)</code></td>
<td>
<p>ECMAscript style regex-based match as defined by <a href="http://en.cppreference.com/w/cpp/regex/ecmascript">EDCA-262</a>.
Example: &ldquo;^/pets/(.*?)?&rdquo;</p>

</td>
</tr>
</tbody>
Expand Down
Loading

0 comments on commit e0ffa87

Please sign in to comment.