-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
[X-Pack] Beats centralized management: security role + licensing #30520
Merged
ycombinator
merged 22 commits into
elastic:master
from
ycombinator:x-pack/management/beats
Jul 10, 2018
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
573cc62
Adding Beats x-pack plugin + index templates
ycombinator ffe1ff5
Adding built-in roles for Beats central management
ycombinator cb874b7
Fixing typo
ycombinator ee45e03
Refactoring: extract common code into method
ycombinator c2618b7
More refactoring for more code reuse
ycombinator b7254ee
Use a single index for Beats management
ycombinator d7af55b
Rename "fragment" to "block"
ycombinator 5364b16
Adding configuration block type
ycombinator 61eb9c6
Expand kibana_system role to include Beats management index privileges
ycombinator 678d8b7
Fixing syntax
ycombinator 50a4d62
Adding test
ycombinator 8e517c3
Adding asserting for reserved role
ycombinator 7834c41
Fixing privileges
ycombinator 9cbd059
Updating template
ycombinator a908b97
Removing beats plugin
ycombinator c1163c6
Fixing tests
ycombinator 625b80b
Fixing role variable name
ycombinator 2e29cdb
Fixing assertions
ycombinator d0f05d6
Switching to preferred syntax for boolean false checks
ycombinator 154d305
Making class final
ycombinator 39d08ad
Making variables final
ycombinator d79e73d
Updating Basic license message to be more accurate
ycombinator 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
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
24 changes: 24 additions & 0 deletions
24
...ck/plugin/core/src/main/java/org/elasticsearch/xpack/core/beats/BeatsFeatureSetUsage.java
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
package org.elasticsearch.xpack.core.beats; | ||
|
||
import org.elasticsearch.common.io.stream.StreamInput; | ||
import org.elasticsearch.xpack.core.XPackFeatureSet; | ||
import org.elasticsearch.xpack.core.XPackField; | ||
|
||
import java.io.IOException; | ||
|
||
public final class BeatsFeatureSetUsage extends XPackFeatureSet.Usage { | ||
|
||
public BeatsFeatureSetUsage(StreamInput in) throws IOException { | ||
super(in); | ||
} | ||
|
||
public BeatsFeatureSetUsage(boolean available, boolean enabled) { | ||
super(XPackField.BEATS, available, enabled); | ||
} | ||
|
||
} |
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
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.
Given that the ingest team owns, I wonder if this should instead be
isIngestAllowed
and simply replaceisLogstashAllowed
? They share the same license requirements, so it seems reasonable to me that they shouldn't dupe their code too.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.
Personally I feel like the code should reflect the products/features and not organization structure, as much as possible. So I'd like to keep this as-is.
I'd be okay with refactoring the duplicate code in the two methods into a helper method like
isNotBasic
or something like that. What do you think of that?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.
I'd be happy with an
isNotBasic
method.