kibana/x-pack/test/security_api_integration/session_cookie.config.ts
Sid 7a3bd993ce
[Sessions] Check and allow session cookies if they are all the same (#220430)
## Summary
Closes https://github.com/elastic/kibana/issues/220637
Closes https://github.com/elastic/kibana/issues/220755

Testing steps:

#### Steps to reproduce the bug, in firefox and on main:
- Download/update to latest firefox version
- Run ES and kibana locally
- Login to Kibana
- Set up the sample data (E-commerce for example)
- Force cache disabling (open dev tools -> Network tab -> Ensure Disable
cache is not checked and keep dev tools open)
- Navigate to Stack Management -> Data views (under kibana in left nav)
- Click on first data view 
- Triggers a logout

### Verify the fix
- Run the same steps above on this PR

## Release notes
Rework cookie and session storage to prevent unexpected logouts for
certain users with certain use cases.

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-05-20 23:10:00 +01:00

37 lines
1.2 KiB
TypeScript

/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import { resolve } from 'path';
import type { FtrConfigProviderContext } from '@kbn/test';
import { services } from './services';
// the default export of config files must be a config provider
// that returns an object with the projects config values
export default async function ({ readConfigFile }: FtrConfigProviderContext) {
const xPackAPITestsConfig = await readConfigFile(require.resolve('../api_integration/config.ts'));
return {
testFiles: [resolve(__dirname, './tests/session_cookie')],
services,
servers: xPackAPITestsConfig.get('servers'),
esTestCluster: {
...xPackAPITestsConfig.get('esTestCluster'),
serverArgs: [...xPackAPITestsConfig.get('esTestCluster.serverArgs')],
},
kbnTestServer: {
...xPackAPITestsConfig.get('kbnTestServer'),
serverArgs: [...xPackAPITestsConfig.get('kbnTestServer.serverArgs')],
},
junit: {
reportName: 'X-Pack Security API Integration Tests (Session Cookies)',
},
};
}