-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kusk Gateway Support for JWT #402
Comments
We should investigate for either JWT or API Keys. Let's have a discussion about it soon. |
API Keys are already handled by header auth JWT is something esle. @mbana do you agree? |
We should really rename "Header auth" to "Custom Auth Upstream" or something of that sorts, because that really reflects what it is. But in any case, it is possible to achieve now API Keys through custom upstream... In fact even JWT would be possible to achieve with the same method... I was thinking we should have a dedicated auth policy for both JWT and API Keys. Question is which one is first. |
Refreshing this issue and putting it in our scope. Essentially we'd have to do something similar to this:
We should adhere how it is done in envoy see below The easy thing is that JWT implementation is very granular and is handled by "prefix" filter. |
Thinking of this we should maybe do something like
|
Worthy of mention: https://docs.mia-platform.eu/docs/development_suite/api-console/advanced-section/api-gateway-envoy/jwt-authn. What do you think? |
Let's take inspiration from anywhere. This is an important feature needed to enable another user. |
See: <#402>. Change `kubeshop/kusk-gateway` to `v1.3.21`: ``` $ pwd kusk-gateway/cmd/kusk $ VERSION=v1.3.21 make build ``` Signed-off-by: Mohamed Bana <mohamed@bana.io>
See: <#402>. Change `kubeshop/kusk-gateway` to `v1.3.21`: ``` $ pwd kusk-gateway/cmd/kusk $ VERSION=v1.3.21 make build ``` Signed-off-by: Mohamed Bana <mohamed@bana.io>
openapi: 3.1.0
info:
title: My API
version: 1.0.0
x-kusk:
auth:
jwt:
issuer: https://my-issuer.com # required
jwks: https://my-issuer.com/.well-known/jwks.json
# either/or
jwks_config_ref:
name: my-secret
namespace: jwks
audience: my-audience #optional
paths:
/:
x-kusk:
auth:
jwt:
issuer: https://my-issuer.com
jwks: https://my-issuer.com/.well-known/jwks.json
get:
x-kusk:
auth:
jwt:
issuer: https://my-issuer.com
jwks: https://my-issuer.com/.well-known/jwks.json
operationId: get-root
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: Hello World! |
Issue and Discussion ==================== See: #402. Resolves #402. Summary ======= 1. Parse JWT options. 2. Add JWT examples. 3. Split `auth` into `auth_custom.go`, `auth_oauth2.go` and `auth_jwt.go`. 4. Add `check-auth_jwt` smoke test. 5. Run `make generate && make manifests`. 6. Added stub JWT documentation. 7. Optimize `Makefile` by only calling `go install` in the `install-deps` target if the binaries do not already exist. Changes ======= `examples/auth/jwt/oauth0/**` ----------------------------- Add JWT example. `config/default/kustomization.yaml`, `config/manager/configmap.yaml` and `cmd/kusk/cmd/manifest_data.go` -------------------------------------------------------------------------------------------------------- Change `kubeshop/kusk-gateway` to `v1.3.24`, and run `(cd cmd/kusk && VERSION=v1.3.24 make build)`. References ========== * https://github.com/projectcontour/contour/blob/main/internal/envoy/v3/listener.go#L746 * https://github.com/projectcontour/contour/blob/main/internal/dag/dag.go#L673 * https://docs.mia-platform.eu/docs/development_suite/api-console/advanced-section/api-gateway-envoy/jwt-authn * https://istio.io/latest/docs/tasks/security/authorization/authz-jwt/ --- Signed-off-by: Mohamed Bana <mohamed@bana.io>
See: <#402>. Change `kubeshop/kusk-gateway` to `v1.3.21`: ``` $ pwd kusk-gateway/cmd/kusk $ VERSION=v1.3.21 make build ``` Signed-off-by: Mohamed Bana <mohamed@bana.io>
Issue and Discussion ==================== See: #402. Resolves #402. Summary ======= 1. Parse JWT options. 2. Add JWT examples. 3. Split `auth` into `auth_custom.go`, `auth_oauth2.go` and `auth_jwt.go`. 4. Add `check-auth_jwt` smoke test. 5. Run `make generate && make manifests`. 6. Added stub JWT documentation. 7. Optimize `Makefile` by only calling `go install` in the `install-deps` target if the binaries do not already exist. Changes ======= `examples/auth/jwt/oauth0/**` ----------------------------- Add JWT example. `config/default/kustomization.yaml`, `config/manager/configmap.yaml` and `cmd/kusk/cmd/manifest_data.go` -------------------------------------------------------------------------------------------------------- Change `kubeshop/kusk-gateway` to `v1.3.24`, and run `(cd cmd/kusk && VERSION=v1.3.24 make build)`. References ========== * https://github.com/projectcontour/contour/blob/main/internal/envoy/v3/listener.go#L746 * https://github.com/projectcontour/contour/blob/main/internal/dag/dag.go#L673 * https://docs.mia-platform.eu/docs/development_suite/api-console/advanced-section/api-gateway-envoy/jwt-authn * https://istio.io/latest/docs/tasks/security/authorization/authz-jwt/ --- Signed-off-by: Mohamed Bana <mohamed@bana.io>
Issue and Discussion ==================== See: #402. Resolves #402. Summary ======= 1. Parse JWT options. 2. Add JWT examples. 3. Split `auth` into `auth_custom.go`, `auth_oauth2.go` and `auth_jwt.go`. 4. Add `check-auth_jwt` smoke test. 5. Run `make generate && make manifests`. 6. Added stub JWT documentation. 7. Optimize `Makefile` by only calling `go install` in the `install-deps` target if the binaries do not already exist. Changes ======= `examples/auth/jwt/oauth0/**` ----------------------------- Add JWT example. `config/default/kustomization.yaml`, `config/manager/configmap.yaml` and `cmd/kusk/cmd/manifest_data.go` -------------------------------------------------------------------------------------------------------- Change `kubeshop/kusk-gateway` to `v1.3.24`, and run `(cd cmd/kusk && VERSION=v1.3.24 make build)`. References ========== * https://github.com/projectcontour/contour/blob/main/internal/envoy/v3/listener.go#L746 * https://github.com/projectcontour/contour/blob/main/internal/dag/dag.go#L673 * https://docs.mia-platform.eu/docs/development_suite/api-console/advanced-section/api-gateway-envoy/jwt-authn * https://istio.io/latest/docs/tasks/security/authorization/authz-jwt/ --- Signed-off-by: Mohamed Bana <mohamed@bana.io>
Issue and Discussion ==================== See: #402. Resolves #402. Summary ======= 1. Parse JWT options. 2. Add JWT examples. 3. Split `auth` into `auth_custom.go`, `auth_oauth2.go` and `auth_jwt.go`. 4. Add `check-auth_jwt` smoke test. 5. Run `make generate && make manifests`. 6. Added stub JWT documentation. 7. Optimize `Makefile` by only calling `go install` in the `install-deps` target if the binaries do not already exist. Changes ======= `examples/auth/jwt/oauth0/**` ----------------------------- Add JWT example. `config/default/kustomization.yaml`, `config/manager/configmap.yaml` and `cmd/kusk/cmd/manifest_data.go` -------------------------------------------------------------------------------------------------------- Change `kubeshop/kusk-gateway` to `v1.3.24`, and run `(cd cmd/kusk && VERSION=v1.3.24 make build)`. References ========== * https://github.com/projectcontour/contour/blob/main/internal/envoy/v3/listener.go#L746 * https://github.com/projectcontour/contour/blob/main/internal/dag/dag.go#L673 * https://docs.mia-platform.eu/docs/development_suite/api-console/advanced-section/api-gateway-envoy/jwt-authn * https://istio.io/latest/docs/tasks/security/authorization/authz-jwt/ --- Signed-off-by: Mohamed Bana <mohamed@bana.io>
Issue and Discussion ==================== See: #402. Resolves #402. Summary ======= 1. Parse JWT options. 2. Add JWT examples. 3. Split `auth` into `auth_custom.go`, `auth_oauth2.go` and `auth_jwt.go`. 4. Add `check-auth_jwt` smoke test. 5. Run `make generate && make manifests`. 6. Added stub JWT documentation. 7. Optimize `Makefile` by only calling `go install` in the `install-deps` target if the binaries do not already exist. Changes ======= `examples/auth/jwt/oauth0/**` ----------------------------- Add JWT example. `config/default/kustomization.yaml`, `config/manager/configmap.yaml` and `cmd/kusk/cmd/manifest_data.go` -------------------------------------------------------------------------------------------------------- Change `kubeshop/kusk-gateway` to `v1.3.24`, and run `(cd cmd/kusk && VERSION=v1.3.24 make build)`. References ========== * https://github.com/projectcontour/contour/blob/main/internal/envoy/v3/listener.go#L746 * https://github.com/projectcontour/contour/blob/main/internal/dag/dag.go#L673 * https://docs.mia-platform.eu/docs/development_suite/api-console/advanced-section/api-gateway-envoy/jwt-authn * https://istio.io/latest/docs/tasks/security/authorization/authz-jwt/ --- Signed-off-by: Mohamed Bana <mohamed@bana.io>
Issue and Discussion ==================== See: #402. Resolves #402. Summary ======= 1. Parse JWT options. 2. Add JWT examples. 3. Split `auth` into `auth_custom.go`, `auth_oauth2.go` and `auth_jwt.go`. 4. Add `check-auth_jwt` smoke test. 5. Run `make generate && make manifests`. 6. Added stub JWT documentation. 7. Optimize `Makefile` by only calling `go install` in the `install-deps` target if the binaries do not already exist. Changes ======= `examples/auth/jwt/oauth0/**` ----------------------------- Add JWT example. `config/default/kustomization.yaml`, `config/manager/configmap.yaml` and `cmd/kusk/cmd/manifest_data.go` -------------------------------------------------------------------------------------------------------- Change `kubeshop/kusk-gateway` to `v1.3.24`, and run `(cd cmd/kusk && VERSION=v1.3.24 make build)`. References ========== * https://github.com/projectcontour/contour/blob/main/internal/envoy/v3/listener.go#L746 * https://github.com/projectcontour/contour/blob/main/internal/dag/dag.go#L673 * https://docs.mia-platform.eu/docs/development_suite/api-console/advanced-section/api-gateway-envoy/jwt-authn * https://istio.io/latest/docs/tasks/security/authorization/authz-jwt/ --- Signed-off-by: Mohamed Bana <mohamed@bana.io>
Issue and Discussion ==================== See: #402. Resolves #402. Summary ======= 1. Parse JWT options. 2. Add JWT examples. 3. Split `auth` into `auth_custom.go`, `auth_oauth2.go` and `auth_jwt.go`. 4. Add `check-auth_jwt` smoke test. 5. Run `make generate && make manifests`. 6. Added stub JWT documentation. 7. Optimize `Makefile` by only calling `go install` in the `install-deps` target if the binaries do not already exist. Changes ======= `examples/auth/jwt/oauth0/**` ----------------------------- Add JWT example. `config/default/kustomization.yaml`, `config/manager/configmap.yaml` and `cmd/kusk/cmd/manifest_data.go` -------------------------------------------------------------------------------------------------------- Change `kubeshop/kusk-gateway` to `v1.3.24`, and run `(cd cmd/kusk && VERSION=v1.3.24 make build)`. References ========== * https://github.com/projectcontour/contour/blob/main/internal/envoy/v3/listener.go#L746 * https://github.com/projectcontour/contour/blob/main/internal/dag/dag.go#L673 * https://docs.mia-platform.eu/docs/development_suite/api-console/advanced-section/api-gateway-envoy/jwt-authn * https://istio.io/latest/docs/tasks/security/authorization/authz-jwt/ --- Signed-off-by: Mohamed Bana <mohamed@bana.io>
Issue and Discussion ==================== See: #402. Resolves #402. Summary ======= 1. Parse JWT options. 2. Add JWT examples. 3. Split `auth` into `auth_custom.go`, `auth_oauth2.go` and `auth_jwt.go`. 4. Add `check-auth_jwt` smoke test. 5. Run `make generate && make manifests`. 6. Added stub JWT documentation. 7. Optimize `Makefile` by only calling `go install` in the `install-deps` target if the binaries do not already exist. Changes ======= `examples/auth/jwt/oauth0/**` ----------------------------- Add JWT example. `config/default/kustomization.yaml`, `config/manager/configmap.yaml` and `cmd/kusk/cmd/manifest_data.go` -------------------------------------------------------------------------------------------------------- Change `kubeshop/kusk-gateway` to `v1.3.24`, and run `(cd cmd/kusk && VERSION=v1.3.24 make build)`. References ========== * https://github.com/projectcontour/contour/blob/main/internal/envoy/v3/listener.go#L746 * https://github.com/projectcontour/contour/blob/main/internal/dag/dag.go#L673 * https://docs.mia-platform.eu/docs/development_suite/api-console/advanced-section/api-gateway-envoy/jwt-authn * https://istio.io/latest/docs/tasks/security/authorization/authz-jwt/ --- Signed-off-by: Mohamed Bana <mohamed@bana.io>
Issue and Discussion ==================== See: #402. Resolves #402. Summary ======= 1. Parse JWT options. 2. Add JWT examples. 3. Split `auth` into `auth_custom.go`, `auth_oauth2.go` and `auth_jwt.go`. 4. Add `check-auth_jwt` smoke test. 5. Run `make generate && make manifests`. 6. Added stub JWT documentation. 7. Optimize `Makefile` by only calling `go install` in the `install-deps` target if the binaries do not already exist. Changes ======= `examples/auth/jwt/oauth0/**` ----------------------------- Add JWT example. `config/default/kustomization.yaml`, `config/manager/configmap.yaml` and `cmd/kusk/cmd/manifest_data.go` -------------------------------------------------------------------------------------------------------- Change `kubeshop/kusk-gateway` to `v1.3.24`, and run `(cd cmd/kusk && VERSION=v1.3.24 make build)`. References ========== * https://github.com/projectcontour/contour/blob/main/internal/envoy/v3/listener.go#L746 * https://github.com/projectcontour/contour/blob/main/internal/dag/dag.go#L673 * https://docs.mia-platform.eu/docs/development_suite/api-console/advanced-section/api-gateway-envoy/jwt-authn * https://istio.io/latest/docs/tasks/security/authorization/authz-jwt/ --- Signed-off-by: Mohamed Bana <mohamed@bana.io>
Issue and Discussion ==================== See: #402. Resolves #402. Summary ======= 1. Parse JWT options. 2. Add JWT examples. 3. Split `auth` into `auth_custom.go`, `auth_oauth2.go` and `auth_jwt.go`. 4. Add `check-auth_jwt` smoke test. 5. Run `make generate && make manifests`. 6. Added stub JWT documentation. 7. Optimize `Makefile` by only calling `go install` in the `install-deps` target if the binaries do not already exist. Changes ======= `examples/auth/jwt/oauth0/**` ----------------------------- Add JWT example. `api/v1alpha1/staticroute_webhook.go` ------------------------------------- Only allow `auth.oauth2` to be specified. `config/default/kustomization.yaml`, `config/manager/configmap.yaml` and `cmd/kusk/cmd/manifest_data.go` -------------------------------------------------------------------------------------------------------- Change `kubeshop/kusk-gateway` to `v1.3.24`, and run `(cd cmd/kusk && VERSION=v1.3.24 make build)`. References ========== * https://github.com/projectcontour/contour/blob/main/internal/envoy/v3/listener.go#L746 * https://github.com/projectcontour/contour/blob/main/internal/dag/dag.go#L673 * https://docs.mia-platform.eu/docs/development_suite/api-console/advanced-section/api-gateway-envoy/jwt-authn * https://istio.io/latest/docs/tasks/security/authorization/authz-jwt/ --- Signed-off-by: Mohamed Bana <mohamed@bana.io>
Issue and Discussion ==================== See: #402. Resolves #402. Summary ======= 1. Parse JWT options. 2. Add JWT examples. 3. Split `auth` into `auth_custom.go`, `auth_oauth2.go` and `auth_jwt.go`. 4. Add `check-auth_jwt` smoke test. 5. Run `make generate && make manifests`. 6. Added stub JWT documentation. 7. Optimize `Makefile` by only calling `go install` in the `install-deps` target if the binaries do not already exist. Changes ======= `examples/auth/jwt/oauth0/**` ----------------------------- Add JWT example. `api/v1alpha1/staticroute_webhook.go` ------------------------------------- Only allow `auth.oauth2` to be specified. `config/default/kustomization.yaml`, `config/manager/configmap.yaml` and `cmd/kusk/cmd/manifest_data.go` -------------------------------------------------------------------------------------------------------- Change `kubeshop/kusk-gateway` to `v1.3.24`, and run `(cd cmd/kusk && VERSION=v1.3.24 make build)`. References ========== * https://github.com/projectcontour/contour/blob/main/internal/envoy/v3/listener.go#L746 * https://github.com/projectcontour/contour/blob/main/internal/dag/dag.go#L673 * https://docs.mia-platform.eu/docs/development_suite/api-console/advanced-section/api-gateway-envoy/jwt-authn * https://istio.io/latest/docs/tasks/security/authorization/authz-jwt/ --- Signed-off-by: Mohamed Bana <mohamed@bana.io>
Issue and Discussion ==================== See: #402. Resolves #402. Summary ======= 1. Parse JWT options. 2. Add JWT examples. 3. Split `auth` into `auth_custom.go`, `auth_oauth2.go` and `auth_jwt.go`. 4. Add `check-auth_jwt` smoke test. 5. Run `make generate && make manifests`. 6. Added stub JWT documentation. 7. Optimize `Makefile` by only calling `go install` in the `install-deps` target if the binaries do not already exist. Changes ======= `examples/auth/jwt/oauth0/**` ----------------------------- Add JWT example. `api/v1alpha1/staticroute_webhook.go` ------------------------------------- Only allow `auth.oauth2` to be specified. `config/default/kustomization.yaml`, `config/manager/configmap.yaml` and `cmd/kusk/cmd/manifest_data.go` -------------------------------------------------------------------------------------------------------- Change `kubeshop/kusk-gateway` to `v1.3.24`, and run `(cd cmd/kusk && VERSION=v1.3.24 make build)`. References ========== * https://github.com/projectcontour/contour/blob/main/internal/envoy/v3/listener.go#L746 * https://github.com/projectcontour/contour/blob/main/internal/dag/dag.go#L673 * https://docs.mia-platform.eu/docs/development_suite/api-console/advanced-section/api-gateway-envoy/jwt-authn * https://istio.io/latest/docs/tasks/security/authorization/authz-jwt/ --- Signed-off-by: jasmingacic <jasmin.gacic@gmail.com> Co-authored-by: jasmingacic <jasmin.gacic@gmail.com>
No description provided.
The text was updated successfully, but these errors were encountered: