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
Copy file name to clipboardExpand all lines: docs/proposals/authentication-filter.md
+19-6Lines changed: 19 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,6 +43,21 @@ This document also focus on HTTP Basic Authentication and JWT Authentication. Ot
43
43
|**JWT (JSON Web Token)**| ❌ | ✅ |[ngx_http_auth_jwt_module](https://nginx.org/en/docs/http/ngx_http_auth_jwt_module.html)| Tokens are used for stateless authentication between client and server. |
44
44
|**OpenID Connect**| ❌ | ✅ |[ngx_http_oidc_module](https://nginx.org/en/docs/http/ngx_http_oidc_module.html)| Allows authentication through third-party providers like Google. |
45
45
46
+
### Understanding authentication terminoligy
47
+
48
+
#### Realms
49
+
50
+
[RFC 7617](https://www.rfc-editor.org/rfc/rfc7617) gives an overview of the Realm parameter, which is used by `auth_basic` and `auth_jwt` directives in NGINX.
51
+
52
+
```text
53
+
The realm value is a free-form string
54
+
that can only be compared for equality with other realms on that
55
+
server. The server will service the request only if it can validate
56
+
the user-id and password for the protection space applying to the
57
+
requested resource.
58
+
```
59
+
60
+
46
61
## API, Customer Driven Interfaces, and User Experience
47
62
48
63
This portion of the proposal will cover API design and interaction experience for use of Basic Auth and JWT.
@@ -144,7 +159,7 @@ type BasicAuth struct {
144
159
// Also configures "realm="<realm_value>" in WWW-Authenticate header in error page location.
145
160
//
146
161
// +optional
147
-
// +kubebuilder:default="Restricted"
162
+
// +kubebuilder:default=""
148
163
Realm *string`json:"realm,omitempty"`
149
164
150
165
// OnFailure customizes the 401 response for failed authentication.
@@ -173,7 +188,7 @@ type JWTAuth struct {
173
188
// Configures "realm="<realm_value>" in WWW-Authenticate header in error page location.
174
189
//
175
190
// +optional
176
-
// +kubebuilder:default="Restricted"
191
+
// +kubebuilder:default=""
177
192
Realm *string`json:"realm,omitempty"`
178
193
179
194
// Mode selects how JWT keys are provided: local file or remote JWKS.
@@ -502,7 +517,7 @@ http {
502
517
503
518
For JWT Auth, there is two options.
504
519
505
-
1. Local JWKS file stored as as a Secret or as a ConfigMap
520
+
1. Local JWKS file stored as as a Secret
506
521
2. Remote JWKS from an IdP provider like Keycloak
507
522
508
523
#### Example JWT AuthenticationFilter with Local JWKS
@@ -558,7 +573,7 @@ spec:
558
573
scheme: Bearer
559
574
```
560
575
561
-
#### Secret referenced by filter (if using secretRef)
Note: Secret data values must be base64-encoded and are decoded by the kubelet on mount, producing a valid jwks.json file. ConfigMap data values are plain text and should contain the raw JSON (not base64).
0 commit comments