Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sustainable Kibana Architecture: Move modules owned by @elastic/kibana-security #202748

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
7e1e0a6
Relocating module `@kbn/crypto`
gsoldevila Dec 5, 2024
dd21e05
Relocating module `@kbn/encrypted-saved-objects-plugin`
gsoldevila Dec 5, 2024
1eb9428
Relocating module `@kbn/handlebars`
gsoldevila Dec 5, 2024
20c392d
Relocating module `@kbn/interactive-setup-plugin`
gsoldevila Dec 5, 2024
683f04c
Relocating module `@kbn/safer-lodash-set`
gsoldevila Dec 5, 2024
16a7d6b
Relocating module `@kbn/security-api-key-management`
gsoldevila Dec 5, 2024
9aba395
Relocating module `@kbn/security-authorization-core`
gsoldevila Dec 5, 2024
1a8b483
Relocating module `@kbn/security-authorization-core-common`
gsoldevila Dec 5, 2024
fc69a22
Relocating module `@kbn/security-form-components`
gsoldevila Dec 5, 2024
5e84f7a
Relocating module `@kbn/security-hardening`
gsoldevila Dec 5, 2024
39c2a72
Relocating module `@kbn/security-plugin`
gsoldevila Dec 5, 2024
068f2e1
Relocating module `@kbn/security-plugin-types-common`
gsoldevila Dec 5, 2024
51333f9
Relocating module `@kbn/security-plugin-types-public`
gsoldevila Dec 5, 2024
b397ad2
Relocating module `@kbn/security-plugin-types-server`
gsoldevila Dec 5, 2024
01c62b0
Relocating module `@kbn/security-role-management-model`
gsoldevila Dec 5, 2024
49d9bb8
Relocating module `@kbn/security-ui-components`
gsoldevila Dec 5, 2024
f1c2a73
Relocating module `@kbn/spaces-plugin`
gsoldevila Dec 5, 2024
33582ae
Relocating module `@kbn/user-profile-components`
gsoldevila Dec 5, 2024
9312f57
[CI] Auto-commit changed files from 'node scripts/telemetry_check'
kibanamachine Dec 5, 2024
7d6fd74
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine Dec 5, 2024
e0fa7e9
Fixes i18n paths
jeramysoucy Dec 6, 2024
db38b3d
Fixes path in kbn safer lodash set package file
jeramysoucy Dec 6, 2024
d66abdc
Fix references to kbn-handlebars
gsoldevila Dec 7, 2024
98bb09a
Merge branch 'main' into kbn-team-1309-move-kibana-security
gsoldevila Dec 9, 2024
ffccb7f
Fixes commit-specific links, removes old comment
jeramysoucy Dec 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -1841,7 +1841,7 @@ module.exports = {
'x-pack/test/security_api_integration/**/*.{js,mjs,ts,tsx}',
'x-pack/test/security_functional/**/*.{js,mjs,ts,tsx}',

'x-pack/plugins/spaces/**/*.{js,mjs,ts,tsx}',
'x-pack/platform/plugins/shared/spaces/**/*.{js,mjs,ts,tsx}',
'x-pack/test/spaces_api_integration/**/*.{js,mjs,ts,tsx}',
],
rules: {
Expand Down
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,7 @@ x-pack/platform/packages/shared/security/plugin_types_public @elastic/kibana-sec
x-pack/platform/packages/shared/security/plugin_types_server @elastic/kibana-security
x-pack/platform/plugins/shared/encrypted_saved_objects @elastic/kibana-security
x-pack/platform/plugins/shared/security @elastic/kibana-security
x-pack/platform/plugins/shared/spaces @elastic/kibana-security
x-pack/plugins/actions @elastic/response-ops
x-pack/plugins/ai_infra/llm_tasks @elastic/appex-ai-infra
x-pack/plugins/ai_infra/product_doc_base @elastic/appex-ai-infra
Expand Down Expand Up @@ -980,7 +981,6 @@ x-pack/plugins/serverless_observability @elastic/obs-ux-management-team
x-pack/plugins/serverless_search @elastic/search-kibana
x-pack/plugins/session_view @elastic/kibana-cloud-security-posture
x-pack/plugins/snapshot_restore @elastic/kibana-management
x-pack/plugins/spaces @elastic/kibana-security
x-pack/plugins/stack_alerts @elastic/response-ops
x-pack/plugins/stack_connectors @elastic/response-ops
x-pack/plugins/streams @elastic/streams-program-team
Expand Down
6 changes: 3 additions & 3 deletions docs/developer/advanced/sharing-saved-objects.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ this in two ways, and many consumers will want to implement both:
the spaces plugin, and you can use them in your own application.
+
First, make sure your page contents are wrapped in a
https://github.com/elastic/kibana/blob/{branch}/x-pack/plugins/spaces/public/spaces_context/types.ts[spaces context provider]:
https://github.com/elastic/kibana/blob/{branch}/x-pack/platform/plugins/shared/spaces/public/spaces_context/types.ts[spaces context provider]:
+
```tsx
const ContextWrapper = useMemo(
Expand All @@ -425,9 +425,9 @@ return (
);
```
+
Second, display a https://github.com/elastic/kibana/blob/{branch}/x-pack/plugins/spaces/public/space_list/types.ts[list of spaces] for an
Second, display a https://github.com/elastic/kibana/blob/{branch}/x-pack/platform/plugins/shared/spaces/public/space_list/types.ts[list of spaces] for an
object, and third, show a
https://github.com/elastic/kibana/blob/{branch}/x-pack/plugins/spaces/public/share_saved_objects_to_space/types.ts[flyout] for the user to
https://github.com/elastic/kibana/blob/{branch}/x-pack/platform/plugins/shared/spaces/public/share_saved_objects_to_space/types.ts[flyout] for the user to
edit the object's assigned spaces. You may want to follow the example of the <<data-views,Data Views page>> and
https://github.com/elastic/kibana/blob/{branch}/src/plugins/data_view_management/public/components/index_pattern_table/spaces_list.tsx[combine
these into a single component] so that the space list can be clicked to show the flyout:
Expand Down
2 changes: 1 addition & 1 deletion docs/developer/plugin-list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,7 @@ This plugin is only enabled when the application is built for serverless project
|or


