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

License checked assumes license UIDs are hex encoded #11640

Closed
tsg opened this issue Apr 4, 2019 · 3 comments
Closed

License checked assumes license UIDs are hex encoded #11640

tsg opened this issue Apr 4, 2019 · 3 comments
Assignees
Labels

Comments

@tsg
Copy link
Collaborator

@tsg tsg commented Apr 4, 2019

When running Beats master or 6.7.0 against one of our test clusters, we got an error like this one:

could not extract license information from the server response: encoding/hex: invalid byte: U+0074 't']

We've tracked it down to the fact that the license.uid in our development license contains a t character, so it's not valid hex. From what I understand, real customer licenses don't have these issue, and should only be hex, but it's probably better to just treat it as a string, to avoid such issues in the future.

@tsg tsg added libbeat bug labels Apr 4, 2019
@tsg

This comment has been minimized.

Copy link
Collaborator Author

@tsg tsg commented Apr 4, 2019

@ph

This comment has been minimized.

Copy link
Member

@ph ph commented Apr 4, 2019

@tsg does that mean the test cluster in question don't have a valid license?

@ph ph self-assigned this Apr 4, 2019
ph added a commit to ph/beats that referenced this issue Apr 4, 2019
There are some case where the license UUID is a valid license but not a
valid UUID.

Fixes: elastic#11640
@ph ph closed this in #11649 Apr 4, 2019
ph added a commit that referenced this issue Apr 4, 2019
…its system. (#11649)

- Relax validation of the X-Pack license UID value.
- Fix a parsing error with the X-Pack license check on 32-bit system. 

Fixes: #11640
Fixes: #11650
ph added a commit to ph/beats that referenced this issue Apr 4, 2019
…its system. (elastic#11649)

- Relax validation of the X-Pack license UID value.
- Fix a parsing error with the X-Pack license check on 32-bit system. 

Fixes: elastic#11640
Fixes: elastic#11650
(cherry picked from commit 4b7823b)
ph added a commit to ph/beats that referenced this issue Apr 4, 2019
…its system. (elastic#11649)

- Relax validation of the X-Pack license UID value.
- Fix a parsing error with the X-Pack license check on 32-bit system. 

Fixes: elastic#11640
Fixes: elastic#11650
(cherry picked from commit 4b7823b)
ph added a commit that referenced this issue Apr 4, 2019
…ense UUID and check on 32 bits system. (#11657)

* Fixes license check issue with invalid license UUID and check on 32 bits system. (#11649)

- Relax validation of the X-Pack license UID value.
- Fix a parsing error with the X-Pack license check on 32-bit system. 

Fixes: #11640
Fixes: #11650
(cherry picked from commit 4b7823b)
ph added a commit that referenced this issue Apr 8, 2019
…ense UUID and check on 32 bits system. (#11658)

Cherry-pick of PR #11649 to 6.7 branch. Original message: 

- Relax validation of the X-Pack license UID value.
- Fix a parsing error with the X-Pack license check on 32-bit system. 

Fixes: #11640
Fixes: #11650
@nyurik

This comment has been minimized.

Copy link

@nyurik nyurik commented Apr 10, 2019

Would it be possible to use a hex UUID for the platinum license? There are multiple places that check the validity of the license code, so it might be safer to always adhere to a proper hex UUID - e.g. map tile server checks it, and the tile license checker relies on it too. There could be other places that I am not aware of that could also cause issues.

DebashisMondal added a commit to DebashisMondal/beats that referenced this issue May 10, 2019
…its system. (elastic#11649)

- Relax validation of the X-Pack license UID value.
- Fix a parsing error with the X-Pack license check on 32-bit system. 

Fixes: elastic#11640
Fixes: elastic#11650
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.