-
Notifications
You must be signed in to change notification settings - Fork 68
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
Add support for elasticsearch.privileges.cluster #750
Merged
nchaulet
merged 6 commits into
master
from
feature-support-elasticsearch-cluster-privileges
Oct 14, 2021
Merged
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
b7285e5
Add support for elasticsearch.privileges.cluster
nchaulet bc5ccaa
Fix after review
nchaulet 649ebbb
Merge branch 'master' of github.com:elastic/package-registry into fea…
nchaulet 9cc6f54
Add a changelog entry
nchaulet fd53bc5
Fix test data to use existing cluster privileges
nchaulet aaf4fd3
Merge branch 'master' into feature-support-elasticsearch-cluster-priv…
jsoriano 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 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 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 |
---|---|---|
|
@@ -59,12 +59,13 @@ type Package struct { | |
Readme *string `config:"readme,omitempty" json:"readme,omitempty" yaml:"readme,omitempty"` | ||
License string `config:"license,omitempty" json:"license,omitempty" yaml:"license,omitempty"` | ||
versionSemVer *semver.Version | ||
Categories []string `config:"categories" json:"categories"` | ||
Screenshots []Image `config:"screenshots,omitempty" json:"screenshots,omitempty" yaml:"screenshots,omitempty"` | ||
Assets []string `config:"assets,omitempty" json:"assets,omitempty" yaml:"assets,omitempty"` | ||
PolicyTemplates []PolicyTemplate `config:"policy_templates,omitempty" json:"policy_templates,omitempty" yaml:"policy_templates,omitempty"` | ||
DataStreams []*DataStream `config:"data_streams,omitempty" json:"data_streams,omitempty" yaml:"data_streams,omitempty"` | ||
Vars []Variable `config:"vars" json:"vars,omitempty" yaml:"vars,omitempty"` | ||
Categories []string `config:"categories" json:"categories"` | ||
Screenshots []Image `config:"screenshots,omitempty" json:"screenshots,omitempty" yaml:"screenshots,omitempty"` | ||
Assets []string `config:"assets,omitempty" json:"assets,omitempty" yaml:"assets,omitempty"` | ||
PolicyTemplates []PolicyTemplate `config:"policy_templates,omitempty" json:"policy_templates,omitempty" yaml:"policy_templates,omitempty"` | ||
DataStreams []*DataStream `config:"data_streams,omitempty" json:"data_streams,omitempty" yaml:"data_streams,omitempty"` | ||
Vars []Variable `config:"vars" json:"vars,omitempty" yaml:"vars,omitempty"` | ||
Elasticsearch *PkgElasticsearch `config:"elasticsearch,omitempty" json:"elasticsearch,omitempty" yaml:"elasticsearch,omitempty"` | ||
|
||
// Local path to the package dir | ||
BasePath string `json:"-" yaml:"-"` | ||
|
@@ -144,6 +145,14 @@ type Image struct { | |
Type string `config:"type" json:"type,omitempty"` | ||
} | ||
|
||
type PkgElasticsearch struct { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: same situation, |
||
Privileges *PkgElasticsearchPrivileges `config:"privileges,omitempty" json:"privileges,omitempty" yaml:"privileges,omitempty"` | ||
} | ||
|
||
type PkgElasticsearchPrivileges struct { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: |
||
Cluster []string `config:"cluster,omitempty" json:"cluster,omitempty" yaml:"cluster,omitempty"` | ||
} | ||
|
||
func (i Image) getPath(p *Package) string { | ||
return path.Join(packagePathPrefix, p.Name, p.Version, i.Src) | ||
} | ||
|
This file contains 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 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 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 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 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 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 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 |
---|---|---|
@@ -1,14 +1,17 @@ | ||
format_version: 1.0.0 | ||
|
||
name: elasticsearch_privileges | ||
description: Test package-specified Elasticsearch index privileges | ||
description: Test package-specified Elasticsearch index privileges and cluster privileges | ||
version: 1.0.0 | ||
title: Elasticsearch Privileges | ||
categories: ["custom"] | ||
type: solution | ||
release: beta | ||
|
||
elasticsearch: | ||
privileges: | ||
cluster: ["monitor/main"] | ||
|
||
conditions: | ||
kibana: | ||
version: ">=7.16.0" | ||
|
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.
nit: let's expand the Ds and replace it with
DataStreamElasticsearch