Skip to content

Conversation

@albertzaharovits
Copy link
Contributor

@albertzaharovits albertzaharovits commented Dec 4, 2023

This change implements logging if the license verification fails on local nodes
(after the the license has already been (erroneously) published in the cluster state).

This also contains some arguable minor code refactoring that I hope help with code readability.

@albertzaharovits albertzaharovits added WIP :Security/License License functionality for commercial features labels Dec 4, 2023
@albertzaharovits albertzaharovits self-assigned this Dec 4, 2023
@albertzaharovits albertzaharovits changed the title License expiration message Error log when license verification fails locally Dec 4, 2023
@albertzaharovits albertzaharovits marked this pull request as ready for review December 4, 2023 16:11
@albertzaharovits
Copy link
Contributor Author

albertzaharovits commented Dec 4, 2023

Note to reviewers: I recommend reviewing the PR commit-by-commit.
The second one cb3ad2e is probably the only one that might actually fix something.

@elasticsearchmachine elasticsearchmachine added the Team:Security Meta label for security team label Dec 4, 2023
@elasticsearchmachine
Copy link
Collaborator

Hi @albertzaharovits, I've created a changelog YAML for you.

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-security (Team:Security)

Copy link
Contributor

@jakelandis jakelandis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

}

private void maybeRegisterOrUpdateLicense(ClusterState previousClusterState, ClusterState currentClusterState) {
if (XPackPlugin.isReadyForXPackCustomMetadata(currentClusterState) == false) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 to completely remove this whole if block if you choose to ... i started to remove these across the board... but kinda forgot about it: #95428

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, thank you for the indication!
I also wanted to ask about it, but similarly omitted....
I've pushed 0c360c2 .

@albertzaharovits albertzaharovits merged commit 50d6552 into elastic:main Dec 5, 2023
@albertzaharovits albertzaharovits deleted the license-expiration-message branch December 5, 2023 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>bug :Security/License License functionality for commercial features Team:Security Meta label for security team v8.12.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants