Skip to content

Commit

Permalink
Merge branch '8.x' into backport/8.x/pr-199630
Browse files Browse the repository at this point in the history
  • Loading branch information
gsoldevila authored Nov 22, 2024
2 parents 8c5d062 + 85fd532 commit 234f152
Show file tree
Hide file tree
Showing 120 changed files with 1,372 additions and 824 deletions.
60 changes: 48 additions & 12 deletions docs/upgrade-notes.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,54 @@ For Elastic Security release information, refer to {security-guide}/release-note
[float]
==== Kibana APIs

[discrete]
[[breaking-199656]]
.Removed all security v1 endpoints (9.0.0)
[%collapsible]
====
*Details* +
All `v1` Kibana security HTTP endpoints have been removed.
`GET /api/security/v1/logout` has been replaced by `GET /api/security/logout`
`GET /api/security/v1/oidc/implicit` has been replaced by `GET /api/security/oidc/implicit`
`GET /api/security/v1/oidc` has been replaced by GET `/api/security/oidc/callback`
`POST /api/security/v1/oidc` has been replaced by POST `/api/security/oidc/initiate_login`
`POST /api/security/v1/saml` has been replaced by POST `/api/security/saml/callback`
`GET /api/security/v1/me` has been removed with no replacement.
For more information, refer to {kibana-pull}199656[#199656].
*Impact* +
Any HTTP API calls to the `v1` Kibana security endpoints will fail with a 404 status code starting from version 9.0.0.
Third party OIDC and SAML identity providers configured with `v1` endpoints will no longer work.
*Action* +
Update any OIDC and SAML identity providers to reference the corresponding replacement endpoint listed above.
Remove references to the `/api/security/v1/me` endpoint from any automations, applications, tooling, and scripts.
====

[discrete]
[[breaking-193792]]
.Access to all internal APIs is blocked (9.0.0)
[%collapsible]
====
*Details* +
Access to internal Kibana HTTP APIs is restricted from version 9.0.0. This is to ensure
that HTTP API integrations with Kibana avoid unexpected breaking changes.
Refer to {kibana-pull}193792[#193792].
*Impact* +
Any HTTP API calls to internal Kibana endpoints will fail with a 400 status code starting
from version 9.0.0.
*Action* +
**Do not integrate with internal HTTP APIs**. They may change or be removed without notice,
and lead to unexpected behaviors. If you would like some capability to be exposed over an
HTTP API, https://github.com/elastic/kibana/issues/new/choose[create an issue].
We would love to discuss your use case.
====

[discrete]
[[breaking-162506]]
.Get case metrics APIs became internal. (8.10)
Expand Down Expand Up @@ -792,18 +840,6 @@ The legacy audit logger has been removed. For more information, refer to {kibana
Audit logs will be written to the default location in the new ECS format. To change the output file, filter events, and more, use the <<audit-logging-settings, audit logging settings>>.
====

[discrete]
[[breaking-47929]]
.[Security] Removed `/api/security/v1/saml` route. (8.0)
[%collapsible]
====
*Details* +
The `/api/security/v1/saml` route has been removed and is reflected in the kibana.yml `server.xsrf.whitelist` setting, {es}, and the Identity Provider SAML settings. For more information, refer to {kibana-pull}47929[#47929]
*Impact* +
Use the `/api/security/saml/callback` route, or wait to upgrade to 8.0.0-alpha2 when the `/api/security/saml/callback` route breaking change is reverted.
====

[discrete]
[[breaking-41700]]
.[Security] Legacy browsers rejected by default. (8.0)
Expand Down
19 changes: 8 additions & 11 deletions examples/feature_flags_example/public/application.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,19 @@
import React from 'react';
import ReactDOM from 'react-dom';
import { AppMountParameters, CoreStart } from '@kbn/core/public';
import { KibanaPageTemplate } from '@kbn/shared-ux-page-kibana-template';
import { KibanaRootContextProvider } from '@kbn/react-kibana-context-root';
import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render';
import { FeatureFlagsExampleApp } from './components/app';

export const renderApp = (coreStart: CoreStart, { element }: AppMountParameters) => {
const { notifications, http, featureFlags } = coreStart;
ReactDOM.render(
<KibanaRootContextProvider {...coreStart}>
<KibanaPageTemplate>
<FeatureFlagsExampleApp
featureFlags={featureFlags}
notifications={notifications}
http={http}
/>
</KibanaPageTemplate>
</KibanaRootContextProvider>,
<KibanaRenderContextProvider {...coreStart}>
<FeatureFlagsExampleApp
featureFlags={featureFlags}
notifications={notifications}
http={http}
/>
</KibanaRenderContextProvider>,
element
);

Expand Down
3 changes: 1 addition & 2 deletions examples/feature_flags_example/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@
"exclude": ["target/**/*"],
"kbn_references": [
"@kbn/core",
"@kbn/shared-ux-page-kibana-template",
"@kbn/react-kibana-context-root",
"@kbn/core-feature-flags-server",
"@kbn/core-plugins-server",
"@kbn/config-schema",
"@kbn/developer-examples-plugin",
"@kbn/react-kibana-context-render",
]
}
2 changes: 1 addition & 1 deletion fleet_packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
},
{
"name": "endpoint",
"version": "8.16.0"
"version": "8.17.0"
},
{
"name": "fleet_server",
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-discover-utils/src/hooks/use_pager.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import { act, renderHook } from '@testing-library/react-hooks';
import { renderHook, act } from '@testing-library/react';
import { usePager } from './use_pager';

describe('usePager', () => {
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-doc-links/src/get_doc_links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,7 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
mappingRoles: `${ELASTICSEARCH_DOCS}mapping-roles.html`,
mappingRolesFieldRules: `${ELASTICSEARCH_DOCS}role-mapping-resources.html#mapping-roles-rule-field`,
runAsPrivilege: `${ELASTICSEARCH_DOCS}security-privileges.html#_run_as_privilege`,
deprecatedV1Endpoints: `${KIBANA_DOCS}breaking-changes-summary.html#breaking-199656`,
},
spaces: {
kibanaLegacyUrlAliases: `${KIBANA_DOCS}legacy-url-aliases.html`,
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-doc-links/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,7 @@ export interface DocLinks {
mappingRoles: string;
mappingRolesFieldRules: string;
runAsPrivilege: string;
deprecatedV1Endpoints: string;
}>;
readonly spaces: Readonly<{
kibanaLegacyUrlAliases: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ import { EuiDataGridCellValueElementProps, EuiDataGridSetCellProps } from '@elas
import { buildDataTableRecord } from '@kbn/discover-utils';
import { generateEsHits, additionalFieldGroups } from '@kbn/discover-utils/src/__mocks__';
import { fieldFormatsMock } from '@kbn/field-formats-plugin/common/mocks';
import { render, screen } from '@testing-library/react';
import { renderHook } from '@testing-library/react-hooks';
import { render, screen, renderHook } from '@testing-library/react';
import React from 'react';
import { ReactNode, useState } from 'react';
import { dataViewWithTimefieldMock } from '../../../../__mocks__/data_view_with_timefield';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ import {
FIELD_COLUMN_WIDTH,
useComparisonColumns,
} from './use_comparison_columns';
import { renderHook } from '@testing-library/react-hooks';
import type { EuiDataGridColumn, EuiDataGridColumnActions } from '@elastic/eui';
import { render, screen } from '@testing-library/react';
import { render, screen, renderHook } from '@testing-library/react';
import React from 'react';
import userEvent from '@testing-library/user-event';
import { generateEsHits } from '@kbn/discover-utils/src/__mocks__';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import { renderHook } from '@testing-library/react-hooks';
import { renderHook } from '@testing-library/react';
import { useComparisonCss } from './use_comparison_css';

describe('useComparisonCss', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import { renderHook } from '@testing-library/react-hooks';
import { renderHook } from '@testing-library/react';
import { buildDataTableRecord } from '@kbn/discover-utils';
import {
MAX_COMPARISON_FIELDS,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import { renderHook } from '@testing-library/react-hooks';
import { renderHook } from '@testing-library/react';
import { useColumns } from './use_data_grid_columns';
import { dataViewMock } from '@kbn/discover-utils/src/__mocks__';
import { configMock } from '../../__mocks__/config';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

import type { Storage } from '@kbn/kibana-utils-plugin/public';
import { renderHook } from '@testing-library/react-hooks';
import { renderHook } from '@testing-library/react';
import { useDataGridDensity } from './use_data_grid_density';
import { DATA_GRID_STYLE_EXPANDED, DataGridDensity } from '../constants';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import { act, renderHook } from '@testing-library/react-hooks';
import { renderHook, act } from '@testing-library/react';
import {
EUI_DATA_GRID_FULL_SCREEN_CLASS,
UNIFIED_DATA_TABLE_FULL_SCREEN_CLASS,
Expand Down Expand Up @@ -40,7 +40,7 @@ const nextTick = () => {
return act(() => {
return new Promise((resolve) =>
requestAnimationFrame(() => {
resolve();
resolve(null);
})
);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import { renderHook } from '@testing-library/react-hooks';
import { renderHook } from '@testing-library/react';
import { createLocalStorageMock } from '../../__mocks__/local_storage_mock';
import { useRowHeight } from './use_row_height';
import { RowHeightMode } from '../components/row_height_settings';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import { renderHook } from '@testing-library/react-hooks';
import { renderHook } from '@testing-library/react';
import { useRowHeightsOptions } from './use_row_heights_options';

describe('useRowHeightsOptions', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import { act, renderHook } from '@testing-library/react-hooks';
import { renderHook, act } from '@testing-library/react';
import { buildDataTableRecord } from '@kbn/discover-utils';
import { useSelectedDocs } from './use_selected_docs';
import { generateEsHits } from '@kbn/discover-utils/src/__mocks__';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import { act } from '@testing-library/react-hooks';
import { act } from '@testing-library/react';
import { getSidebarVisibility } from './get_sidebar_visibility';

const localStorageKey = 'test-sidebar-visibility';
Expand Down
Loading

0 comments on commit 234f152

Please sign in to comment.