forked from envoyproxy/gateway
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add e2e tests for ext auth with grpc auth service (envoyproxy#2841)
* add e2e tests for ext auth with grpc auth service Signed-off-by: huabing zhao <[email protected]> * add BackedTLSPolicy Signed-off-by: huabing zhao <[email protected]> * generate TLS socket for ext auth services Signed-off-by: huabing zhao <[email protected]> --------- Signed-off-by: huabing zhao <[email protected]>
- Loading branch information
1 parent
96b1090
commit e73c085
Showing
7 changed files
with
671 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
--- | ||
apiVersion: gateway.networking.k8s.io/v1 | ||
kind: HTTPRoute | ||
metadata: | ||
name: http-with-ext-auth | ||
namespace: gateway-conformance-infra | ||
spec: | ||
parentRefs: | ||
- name: same-namespace | ||
hostnames: ["www.example.com"] | ||
rules: | ||
- matches: | ||
- path: | ||
type: PathPrefix | ||
value: /myapp # This is the path that will be protected by ext auth | ||
backendRefs: | ||
- name: infra-backend-v1 | ||
port: 8080 | ||
--- | ||
apiVersion: gateway.networking.k8s.io/v1 | ||
kind: HTTPRoute | ||
metadata: | ||
name: http-without-ext-auth | ||
namespace: gateway-conformance-infra | ||
spec: | ||
parentRefs: | ||
- name: same-namespace | ||
hostnames: ["www.example.com"] | ||
rules: | ||
- matches: | ||
- path: | ||
type: PathPrefix | ||
value: /public # This is the path that will be public | ||
backendRefs: | ||
- name: infra-backend-v1 | ||
port: 8080 | ||
--- | ||
apiVersion: gateway.envoyproxy.io/v1alpha1 | ||
kind: SecurityPolicy | ||
metadata: | ||
name: ext-auth-test | ||
namespace: gateway-conformance-infra | ||
spec: | ||
targetRef: | ||
group: gateway.networking.k8s.io | ||
kind: HTTPRoute | ||
name: http-with-ext-auth | ||
extAuth: | ||
grpc: | ||
backendRef: | ||
name: grpc-ext-auth | ||
namespace: gateway-conformance-infra | ||
port: 9002 | ||
--- | ||
apiVersion: gateway.networking.k8s.io/v1alpha2 | ||
kind: BackendTLSPolicy | ||
metadata: | ||
name: grpc-ext-auth-btls | ||
namespace: gateway-conformance-infra | ||
spec: | ||
targetRef: | ||
group: '' | ||
kind: Service | ||
name: grpc-ext-auth | ||
sectionName: "9002" | ||
tls: | ||
caCertRefs: | ||
- name: grpc-ext-auth-ca | ||
group: '' | ||
kind: ConfigMap | ||
hostname: grpc-ext-auth |
Oops, something went wrong.