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

Put License API can return HTTP 500 #79093

Merged
merged 12 commits into from
Oct 21, 2021

Conversation

justincr-elastic
Copy link
Contributor

License.fromXContent used to throw ElasticsearchException.
ExceptionsHelper.status mapped that to HTTP 500.

License.fromXContent now throws ElasticsearchParseException.
ExceptionsHelper.status maps that to HTTP 400.

Added LicenseIT.testPutInvalidTrialLicense to test with
truncated license signature.

Closes #74058

License.fromXContent used to throw ElasticsearchException.
ExceptionsHelper.status mapped that to HTTP 500.

License.fromXContent now throws ElasticsearchParseException.
ExceptionsHelper.status maps that to HTTP 400.

Added LicenseIT.testPutInvalidTrialLicense to test with
truncated license signature.

Closes elastic#74058
@elasticmachine
Copy link
Collaborator

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

@justincr-elastic justincr-elastic added v8.0.0 auto-backport Automatically create backport pull requests when merged labels Oct 13, 2021
License.fromXContent used to throw ElasticsearchException.
ExceptionsHelper.status mapped that to HTTP 500.

License.fromXContent now throws ElasticsearchParseException.
ExceptionsHelper.status maps that to HTTP 400.

Added LicenseIT.testPutInvalidTrialLicense to test with
truncated license signature.

Closes elastic#74058
License.fromXContent used to throw ElasticsearchException.
ExceptionsHelper.status mapped that to HTTP 500.

License.fromXContent now throws ElasticsearchParseException.
ExceptionsHelper.status maps that to HTTP 400.

Added LicenseIT.testPutInvalidTrialLicense to test with
truncated license signature.

Closes elastic#74058
@justincr-elastic justincr-elastic added v7.15.2 :Security/License License functionality for commercial features labels Oct 13, 2021
@jkakavas jkakavas removed their request for review October 18, 2021 07:18
@justincr-elastic
Copy link
Contributor Author

@elasticmachine update branch

@justincr-elastic justincr-elastic requested review from tvernum and removed request for danhermann, ywangd and albertzaharovits October 20, 2021 20:26
Copy link
Contributor

@tvernum tvernum left a comment

Choose a reason for hiding this comment

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

LGTM

@justincr-elastic justincr-elastic merged commit 3724fea into elastic:master Oct 21, 2021
lockewritesdocs pushed a commit to lockewritesdocs/elasticsearch that referenced this pull request Oct 28, 2021
* Put License API can return HTTP 500

Put License now returns HTTP 400 if parsing user input fails, such as Base64 encoding or invalid signature.

Closes elastic#74058
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Automatically create backport pull requests when merged >bug :Security/License License functionality for commercial features Team:Security Meta label for security team v7.15.2 v7.16.0 v8.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Put License API can return 500
5 participants