-
Notifications
You must be signed in to change notification settings - Fork 16
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
Simplify JWT_ISSUER validation #327
Comments
@robrap the last note here seems to suggest that we would still want to manually verify the issuers because then we could have a list of valid issuers? Is that right or is there a way to do this with the underlying JWT library? |
@feanil: One possibility is to run through the list and pull out the issuer and audience and keys for each item and use the libary's validation. If it works, success. If not, move on to the next one. This is basically what the old ecommerce decoder did. In the past, we were trying to get down to a single issuer to make it clear that LMS should be the only identity provider. However, while we may want a single identity provider, we might need a list to migrate to a new provider in the future. Also note that |
Ideally we would set `verify_iss' to True on this line:
edx-drf-extensions/edx_rest_framework_extensions/auth/jwt/decoder.py
Line 261 in ae7416f
This would be in place of the manual verification done across all the JWT_ISSUERS, using this code (which could be removed):
edx-drf-extensions/edx_rest_framework_extensions/auth/jwt/decoder.py
Lines 275 to 291 in ae7416f
Note: this code could be removed once monitoring proves out that
jwt_auth_issuer_verification
always has a value ofmatches-first-issuer
across services, especially including ecommerce and discovery, which still have add settings.Note: Last discussed, it seemed to make sense the JWT_ISSUERS would remain a list, just in case we want to expand again in the future for rotating or moving.
The text was updated successfully, but these errors were encountered: