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

google-common: Catch and return JWT errors #2788

Merged
merged 1 commit into from
Dec 23, 2021

Conversation

balagez
Copy link
Contributor

@balagez balagez commented Dec 2, 2021

The generateJwt method (or rather, the underlying library) might throw an exception which is unhandled and makes the streams that require authentication fail without anything logged and any way to recover.

This can be reproduced by simply changing the private key to something invalid, like adding a few extra characters, in this case a java.security.InvalidKeyException is thrown.

This PR aims to catch the exception and return it in the Future so that the downstream can properly handle it.

Copy link
Member

@ennru ennru left a comment

Choose a reason for hiding this comment

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

LGTM.

@ennru ennru merged commit 78ac7e7 into akka:master Dec 23, 2021
@ennru
Copy link
Member

ennru commented Dec 23, 2021

Thank you!

@balagez balagez deleted the google-common-jwt-errors branch December 29, 2021 01:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants