Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
Signed-off-by: huabing zhao <zhaohuabing@gmail.com>
  • Loading branch information
zhaohuabing committed Oct 27, 2023
1 parent 641ad55 commit 0b5472d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
2 changes: 0 additions & 2 deletions charts/gateway-helm/templates/_rbac.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,10 @@ apiGroups:
- gateway.envoyproxy.io
resources:
- envoyproxies
- authenticationfilters
- envoypatchpolicies
- clienttrafficpolicies
- backendtrafficpolicies
- securitypolicies
- ratelimitfilters
verbs:
- get
- list
Expand Down
28 changes: 13 additions & 15 deletions internal/provider/kubernetes/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,19 @@ import (
)

const (
classGatewayIndex = "classGatewayIndex"
gatewayTLSRouteIndex = "gatewayTLSRouteIndex"
gatewayHTTPRouteIndex = "gatewayHTTPRouteIndex"
gatewayGRPCRouteIndex = "gatewayGRPCRouteIndex"
gatewayTCPRouteIndex = "gatewayTCPRouteIndex"
gatewayUDPRouteIndex = "gatewayUDPRouteIndex"
secretGatewayIndex = "secretGatewayIndex"
targetRefGrantRouteIndex = "targetRefGrantRouteIndex"
backendHTTPRouteIndex = "backendHTTPRouteIndex"
backendGRPCRouteIndex = "backendGRPCRouteIndex"
backendTLSRouteIndex = "backendTLSRouteIndex"
backendTCPRouteIndex = "backendTCPRouteIndex"
backendUDPRouteIndex = "backendUDPRouteIndex"
rateLimitFilterHTTPRouteIndex = "rateLimitHTTPRouteIndex"
rateLimitFilterGRPCRouteIndex = "rateLimitGRPCRouteIndex"
classGatewayIndex = "classGatewayIndex"
gatewayTLSRouteIndex = "gatewayTLSRouteIndex"
gatewayHTTPRouteIndex = "gatewayHTTPRouteIndex"
gatewayGRPCRouteIndex = "gatewayGRPCRouteIndex"
gatewayTCPRouteIndex = "gatewayTCPRouteIndex"
gatewayUDPRouteIndex = "gatewayUDPRouteIndex"
secretGatewayIndex = "secretGatewayIndex"
targetRefGrantRouteIndex = "targetRefGrantRouteIndex"
backendHTTPRouteIndex = "backendHTTPRouteIndex"
backendGRPCRouteIndex = "backendGRPCRouteIndex"
backendTLSRouteIndex = "backendTLSRouteIndex"
backendTCPRouteIndex = "backendTCPRouteIndex"
backendUDPRouteIndex = "backendUDPRouteIndex"
)

type gatewayAPIReconciler struct {
Expand Down
10 changes: 7 additions & 3 deletions site/content/en/latest/user/jwt-authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ This guide provides instructions for configuring [JSON Web Token (JWT)][jwt] aut
if an incoming request has a valid JWT before routing the request to a backend service. Currently, Envoy Gateway only
supports validating a JWT from an HTTP header, e.g. `Authorization: Bearer <token>`.

Envoy Gateway introduces a new CRD called [SecurityPolicy][] that allows the user to configure JWT authentication.
This instantiated resource can be linked to a [Gateway][], [HTTPRoute][] or [GRPCRoute][] resource.
Envoy Gateway introduces a new CRD called [SecurityPolicy][SecurityPolicy] that allows the user to configure JWT authentication.
This instantiated resource can be linked to a [Gateway][Gateway], [HTTPRoute][HTTPRoute] or [GRPCRoute][GRPCRoute] resource.

## Prerequisites

Expand All @@ -17,7 +17,8 @@ Before proceeding, you should be able to query the example backend using HTTP or

## Configuration

Allow requests with a valid JWT by creating an [SecurityPolicy][] and attaching it to the example HTTPRoute or GRPCRoute.
Allow requests with a valid JWT by creating an [SecurityPolicy][SecurityPolicy] and attaching it to the example
HTTPRoute or GRPCRoute.

### HTTPRoute

Expand Down Expand Up @@ -164,3 +165,6 @@ Checkout the [Developer Guide](../../contributions/develop/) to get involved in
[SecurityPolicy]: https://gateway.envoyproxy.io/latest/design/security-policy
[jwt]: https://tools.ietf.org/html/rfc7519
[jwks]: https://tools.ietf.org/html/rfc7517
[Gateway]: https://gateway-api.sigs.k8s.io/api-types/gateway
[HTTPRoute]: https://gateway-api.sigs.k8s.io/api-types/httproute
[GRPCRoute]: https://gateway-api.sigs.k8s.io/api-types/grpcroute

0 comments on commit 0b5472d

Please sign in to comment.