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

feat: add optional setting to "ignore" jwt.exceptions.InvalidTokenErrors #317

Merged
merged 1 commit into from
Aug 19, 2024

Conversation

iloveagent57
Copy link
Contributor

@iloveagent57 iloveagent57 commented Aug 19, 2024

We get sporadic instances of this error that we'd prefer to just ignore as to not clutter our monitoring tools.

This can be used by setting RBAC_IGNORE_INVALID_JWT_COOKIE to True in applications that install this library.

@@ -2,4 +2,4 @@
Library to help managing role based access controls for django apps.
"""

__version__ = '1.9.0'
__version__ = '1.9.1'
Copy link

Choose a reason for hiding this comment

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

This should be 1.10.0. It is more than a bug fix.

edx_rbac/utils.py Outdated Show resolved Hide resolved
@iloveagent57 iloveagent57 force-pushed the aed/optionally-ignore-invalid-jwt-cookies branch 4 times, most recently from d818420 to 64900dd Compare August 19, 2024 17:41
Copy link

@robrap robrap left a comment

Choose a reason for hiding this comment

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

Looks good. Minor comments. Thanks.

edx_rbac/utils.py Outdated Show resolved Hide resolved
@iloveagent57 iloveagent57 force-pushed the aed/optionally-ignore-invalid-jwt-cookies branch from 64900dd to a8164f1 Compare August 19, 2024 19:42
…coding JWT cookie

Also, `get_decoded_jwt_from_auth()` is now evaluated first in `utils.get_decoded_jwt()`.
@iloveagent57 iloveagent57 force-pushed the aed/optionally-ignore-invalid-jwt-cookies branch from a8164f1 to 737ebaa Compare August 19, 2024 19:45
@iloveagent57 iloveagent57 merged commit 078fa38 into master Aug 19, 2024
13 checks passed
@iloveagent57 iloveagent57 deleted the aed/optionally-ignore-invalid-jwt-cookies branch August 19, 2024 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants