Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
Signed-off-by: Huabing Zhao <[email protected]>
  • Loading branch information
zhaohuabing committed Jan 3, 2025
1 parent 4bce7b9 commit 3ffc34b
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 9 deletions.
2 changes: 1 addition & 1 deletion examples/http-ext-auth/http-ext-auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ console.log(`starting HTTP server on: ${port}`);

function checkToken(token) {
return tokens[token];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,15 @@ backends:
- fqdn:
hostname: 'primary.foo.com'
port: 3000
- apiVersion: gateway.envoyproxy.io/v1alpha1
kind: Backend
metadata:
name: backend-uds
namespace: default
spec:
endpoints:
- unix:
path: '/var/run/uds.sock'
referenceGrants:
- apiVersion: gateway.networking.k8s.io/v1alpha2
kind: ReferenceGrant
Expand Down Expand Up @@ -179,7 +188,6 @@ securityPolicies:
extAuth:
http:
backendRef:
name: backend-fqdn
name: backend-uds
kind: Backend
group: gateway.envoyproxy.io
port: 3000
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,23 @@ backends:
reason: Accepted
status: "True"
type: Accepted
- apiVersion: gateway.envoyproxy.io/v1alpha1
kind: Backend
metadata:
creationTimestamp: null
name: backend-uds
namespace: default
spec:
endpoints:
- unix:
path: /var/run/uds.sock
status:
conditions:
- lastTransitionTime: null
message: The Backend was accepted
reason: Accepted
status: "True"
type: Accepted
gateways:
- apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
Expand Down Expand Up @@ -322,8 +339,7 @@ securityPolicies:
backendRef:
group: gateway.envoyproxy.io
kind: Backend
name: backend-fqdn
port: 3000
name: backend-uds
targetRef:
group: gateway.networking.k8s.io
kind: HTTPRoute
Expand Down Expand Up @@ -526,14 +542,15 @@ xdsIR:
security:
extAuth:
http:
authority: primary.foo.com:3000
authority: backend-uds.default
destination:
name: securitypolicy/default/policy-for-http-route-3-http-backendref/extauth/0
settings:
- addressType: FQDN
- addressType: IP
endpoints:
- host: primary.foo.com
port: 3000
- host: ""
path: /var/run/uds.sock
port: 0
protocol: HTTP
weight: 1
path: ""
Expand Down

0 comments on commit 3ffc34b

Please sign in to comment.