-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Permissions required for stateful agentless integrations #118644
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
Merged
Changes from 12 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
8a23a22
WIP: permissions required for stateful agentless integrations
orestisfl b528f7e
system-index
orestisfl bb19213
fix test
orestisfl 06efb11
allowRestrictedIndices
orestisfl f5764ef
Allow dot-prefix agentless
orestisfl cc2a948
Revert elevated permissions
orestisfl 50431a9
Merge commit 'bb0c34e7c3d5b73febcae29491fd030361c3d6ad' into agentles…
orestisfl a3a4261
Update index templates
orestisfl db8f1f6
add mappings
orestisfl e48fc0f
Fix tests
orestisfl 7dba477
Merge branch 'main' into agentless-storage-permissions
orestisfl 1b6420e
Fix StackTemplateRegistryTests
orestisfl 79e5638
Omit default settings
orestisfl 0ab0bab
Merge branch 'main' into agentless-storage-permissions
orestisfl 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
22 changes: 22 additions & 0 deletions
22
x-pack/plugin/core/template-resources/src/main/resources/[email protected]
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,22 @@ | ||
{ | ||
"template": { | ||
"mappings": { | ||
"properties": { | ||
"v": { | ||
"type": "object", | ||
"enabled": false | ||
}, | ||
"updated_at": { | ||
"type": "date", | ||
"format": "strict_date_optional_time||epoch_millis" | ||
} | ||
} | ||
} | ||
}, | ||
"_meta": { | ||
"description": "default mappings for the agentless index template installed by x-pack", | ||
"managed": true | ||
}, | ||
"version": ${xpack.stack.template.version}, | ||
"deprecated": ${xpack.stack.template.deprecated} | ||
} |
17 changes: 17 additions & 0 deletions
17
x-pack/plugin/core/template-resources/src/main/resources/[email protected]
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,17 @@ | ||
{ | ||
"template": { | ||
"settings": { | ||
"index": { | ||
"hidden": true, | ||
"number_of_shards": 1, | ||
"number_of_replicas": 1 | ||
} | ||
} | ||
}, | ||
"_meta": { | ||
"description": "default settings for the agentless index template installed by x-pack", | ||
"managed": true | ||
}, | ||
"version": ${xpack.stack.template.version}, | ||
"deprecated": ${xpack.stack.template.deprecated} | ||
} |
15 changes: 15 additions & 0 deletions
15
x-pack/plugin/core/template-resources/src/main/resources/[email protected]
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,15 @@ | ||
{ | ||
"index_patterns": ["agentless-*-*"], | ||
"priority": 100, | ||
"composed_of": [ | ||
"agentless@mappings", | ||
"agentless@settings" | ||
], | ||
"allow_auto_create": true, | ||
"_meta": { | ||
"description": "default agentless template installed by x-pack", | ||
"managed": true | ||
}, | ||
"version": ${xpack.stack.template.version}, | ||
"deprecated": ${xpack.stack.template.deprecated} | ||
} |
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 |
---|---|---|
|
@@ -100,6 +100,13 @@ public class StackTemplateRegistry extends IndexTemplateRegistry { | |
public static final String SYNTHETICS_ILM_POLICY_NAME = "synthetics@lifecycle"; | ||
public static final String SYNTHETICS_INDEX_TEMPLATE_NAME = "synthetics"; | ||
|
||
////////////////////////////////////////////////////////// | ||
// Agentless components (for matching agentless-*-* indices) | ||
////////////////////////////////////////////////////////// | ||
public static final String AGENTLESS_MAPPINGS_COMPONENT_TEMPLATE_NAME = "agentless@mappings"; | ||
public static final String AGENTLESS_SETTINGS_COMPONENT_TEMPLATE_NAME = "agentless@settings"; | ||
public static final String AGENTLESS_INDEX_TEMPLATE_NAME = "agentless"; | ||
|
||
/////////////////////////////////// | ||
// Kibana reporting template | ||
/////////////////////////////////// | ||
|
@@ -199,6 +206,20 @@ private Map<String, ComponentTemplate> loadComponentTemplateConfigs() { | |
TEMPLATE_VERSION_VARIABLE, | ||
ADDITIONAL_TEMPLATE_VARIABLES | ||
), | ||
new IndexTemplateConfig( | ||
AGENTLESS_MAPPINGS_COMPONENT_TEMPLATE_NAME, | ||
"/[email protected]", | ||
REGISTRY_VERSION, | ||
TEMPLATE_VERSION_VARIABLE, | ||
ADDITIONAL_TEMPLATE_VARIABLES | ||
), | ||
new IndexTemplateConfig( | ||
AGENTLESS_SETTINGS_COMPONENT_TEMPLATE_NAME, | ||
"/[email protected]", | ||
REGISTRY_VERSION, | ||
TEMPLATE_VERSION_VARIABLE, | ||
ADDITIONAL_TEMPLATE_VARIABLES | ||
), | ||
new IndexTemplateConfig( | ||
KIBANA_REPORTING_COMPONENT_TEMPLATE_NAME, | ||
"/[email protected]", | ||
|
@@ -287,6 +308,13 @@ protected Map<String, ComponentTemplate> getComponentTemplateConfigs() { | |
TEMPLATE_VERSION_VARIABLE, | ||
ADDITIONAL_TEMPLATE_VARIABLES | ||
), | ||
new IndexTemplateConfig( | ||
AGENTLESS_INDEX_TEMPLATE_NAME, | ||
"/[email protected]", | ||
REGISTRY_VERSION, | ||
TEMPLATE_VERSION_VARIABLE, | ||
ADDITIONAL_TEMPLATE_VARIABLES | ||
), | ||
new IndexTemplateConfig( | ||
KIBANA_REPORTING_INDEX_TEMPLATE_NAME, | ||
"/[email protected]", | ||
|
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: I would suggest to omit these (shard/replica) as they are the defaults.