You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Required claims (exact matching done via maps in NGINX; see config)
871
-
require:
872
-
iss:
873
-
- "https://issuer.example.com"
874
-
- "https://issuer2.example.com"
875
-
aud:
876
-
- "api"
877
-
- "cli"
878
-
879
-
# Where client presents the token
880
-
# By defaults to reading from Authorization header (Bearer)
881
-
tokenSource:
882
-
type: Header
883
-
# Alternative: read from a cookie named tokenName
884
-
# type: Cookie
885
-
# tokenName: access_token
886
-
# Alternative: read from a query arg named tokenName
887
-
# type: QueryArg
888
-
# tokenName: access_token
889
-
890
-
# Identity propagation to backend and header stripping
891
-
propagation:
892
-
addIdentityHeaders:
893
-
- name: X-User-Id
894
-
valueFrom: "$jwt_claim_sub"
895
-
- name: X-User-Email
896
-
valueFrom: "$jwt_claim_email"
897
-
stripAuthorization: true # Optionally remove client Authorization header before proxy_pass
898
-
```
899
-
900
758
### Caching configuration
901
759
902
760
Users may also choose to change the caching configuration set by `proxy_cache_path`.
@@ -981,7 +839,7 @@ spec:
981
839
982
840
If a user attempts to attach a JWT tpye AuthenticationFilter while using NGINX OSS, the rule referncing the filter will be `Rejected`.
983
841
984
-
This can appear as `UnresolvedRef` to inform the user that the rule has been `Rejected`.
842
+
This can use the status `RouteConditionPartiallyInvalid` defined in the Gateway API here: https://github.com/nginx/nginx-gateway-fabric/blob/main/internal/controller/state/conditions/conditions.go#L402
985
843
986
844
## Testing
987
845
@@ -1121,6 +979,174 @@ If implementations choose a strict interpretation of filter ordering, they MUST
1121
979
document that behavior.
1122
980
```
1123
981
982
+
## Stretch Goals
983
+
984
+
### Cross namespace acess
985
+
986
+
When referencing secrets for Basic Auth and JWT Auth, the initial implementation will use `LocalObjectReference`.
987
+
988
+
Future updates to this will use the `NamespacedSecretKeyReference` in conjunction with `ReferenceGrants` to support access to secrets in different namespace`
989
+
990
+
Struct for `NamespacedSecretKeyReference`:
991
+
992
+
```go
993
+
// NamespacedSecretKeyReference references a Secret and optional key, with an optional namespace.
994
+
// If namespace differs from the filter's, a ReferenceGrant in the target namespace is required.
995
+
type NamespacedSecretKeyReference struct {
996
+
// +optional
997
+
Namespace *string `json:"namespace,omitempty"`
998
+
Name string `json:"name"`
999
+
// +optional
1000
+
Key *string `json:"key,omitempty"`
1001
+
}
1002
+
```
1003
+
1004
+
### Additional Fields for JWT
1005
+
1006
+
`require`, `tokenSource` and `propagation` are some additional fields that may be incldued in future updates to the API.
1007
+
These fields allow for more customization of how the JWT auth behavtes, but aren't required for the minial delivery of JWT Auth.
1008
+
1009
+
Example of what implementation of these fields might look like:
0 commit comments