Skip to content

Commit 8ba0f9e

Browse files
committed
add limitations about the secure and httpOnly directives
1 parent c73d13b commit 8ba0f9e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/proposals/session-persistence.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ Users can configure [sessionPersistence](https://gateway-api.sigs.k8s.io/referen
142142
| no matching spec field | `secure` | Enabled by default for all routes. |
143143
| no matching spec field | `httpOnly` | Enabled by default for all routes. |
144144

145-
Note: The default `secure` and `httpOnly` settings may change in the future if we need to align with the Gateway API specification.
145+
Note: The default `secure` and `httpOnly` settings may change in the future if we need to align with the Gateway API specification. Enabling `secure` limits session persistence to HTTPS connections to the Gateway, which can be a limitation for HTTP-only clients, and `httpOnly` prevents JavaScript from accessing the cookie. These limitations will be described in more detail in the Session Persistence user documentation.
146146

147147
#### Domain and Path selection for Routes
148148

@@ -177,11 +177,11 @@ There are no existing conformance tests for session persistence, so we will add
177177

178178
The main security concern is how far session cookies reach. This design keeps cookies host-only by never setting the domain attribute, and for HTTPRoutes it scopes cookies by route path (or `/` when no safe common prefix exists). That limits both cross-host and cross-path leakage and reduces the impact of a compromised cookie.
179179

180-
We also set `secure` and `httponly` on the session cookie by default as a hardening measure. If Gateway API later adds these as fields with different defaults, we’ll treat any change in behavior as an experimental-API breaking change. This will be documented in the Session Persistence guide, and upgrade guidance will be provided so users can explicitly configure these cookie attributes.
180+
We also set `secure` and `httponly` on the session cookie by default as a hardening measure. If Gateway API later adds these as fields with different defaults, we’ll treat any change in behavior as an experimental-API breaking change. TThis will be documented in the Session Persistence guide, along with the limitations of these directives, and upgrade guidance will be provided so users can explicitly configure these cookie attributes.
181181

182182
### Edge Cases
183183

184-
- If both Kubernetes Service-level session affinity and Gateway API sessionPersistence are configured for the same traffic, the route MUST be rejected, with a status condition explaining that the two mechanisms are incompatible.
184+
- If an implementation routes through Service IPs, any Gateway-level session persistence must be rejected when Service-level session affinity is enabled. In our case, the data plane routes directly to pod IPs, so Service affinity does not interfere with session persistence between the gateway and backends.
185185
- For traffic-splitting configurations, if cookie-based session persistence is enabled, sessions must remain pinned consistently across the split backends.
186186

187187
### Future work

0 commit comments

Comments
 (0)