|{kib-repo}blob/{branch}/x-pack/plugins/spaces/README.md[spaces]
|{kib-repo}blob/{branch}/x-pack/platform/plugins/shared/spaces/README.md[spaces]
|See Configuring Kibana Spaces.


Expand Down
2 changes: 1 addition & 1 deletion legacy_rfcs/text/0007_lifecycle_unblocked.md
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ functions and will be impacted:
3. [vis_type_table](https://github.com/elastic/kibana/blob/6039709929caf0090a4130b8235f3a53bd04ed84/src/legacy/core_plugins/vis_type_table/public/plugin.ts#L61)
4. [vis_type_vega](https://github.com/elastic/kibana/blob/6039709929caf0090a4130b8235f3a53bd04ed84/src/legacy/core_plugins/vis_type_vega/public/plugin.ts#L59)
6. [code](https://github.com/elastic/kibana/blob/5049b460b47d4ae3432e1d9219263bb4be441392/x-pack/legacy/plugins/code/server/plugin.ts#L129-L149)
7. [spaces](https://github.com/elastic/kibana/blob/096c7ee51136327f778845c636d7c4f1188e5db2/x-pack/legacy/plugins/spaces/server/new_platform/plugin.ts#L95)
7. [spaces](https://github.com/elastic/kibana/blob/096c7ee51136327f778845c636d7c4f1188e5db2/x-pack/legacy/platform/plugins/shared/spaces/server/new_platform/plugin.ts#L95)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: No need to update the legacy RFCs

8. [licensing](https://github.com/elastic/kibana/blob/4667c46caef26f8f47714504879197708debae32/x-pack/plugins/licensing/server/plugin.ts)
9. [security](https://github.com/elastic/kibana/blob/0f2324e44566ce2cf083d89082841e57d2db6ef6/x-pack/platform/plugins/shared/security/server/plugin.ts#L96)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,7 @@
"@kbn/slo-schema": "link:x-pack/packages/kbn-slo-schema",
"@kbn/snapshot-restore-plugin": "link:x-pack/plugins/snapshot_restore",
"@kbn/sort-predicates": "link:packages/kbn-sort-predicates",
"@kbn/spaces-plugin": "link:x-pack/plugins/spaces",
"@kbn/spaces-plugin": "link:x-pack/platform/plugins/shared/spaces",
"@kbn/spaces-test-plugin": "link:x-pack/test/spaces_api_integration/common/plugins/spaces_test_plugin",
"@kbn/sse-utils": "link:packages/kbn-sse-utils",
"@kbn/sse-utils-client": "link:packages/kbn-sse-utils-client",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export interface SavedObjectTypeIdTuple {
type: string;
}

// NOTE: moved from x-pack/plugins/spaces/common/types.ts for use by SO security ext
// NOTE: moved from x-pack/platform/plugins/shared/spaces/common/types.ts for use by SO security ext
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can just delete this comment now. It was useful 2 years ago, but is no longer relevant.

Suggested change
// NOTE: moved from x-pack/platform/plugins/shared/spaces/common/types.ts for use by SO security ext

/**
* Client interface for interacting with legacy URL aliases.
*/
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -1832,8 +1832,8 @@
"@kbn/sort-package-json/*": ["packages/kbn-sort-package-json/*"],
"@kbn/sort-predicates": ["packages/kbn-sort-predicates"],
"@kbn/sort-predicates/*": ["packages/kbn-sort-predicates/*"],
"@kbn/spaces-plugin": ["x-pack/plugins/spaces"],
"@kbn/spaces-plugin/*": ["x-pack/plugins/spaces/*"],
"@kbn/spaces-plugin": ["x-pack/platform/plugins/shared/spaces"],
"@kbn/spaces-plugin/*": ["x-pack/platform/plugins/shared/spaces/*"],
"@kbn/spaces-test-plugin": ["x-pack/test/spaces_api_integration/common/plugins/spaces_test_plugin"],
"@kbn/spaces-test-plugin/*": ["x-pack/test/spaces_api_integration/common/plugins/spaces_test_plugin/*"],
"@kbn/sse-utils": ["packages/kbn-sse-utils"],
Expand Down
2 changes: 1 addition & 1 deletion x-pack/.i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
],
"xpack.slo": "plugins/observability_solution/slo",
"xpack.snapshotRestore": "plugins/snapshot_restore",
"xpack.spaces": "plugins/spaces",
"xpack.spaces": "platform/plugins/shared/spaces",
"xpack.savedObjectsTagging": [
"plugins/saved_objects_tagging"
],
Expand Down
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few of the jest.config.js files are in this state, where they show up as having been moved from one domain to another (security/ui_components to spaces), and corrected. I don't think this is really consequential if the end result is correct.

Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

module.exports = {
preset: '@kbn/test',
rootDir: '../../..',
roots: ['<rootDir>/x-pack/plugins/spaces'],
coverageDirectory: '<rootDir>/target/kibana-coverage/jest/x-pack/plugins/spaces',
rootDir: '../../../../..',
roots: ['<rootDir>/x-pack/platform/plugins/shared/spaces'],
coverageDirectory: '<rootDir>/target/kibana-coverage/jest/x-pack/platform/plugins/shared/spaces',
coverageReporters: ['text', 'html'],
collectCoverageFrom: ['<rootDir>/x-pack/plugins/spaces/{common,public,server}/**/*.{ts,tsx}'],
collectCoverageFrom: ['<rootDir>/x-pack/platform/plugins/shared/spaces/{common,public,server}/**/*.{ts,tsx}'],
};
Loading