-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Display enterprise license as platinum in /_xpack #58217
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
Display enterprise license as platinum in /_xpack #58217
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.
Pinging @elastic/es-security (:Security/License) |
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
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.
LGTM
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.
LGTM
if ("enterprise".equals(type)) { | ||
type = "platinum"; |
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.
Would it be better to use enums here, e.g. License.LicenseType.ENTERPRISE.getTypeName()
? It is rather verbose but safer.
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 didn't because the existing code for the License endpoint didn't, but I think we should.
@elasticmachine update branch |
@elasticsearchmachine run elasticsearch-ci/1 |
This commit re-enables CCR rolling upgrade tests following the backport of elastic#58217 to 7.8 branch (7.8.1)
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
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
This commit re-enables CCR rolling upgrade tests following the backport of #58217 to 7.8 branch (7.8.1)
…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
…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
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.