OCA / server-auth

https://odoo-community.org/psc-teams/tools-30
GNU Affero General Public License v3.0
146 stars 399 forks source link

[14.0] [FIX] auth_jwt: Unhandled PyJWKClientError in _get_key #626

Closed paradoxxxzero closed 4 months ago

paradoxxxzero commented 4 months ago

This commit https://github.com/OCA/server-auth/commit/5e726ac0084de377a046308d21bf39fa05ad3f4c breaks the next_validator_id loop.

_get_key calls jwks_client.get_signing_key(kid) which can raise PyJWKClientError which is not caught by the validation loop (only catching Unauthorized)

Putting _get_key in the preceding try except fix this problem since it catches all Exception

OCA-git-bot commented 4 months ago

Hi @sbidoul, some modules you are maintaining are being modified, check this out!

sbidoul commented 4 months ago

/ocabot merge patch

@paradoxxxzero do you plan to forward port?

OCA-git-bot commented 4 months ago

On my way to merge this fine PR! Prepared branch 14.0-ocabot-merge-pr-626-by-sbidoul-bump-patch, awaiting test results.

OCA-git-bot commented 4 months ago

Congratulations, your PR was merged at cff6f5fcab610b7438bd863ea02e5eabfcc2a80d. Thanks a lot for contributing to OCA. ❤️