-
Notifications
You must be signed in to change notification settings - Fork 25k
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 500 #74058
Labels
>bug
:Security/License
License functionality for commercial features
Team:Security
Meta label for security team
Comments
jkakavas
added
>bug
:Security/License
License functionality for commercial features
needs:triage
Requires assignment of a team area label
labels
Jun 14, 2021
Pinging @elastic/es-security (Team:Security) |
nik9000
added
team-discuss
and removed
needs:triage
Requires assignment of a team area label
labels
Jun 15, 2021
We removed |
justincr-elastic
added a commit
to justincr-elastic/elasticsearch
that referenced
this issue
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
justincr-elastic
added a commit
to justincr-elastic/elasticsearch
that referenced
this issue
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
justincr-elastic
added a commit
to justincr-elastic/elasticsearch
that referenced
this issue
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
justincr-elastic
added a commit
that referenced
this issue
Oct 21, 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 #74058
lockewritesdocs
pushed a commit
to lockewritesdocs/elasticsearch
that referenced
this issue
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
>bug
:Security/License
License functionality for commercial features
Team:Security
Meta label for security team
In cases where the license is malformed, LicenseVerifier might throw an IllegalStateException or some other unexpected Exception, which causes the elasticsearch node to throw a 500.
We could attempt to better catch these types of errors and return an appropriate HTTP status code and a helpful error message or maybe return a PutLicenseResponse with status being
INVALID
Example reproduction :
Using a valid license with it's signature field being truncated/edited
The text was updated successfully, but these errors were encountered: