-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Fix trial license version check #102362
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
Merged
elasticsearchmachine
merged 13 commits into
elastic:main
from
n1v0lg:fix-license-version-check
Nov 29, 2023
Merged
Fix trial license version check #102362
elasticsearchmachine
merged 13 commits into
elastic:main
from
n1v0lg:fix-license-version-check
Nov 29, 2023
Conversation
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
Contributor
Author
|
@elasticmachine update branch |
1 similar comment
Contributor
Author
|
@elasticmachine update branch |
Contributor
Author
|
@elasticmachine update branch bitte |
Contributor
Author
|
@elasticmachine update branch |
Collaborator
|
Pinging @elastic/es-security (Team:Security) |
Contributor
Author
|
@elasticmachine update branch |
gwbrown
approved these changes
Nov 28, 2023
Contributor
gwbrown
left a comment
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.
Thanks for fixing and simplifying this!
Contributor
Author
|
@elasticmachine update branch |
timgrein
pushed a commit
to timgrein/elasticsearch
that referenced
this pull request
Nov 30, 2023
This PR fixes the version check we perform to determine if a new trial can be started. For trial licenses, elastic#100169 decoupled version tracking from the Elasticsearch version. In short, the new logic is to allow a new trial license each time we increment the trial license version counter (with some additional caveats around BWC). This means we should allow a new trial license if the version the previous trial was started on is _below_ the `CURRENT` version. This condition was previously reversed. This PR fixes the check. I've also opted to restrict `ableToStartNewTrial` to not take arbitrary input and instead to always compare to `CURRENT`. This allows us to avoid the unnecessary complexity of handling a BWC edge case where both trial versions are below the cut-over value (this is impossible in practice). Fixes: elastic#102286
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
auto-merge-without-approval
Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!)
>non-issue
:Security/License
License functionality for commercial features
Team:Security
Meta label for security team
v8.12.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.
This PR fixes the version check we perform to determine if a new trial can be started.
For trial licenses, #100169 decoupled version tracking from the Elasticsearch version. In short, the new logic is to allow a new trial license each time we increment the trial license version counter (with some additional caveats around BWC). This means we should allow a new trial license if the version the previous trial was started on is below the
CURRENTversion. This condition was previously reversed. This PR fixes the check.I've also opted to restrict
ableToStartNewTrialto not take arbitrary input and instead to always compare toCURRENT. This allows us to avoid the unnecessary complexity of handling a BWC edge case where both trial versions are below the cut-over value (this is impossible in practice).Fixes: #102286