-
Notifications
You must be signed in to change notification settings - Fork 347
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates Translator to Build Authentication IR (#901)
Signed-off-by: danehans <daneyonhansen@gmail.com> Signed-off-by: danehans <daneyonhansen@gmail.com>
- Loading branch information
Showing
19 changed files
with
886 additions
and
284 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
57 changes: 57 additions & 0 deletions
57
internal/gatewayapi/testdata/httproute-with-non-matching-authenfilter-ref.in.yaml
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,57 @@ | ||
gateways: | ||
- apiVersion: gateway.networking.k8s.io/v1beta1 | ||
kind: Gateway | ||
metadata: | ||
namespace: envoy-gateway | ||
name: gateway-1 | ||
spec: | ||
gatewayClassName: envoy-gateway-class | ||
listeners: | ||
- name: http | ||
protocol: HTTP | ||
port: 80 | ||
hostname: "*.envoyproxy.io" | ||
allowedRoutes: | ||
namespaces: | ||
from: All | ||
httpRoutes: | ||
- apiVersion: gateway.networking.k8s.io/v1beta1 | ||
kind: HTTPRoute | ||
metadata: | ||
namespace: default | ||
name: httproute-1 | ||
spec: | ||
hostnames: | ||
- gateway.envoyproxy.io | ||
parentRefs: | ||
- namespace: envoy-gateway | ||
name: gateway-1 | ||
sectionName: http | ||
rules: | ||
- matches: | ||
- path: | ||
value: "/" | ||
backendRefs: | ||
- name: service-1 | ||
port: 8080 | ||
filters: | ||
- type: ExtensionRef | ||
extensionRef: | ||
group: gateway.envoyproxy.io | ||
kind: AuthenticationFilter | ||
name: not-exist | ||
authenticationFilters: | ||
- apiVersion: gateway.envoyproxy.io/v1alpha1 | ||
kind: AuthenticationFilter | ||
metadata: | ||
name: example1 | ||
namespace: default | ||
spec: | ||
type: JWT | ||
jwtProviders: | ||
- name: example1 | ||
issuer: https://www.example1.com | ||
audiences: | ||
- foo.com | ||
remoteJwks: | ||
uri: https://foo.com/jwt/public-key/jwks.json |
102 changes: 102 additions & 0 deletions
102
internal/gatewayapi/testdata/httproute-with-non-matching-authenfilter-ref.out.yaml
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,102 @@ | ||
gateways: | ||
- apiVersion: gateway.networking.k8s.io/v1beta1 | ||
kind: Gateway | ||
metadata: | ||
namespace: envoy-gateway | ||
name: gateway-1 | ||
spec: | ||
gatewayClassName: envoy-gateway-class | ||
listeners: | ||
- name: http | ||
protocol: HTTP | ||
port: 80 | ||
hostname: "*.envoyproxy.io" | ||
allowedRoutes: | ||
namespaces: | ||
from: All | ||
status: | ||
listeners: | ||
- name: http | ||
supportedKinds: | ||
- group: gateway.networking.k8s.io | ||
kind: HTTPRoute | ||
attachedRoutes: 1 | ||
conditions: | ||
- type: Programmed | ||
status: "True" | ||
reason: Programmed | ||
message: Listener is ready | ||
httpRoutes: | ||
- apiVersion: gateway.networking.k8s.io/v1beta1 | ||
kind: HTTPRoute | ||
metadata: | ||
namespace: default | ||
name: httproute-1 | ||
spec: | ||
hostnames: | ||
- gateway.envoyproxy.io | ||
parentRefs: | ||
- namespace: envoy-gateway | ||
name: gateway-1 | ||
sectionName: http | ||
rules: | ||
- matches: | ||
- path: | ||
value: "/" | ||
backendRefs: | ||
- name: service-1 | ||
port: 8080 | ||
filters: | ||
- type: ExtensionRef | ||
extensionRef: | ||
group: gateway.envoyproxy.io | ||
kind: AuthenticationFilter | ||
name: not-exist | ||
status: | ||
parents: | ||
- parentRef: | ||
namespace: envoy-gateway | ||
name: gateway-1 | ||
sectionName: http | ||
controllerName: gateway.envoyproxy.io/gatewayclass-controller | ||
conditions: | ||
- type: ResolvedRefs | ||
status: "False" | ||
reason: BackendNotFound | ||
message: "Reference default/not-exist not found for filter type: ExtensionRef" | ||
xdsIR: | ||
envoy-gateway-gateway-1: | ||
http: | ||
- name: envoy-gateway-gateway-1-http | ||
address: 0.0.0.0 | ||
port: 10080 | ||
hostnames: | ||
- "*.envoyproxy.io" | ||
routes: | ||
- name: default-httproute-1-rule-0-match-0-gateway.envoyproxy.io | ||
pathMatch: | ||
prefix: "/" | ||
headerMatches: | ||
- name: ":authority" | ||
exact: gateway.envoyproxy.io | ||
# I believe the correct way to handle an invalid filter should be to allow the HTTPRoute to function | ||
# normally but leave out the filter config and set the status, but this behaviour can be changed. | ||
directResponse: | ||
body: "Reference default/not-exist not found for filter type: ExtensionRef" | ||
statusCode: 500 | ||
infraIR: | ||
envoy-gateway-gateway-1: | ||
proxy: | ||
metadata: | ||
labels: | ||
gateway.envoyproxy.io/owning-gateway-namespace: envoy-gateway | ||
gateway.envoyproxy.io/owning-gateway-name: gateway-1 | ||
name: envoy-gateway-gateway-1 | ||
image: envoyproxy/envoy:translator-tests | ||
listeners: | ||
- address: "" | ||
ports: | ||
- name: http | ||
protocol: "HTTP" | ||
containerPort: 10080 | ||
servicePort: 80 |
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
Oops, something went wrong.