|
7 | 7 | * License v3.0 only", or the "Server Side Public License, v 1". |
8 | 8 | */ |
9 | 9 |
|
10 | | -import { Request, Server, ServerStateCookieOptions } from '@hapi/hapi'; |
| 10 | +import { Request, Server } from '@hapi/hapi'; |
11 | 11 | import hapiAuthCookie from '@hapi/cookie'; |
12 | 12 |
|
13 | 13 | import type { Logger } from '@kbn/logging'; |
@@ -126,22 +126,8 @@ export async function createCookieSessionStorageFactory<T extends object>( |
126 | 126 | clearInvalid: false, |
127 | 127 | isHttpOnly: true, |
128 | 128 | isSameSite: cookieOptions.sameSite ?? false, |
129 | | - contextualize: ( |
130 | | - definition: Omit<ServerStateCookieOptions, 'isSameSite'> & { isSameSite: string } |
131 | | - ) => { |
132 | | - /** |
133 | | - * This is a temporary solution to support the Partitioned attribute. |
134 | | - * Statehood performs validation for the params, but only before the contextualize function call. |
135 | | - * Since value for the isSameSite is used directly when making segment, |
136 | | - * we can leverage that to append the Partitioned attribute to the cookie. |
137 | | - * |
138 | | - * Once statehood is updated to support the Partitioned attribute, we can remove this. |
139 | | - * Issue: https://github.com/elastic/kibana/issues/188720 |
140 | | - */ |
141 | | - if (definition.isSameSite === 'None' && definition.isSecure && !disableEmbedding) { |
142 | | - definition.isSameSite = 'None;Partitioned'; |
143 | | - } |
144 | | - }, |
| 129 | + isPartitioned: |
| 130 | + cookieOptions.sameSite === 'None' && cookieOptions.isSecure && !disableEmbedding, |
145 | 131 | }, |
146 | 132 | validate: async (req: Request, session: T | T[]) => { |
147 | 133 | const result = cookieOptions.validate(session); |
|
0 commit comments