-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[Advanced settings] Add settings allowlist #164471
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
Merged
ElenaStoeva
merged 56 commits into
elastic:main
from
ElenaStoeva:advanced_settings/allowlist_for_serverless
Sep 11, 2023
Merged
Changes from 38 commits
Commits
Show all changes
56 commits
Select commit
Hold shift + click to select a range
8923f8d
[Advanced settings] Add settings allowlist
ElenaStoeva eb47fb6
Move allowlist APIs to server
ElenaStoeva 1b6cbb6
[CI] Auto-commit changed files from 'node scripts/precommit_hook.js -…
kibanamachine f8dc1bd
Don't allow updating a setting that is not allowlisted
ElenaStoeva 90abe3a
Leverage readonly param and extract settings list into a package
ElenaStoeva 83be210
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine c607959
[CI] Auto-commit changed files from 'node scripts/generate codeowners'
kibanamachine cd0e954
Expose setupProjectSettings api from serverless plugin
ElenaStoeva 4b2ed8d
Change readonly param and improve settings package readme
ElenaStoeva 96b6d57
Extract search and security settings into packages
ElenaStoeva 4b782a5
Fix types errors
ElenaStoeva d4c8131
[CI] Auto-commit changed files from 'node scripts/generate codeowners'
kibanamachine 9abdaf9
Merge branch 'main' into advanced_settings/allowlist_for_serverless
ElenaStoeva e660157
Fix event log tests
ElenaStoeva eda865e
Merge branch 'main' into advanced_settings/allowlist_for_serverless
kibanamachine 48cb651
Fix alerting test mocks
ElenaStoeva 529f143
Merge branch 'main' into advanced_settings/allowlist_for_serverless
ElenaStoeva b7a8350
Address CR comments
ElenaStoeva 77481ca
Add setReadonlyMode method and enforcements/validations
ElenaStoeva 9e896ca
[CI] Auto-commit changed files from 'node scripts/precommit_hook.js -…
kibanamachine 8da18e3
Add tests for setAllowlist and validateAllowlist
ElenaStoeva 077c7cc
Disable mappings check
ElenaStoeva 69d763c
Merge branch 'main' into advanced_settings/allowlist_for_serverless
ElenaStoeva 905b342
Extract setting ids into a package
ElenaStoeva d8f4767
[CI] Auto-commit changed files from 'node scripts/precommit_hook.js -…
kibanamachine a2e8920
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine c5c2535
[CI] Auto-commit changed files from 'node scripts/generate codeowners'
kibanamachine 7dfd41a
Fix logic, refactor changes
ElenaStoeva 4e6a8dc
Merge branch 'main' into advanced_settings/allowlist_for_serverless
ElenaStoeva 4db7ca3
Fix actions plugin tests
ElenaStoeva c3032bf
[CI] Auto-commit changed files from 'node scripts/precommit_hook.js -…
kibanamachine ad880c7
Skip blocking test
ElenaStoeva 67c33ed
Merge branch 'main' into advanced_settings/allowlist_for_serverless
ElenaStoeva d0665e6
Add tests for applyAllowlist
ElenaStoeva 5da41f8
[CI] Auto-commit changed files from 'node scripts/precommit_hook.js -…
kibanamachine 80fdbe8
Add more documentation
ElenaStoeva f99a6d9
Add serverless plugin test
ElenaStoeva 2b43fe5
Merge branch 'main' into advanced_settings/allowlist_for_serverless
mistic cfb1646
Fix alerting and event_log tests
ElenaStoeva a35f47f
Remove unnecessary comments
ElenaStoeva baf3e79
Fix exporting/importing errors
ElenaStoeva 2f8d2b8
Remove old security setting id
ElenaStoeva 09a4cba
Merge branch 'main' into advanced_settings/allowlist_for_serverless
ElenaStoeva 2f0bf0f
Add functional tests
ElenaStoeva 9e3d630
Merge branch 'advanced_settings/allowlist_for_serverless' of https://…
ElenaStoeva 0e1561a
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine b6e2bb1
Merge branch 'main' into advanced_settings/allowlist_for_serverless
ElenaStoeva 7601a49
Unskip failed tests and disable multi-call check for setAllowlist
ElenaStoeva 8c13f80
[CI] Auto-commit changed files from 'node scripts/precommit_hook.js -…
kibanamachine 7eee9a1
Skip test for setAllowlist check
ElenaStoeva 4e4ee30
Fix test descriptions
ElenaStoeva 6bfe3da
Validate allowlist only in development mode
ElenaStoeva ba8ffec
Merge branch 'main' into advanced_settings/allowlist_for_serverless
ElenaStoeva efdc13a
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine a272d86
Refactor isDev check
ElenaStoeva 3dfbdb9
Disable Advanced settings app in serverless and skip functional tests
ElenaStoeva File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| --- | ||
| id: kbn-management/settings/ids | ||
| slug: /kbn-management/settings/setting_ids/ | ||
| title: Setting ID's | ||
| description: ID's of all advanced settings. | ||
| tags: ['management', 'settings'] | ||
| date: 2023-09-04 | ||
| --- | ||
|
|
||
| This package contains the id's of all advanced settings. | ||
|
|
||
| When registering an advanced setting, add its id to this package and import it for use in the setting definition: | ||
|
|
||
| **packages/kbn-management/settings/setting_ids/index.ts** | ||
|
|
||
| ```ts | ||
| export const MY_SETTING_ID = 'mySetting'; | ||
| ``` | ||
|
|
||
| **src/plugins/my_plugin/server/plugin.ts** | ||
|
|
||
| ```ts | ||
| import { MY_SETTING_ID } from '@kbn/management-settings-ids'; | ||
|
|
||
| export class MyPlugin implements Plugin<object, object> { | ||
| public setup(core: CoreSetup, dependencies: SetupDependencies) { | ||
| core.uiSettings.register({ | ||
| [MY_SETTING_ID]: { | ||
| name: 'My setting', | ||
| value: 10, | ||
| schema: schema.number(), | ||
| }, | ||
| ... | ||
| }); | ||
|
|
||
| return {}; | ||
| } | ||
| } | ||
| ``` |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.