Skip to content
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

Revert to Basic license when license is deleted #45022

Closed
polyfractal opened this issue Jul 30, 2019 · 4 comments · Fixed by #52407
Closed

Revert to Basic license when license is deleted #45022

polyfractal opened this issue Jul 30, 2019 · 4 comments · Fixed by #52407
Assignees
Labels
:Security/License License functionality for commercial features

Comments

@polyfractal
Copy link
Contributor

Now that the XPack distribution comes pre-configured with a free Basic license, we should probably revert to Basic if the current license is ever deleted (and just no-op if the current license is already Basic). Today, deleting the license will put the cluster into an unlicensed, non-active mode which seems strange since it the premise of the XPack distribution is that you'll always have at least Basic.

This is probably just a hold-over from when XPack was a separate plugin.

As a nice side-effect, this means all Basic+ features no longer need license status checks since it would be impossible for them to ever be running in a non-licensed environment.

@polyfractal polyfractal added the :Security/License License functionality for commercial features label Jul 30, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-security

@ywangd
Copy link
Member

ywangd commented Feb 13, 2020

The change for removal behaviour itself is straightforward. But discussion could be needed for how we handle backwards compatibility. Existing clusters with deleted license already have a "tombstone" license that grants "MISSING" operation mode. When they upgrade, how do we handle these licenses? I can think of following options:

  1. Do nothing. User can either start basic or delete the license again to get a basic license.
  2. Change the code to grant "BASIC" operation mode for tombstone license. For get license API call, to avoid returning empty result, we could either return the tombstone license or a static basic license so it does not look too funny.
  3. Auto-upgrade the tombstone license on cluster startup time to a basic license. The goal is gradually remove tombstone license entirely so that no special handling is required. Currently it is serialised as either null or false. This will no longer be necessary.

I personally prefer option 1 because 1) this change is more for fixing the removal behaviour; 2) there are ways for existing cluster to get a basic license; 3) the auto-upgrade does not really gain much in terms of functionality. Maybe we could let tombstone grant "BASIC" operation mode. But other than that, there does not seem to be much value.

@tvernum
Copy link
Contributor

tvernum commented Feb 14, 2020

I favour option 1.

If, as a result of this change, we reduce the number of license checks that we do on Basic features, and that means that some functionality starts to work on MISSING licenses, I think that's OK.

@ywangd
Copy link
Member

ywangd commented Feb 14, 2020

Do you want "reduce the number of license checks" as part of this change or a follow-up?

ywangd added a commit that referenced this issue Feb 21, 2020
A new basic license will be generated when existing license is deleted.
In addition, deleting an existing basic license is a no-op.

Resolves: #45022
ywangd added a commit to ywangd/elasticsearch that referenced this issue Feb 23, 2020
A new basic license will be generated when existing license is deleted.
In addition, deleting an existing basic license is a no-op.

Resolves: elastic#45022
ywangd added a commit that referenced this issue Feb 24, 2020
A new basic license will be generated when existing license is deleted.
In addition, deleting an existing basic license is a no-op.

Resolves: #45022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Security/License License functionality for commercial features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants