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

[Fleet] Improve error handling for invalid base64 token #3056

Merged
merged 2 commits into from
Oct 24, 2023

Conversation

nchaulet
Copy link
Member

@nchaulet nchaulet commented Oct 24, 2023

Description

Resolve #3046

Improve error handling when enrollemnt token or api key during checkin is not a valid base64 token, and return a 400 instead of a 500.

This is covered by a new unit test

@nchaulet nchaulet added bug Something isn't working Team:Fleet Label for the Fleet team labels Oct 24, 2023
@nchaulet nchaulet self-assigned this Oct 24, 2023
@nchaulet nchaulet requested a review from a team as a code owner October 24, 2023 17:12
Copy link
Member

@kpollich kpollich left a comment

Choose a reason for hiding this comment

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

Incredibly impactful for a small change, thank for taking care of this 🚀

@nchaulet nchaulet enabled auto-merge (squash) October 24, 2023 18:24
@elastic-sonarqube
Copy link

@nchaulet nchaulet merged commit 407dc9c into main Oct 24, 2023
9 checks passed
@nchaulet nchaulet deleted the feature-fix-err-handling-invalidbase64 branch October 24, 2023 18:49
@jlind23
Copy link
Contributor

jlind23 commented Oct 25, 2023

@nchaulet @kpollich Shouldn't we backport this to 8.11 too?

@nchaulet
Copy link
Member Author

@nchaulet @kpollich Shouldn't we backport this to 8.11 too?

Yes we should probably it seems not risky

@nchaulet nchaulet added the backport-v8.11.0 Automated backport with mergify label Oct 25, 2023
mergify bot pushed a commit that referenced this pull request Oct 25, 2023
mergify bot added a commit that referenced this pull request Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v8.11.0 Automated backport with mergify bug Something isn't working Team:Fleet Label for the Fleet team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Supplying a faulty enrollment token results in an http 500 instead of a 400
3 participants