Display enterprise license as platinum in /_xpack#58217
Merged
tvernum merged 5 commits intoelastic:7.xfrom Jun 30, 2020
Merged
Conversation
The GET /_license endpoint displays "enterprise" licenses as "platinum" by default so that old clients (including beats, kibana and logstash) know to interpret this new license type as if it were a platinum license. However, this compatibility layer was not applied to the GET /_xpack/ endpoint which also displays a license type & mode. This commit causes the _xpack API to mimic the _license API and treat enterprise as platinum by default, with a new accept_enterprise parameter that will cause the API to return the correct "enterprise" value. This BWC layer exists only for the 7.x branch. This is a breaking change because, since 7.6, the _xpack API has returned "enterprise" for enterprise liceses, but this has been found to break old versions of beats and logstash so needs to be corrected.
Collaborator
|
Pinging @elastic/es-security (:Security/License) |
tvernum
added a commit
to tvernum/elasticsearch
that referenced
this pull request
Jun 17, 2020
This change introduces support for the "accept_enterprise" parameter to the /_xpack endpoint, to match the parameter on the /_license endpoint. This parameter is deprecated, it does nothing, and may not be set to any value other than true. It exists solely to support upgrades from 7.x versions where the parameter does have meaning. Relates: elastic#58217
This was referenced Jun 17, 2020
ywangd
approved these changes
Jun 17, 2020
Comment on lines
+55
to
+56
| if ("enterprise".equals(type)) { | ||
| type = "platinum"; |
Member
There was a problem hiding this comment.
Would it be better to use enums here, e.g. License.LicenseType.ENTERPRISE.getTypeName()? It is rather verbose but safer.
Contributor
Author
There was a problem hiding this comment.
I didn't because the existing code for the License endpoint didn't, but I think we should.
Contributor
Author
|
@elasticmachine update branch |
Contributor
Author
|
@elasticsearchmachine run elasticsearch-ci/1 |
tvernum
added a commit
to tvernum/elasticsearch
that referenced
this pull request
Jun 30, 2020
This commit re-enables CCR rolling upgrade tests following the backport of elastic#58217 to 7.8 branch (7.8.1)
tvernum
added a commit
to tvernum/elasticsearch
that referenced
this pull request
Jun 30, 2020
The GET /_license endpoint displays "enterprise" licenses as "platinum" by default so that old clients (including beats, kibana and logstash) know to interpret this new license type as if it were a platinum license. However, this compatibility layer was not applied to the GET /_xpack/ endpoint which also displays a license type & mode. This commit causes the _xpack API to mimic the _license API and treat enterprise as platinum by default, with a new accept_enterprise parameter that will cause the API to return the correct "enterprise" value. This BWC layer exists only for the 7.x branch. This is a breaking change because, since 7.6, the _xpack API has returned "enterprise" for enterprise licenses, but this has been found to break old versions of beats and logstash so needs to be corrected. Backport of: elastic#58217
This was referenced Jun 30, 2020
tvernum
added a commit
that referenced
this pull request
Jun 30, 2020
The GET /_license endpoint displays "enterprise" licenses as "platinum" by default so that old clients (including beats, kibana and logstash) know to interpret this new license type as if it were a platinum license. However, this compatibility layer was not applied to the GET /_xpack/ endpoint which also displays a license type & mode. This commit causes the _xpack API to mimic the _license API and treat enterprise as platinum by default, with a new accept_enterprise parameter that will cause the API to return the correct "enterprise" value. This BWC layer exists only for the 7.x branch. This is a breaking change because, since 7.6, the _xpack API has returned "enterprise" for enterprise licenses, but this has been found to break old versions of beats and logstash so needs to be corrected. Backport of: #58217
tvernum
added a commit
that referenced
this pull request
Jul 1, 2020
This commit re-enables CCR rolling upgrade tests following the backport of #58217 to 7.8 branch (7.8.1)
1 task
pgomulka
added a commit
that referenced
this pull request
Jul 27, 2021
…es (#75479) in #50067 for _license the accept_enterprise = false was no longer supported. This commit allows it under rest compatibility and is showing enterprise licenses as platinum The same change had to be applied to _xpack endpoint #58217 in #50735 max_resource_units was introduced to be more accurate. For v7 requests, which do not know about enterprise license we will return max_node which will be set from max_resource_units (it assumes that one resource unit is 32GB - which corresponds to 1 node) relates #51816
ywangd
pushed a commit
to ywangd/elasticsearch
that referenced
this pull request
Jul 30, 2021
…es (elastic#75479) in elastic#50067 for _license the accept_enterprise = false was no longer supported. This commit allows it under rest compatibility and is showing enterprise licenses as platinum The same change had to be applied to _xpack endpoint elastic#58217 in elastic#50735 max_resource_units was introduced to be more accurate. For v7 requests, which do not know about enterprise license we will return max_node which will be set from max_resource_units (it assumes that one resource unit is 32GB - which corresponds to 1 node) relates elastic#51816
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The GET /_license endpoint displays "enterprise" licenses as
"platinum" by default so that old clients (including beats, kibana and
logstash) know to interpret this new license type as if it were a
platinum license.
However, this compatibility layer was not applied to the GET /_xpack/
endpoint which also displays a license type & mode.
This commit causes the _xpack API to mimic the _license API and treat
enterprise as platinum by default, with a new accept_enterprise
parameter that will cause the API to return the correct "enterprise"
value.
This BWC layer exists only for the 7.x branch.
This is bug fix is marked as a breaking change because, since 7.6,
the _xpack API has (incorrectly) returned "enterprise" for enterprise
licenses, and it is possible that some clients rely on this incorrect
behaviour.