ESQL: Enterprise license enforcement for CCS#118102
Merged
quux00 merged 26 commits intoelastic:mainfrom Dec 12, 2024
Merged
Conversation
4d9ac7b to
f633f60
Compare
0043bb8 to
8e7212a
Compare
…ng; automated tests pending
…sqlSessionCCSUtils.concreteIndexRequested
…n though the license is installed, ES|QL code sees null license
… that need a license
…WithSecurityYamlTestSuiteIT by changing build.gradle
…d CCS tests are now using it
…_usage esql-ccs license feature
8e7212a to
165c3eb
Compare
quux00
commented
Dec 10, 2024
x-pack/plugin/core/src/main/java/org/elasticsearch/license/XPackLicenseState.java
Show resolved
Hide resolved
smalyshev
reviewed
Dec 10, 2024
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/session/EsqlLicenseChecker.java
Show resolved
Hide resolved
smalyshev
reviewed
Dec 10, 2024
...legacy-with-basic-license/src/test/resources/rest-api-spec/test/querying_cluster/80_esql.yml
Show resolved
Hide resolved
smalyshev
reviewed
Dec 10, 2024
x-pack/plugin/core/src/main/java/org/elasticsearch/license/XPackLicenseState.java
Outdated
Show resolved
Hide resolved
smalyshev
reviewed
Dec 10, 2024
x-pack/plugin/core/src/main/java/org/elasticsearch/license/XPackLicenseState.java
Outdated
Show resolved
Hide resolved
…license-enforcement
x-pack/plugin/core/src/main/java/org/elasticsearch/license/XPackLicenseState.java
Outdated
Show resolved
Hide resolved
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/session/EsqlLicenseChecker.java
Show resolved
Hide resolved
smalyshev
approved these changes
Dec 11, 2024
smalyshev
reviewed
Dec 11, 2024
x-pack/plugin/core/src/main/java/org/elasticsearch/license/XPackLicenseState.java
Show resolved
Hide resolved
pawankartik-elastic
approved these changes
Dec 11, 2024
Collaborator
💔 Backport failed
You can use sqren/backport to manually backport by running |
quux00
added a commit
to quux00/elasticsearch
that referenced
this pull request
Dec 12, 2024
ES|QL CCS is an enterprise licensed feature. This PR enforces that no ES|QL CCS query
can proceed unless a valid enterprise or trial license is present on the querying cluster.
If a valid license is not present a 400 Bad Request error is returned explaining that an enterprise
license is needed and showing what license (if any) was found.
If a valid license is found, then the license usage timestamp will be updated. Subsequent
calls to the `GET /_license/feature_usage` endpoint will show an entry for `esql-ccs` with
the last timestamp that it was checked and used.
```
{
"features": [
{
"family": null,
"name": "esql-ccs",
"context": null,
"last_used": "2024-12-09T19:54:38.767Z",
"license_level": "enterprise"
}
]
}
```
Contributor
Author
|
Manual backport of this to 8.x (8.18) was done in this PR: #118620 |
quux00
added a commit
that referenced
this pull request
Dec 13, 2024
ES|QL CCS is an enterprise licensed feature. This PR enforces that no ES|QL CCS query
can proceed unless a valid enterprise or trial license is present on the querying cluster.
If a valid license is not present a 400 Bad Request error is returned explaining that an enterprise
license is needed and showing what license (if any) was found.
If a valid license is found, then the license usage timestamp will be updated. Subsequent
calls to the `GET /_license/feature_usage` endpoint will show an entry for `esql-ccs` with
the last timestamp that it was checked and used.
```
{
"features": [
{
"family": null,
"name": "esql-ccs",
"context": null,
"last_used": "2024-12-09T19:54:38.767Z",
"license_level": "enterprise"
}
]
}
```
maxhniebergall
pushed a commit
to maxhniebergall/elasticsearch
that referenced
this pull request
Dec 16, 2024
…c#118620) ES|QL CCS is an enterprise licensed feature. This PR enforces that no ES|QL CCS query can proceed unless a valid enterprise or trial license is present on the querying cluster. If a valid license is not present a 400 Bad Request error is returned explaining that an enterprise license is needed and showing what license (if any) was found. If a valid license is found, then the license usage timestamp will be updated. Subsequent calls to the `GET /_license/feature_usage` endpoint will show an entry for `esql-ccs` with the last timestamp that it was checked and used. ``` { "features": [ { "family": null, "name": "esql-ccs", "context": null, "last_used": "2024-12-09T19:54:38.767Z", "license_level": "enterprise" } ] } ```
maxhniebergall
pushed a commit
to maxhniebergall/elasticsearch
that referenced
this pull request
Dec 16, 2024
…c#118620) ES|QL CCS is an enterprise licensed feature. This PR enforces that no ES|QL CCS query can proceed unless a valid enterprise or trial license is present on the querying cluster. If a valid license is not present a 400 Bad Request error is returned explaining that an enterprise license is needed and showing what license (if any) was found. If a valid license is found, then the license usage timestamp will be updated. Subsequent calls to the `GET /_license/feature_usage` endpoint will show an entry for `esql-ccs` with the last timestamp that it was checked and used. ``` { "features": [ { "family": null, "name": "esql-ccs", "context": null, "last_used": "2024-12-09T19:54:38.767Z", "license_level": "enterprise" } ] } ```
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.
ES|QL CCS is an enterprise licensed feature. This PR enforces that no ES|QL CCS query
can proceed unless a valid enterprise or trial license is present on the querying cluster.
If a valid license is not present a 400 Bad Request error is returned explaining that an enterprise
license is needed and showing what license (if any) was found.
If a valid license is found, then the license usage timestamp will be updated. Subsequent
calls to the
GET /_license/feature_usageendpoint will show an entry foresql-ccswiththe last timestamp that it was checked and used.