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

Clean up JWT_VERIFY_AUDIENCE and AUDIENCE setting #328

Open
robrap opened this issue Apr 13, 2023 · 2 comments
Open

Clean up JWT_VERIFY_AUDIENCE and AUDIENCE setting #328

robrap opened this issue Apr 13, 2023 · 2 comments

Comments

@robrap
Copy link
Contributor

robrap commented Apr 13, 2023

JWT audience is validated if JWT_VERIFY_AUDIENCE is set to True. See

'verify_aud': settings.JWT_AUTH.get('JWT_VERIFY_AUDIENCE', True),
.

However, since we don't have a strong stance on this, JWT_VERIFY_AUDIENCE is set to False in many places, including in edx.org settings. See https://github.com/search?q=(org%3Aopenedx%20OR%20org%3Aedx)%20JWT_VERIFY_AUDIENCE&type=code

Additionally, in many edx.org settings, the AUDIENCE setting is unnecessarily encrypted, which leads to further confusion.

@robrap robrap changed the title Clean up JWT audience and verification Clean up JWT AUDIENCE and verification Apr 13, 2023
@robrap robrap changed the title Clean up JWT AUDIENCE and verification Clean up JWT_VERIFY_AUDIENCE and AUDIENCE setting Apr 14, 2023
@feanil
Copy link
Contributor

feanil commented May 9, 2023

@robrap what do you mean by "Clean up" here. Should this setting be removed or should we be updating everything so that it defaults to true? Something else?

Also it sounds like there is a second small task to not encrypt the Audience data in the JWT? How would that work, isn't the Audience a part of the payload?

@robrap
Copy link
Contributor Author

robrap commented May 9, 2023

  1. First, we should have some sort of stance. Maybe this is an org level decision, but I wish someone could explain why audience verification helps. This article states that you should verify all of these optimal claims, but I don’t get what it buys you if the signature either is ok or is not? See https://www.pingidentity.com/en/resources/blog/post/jwt-security-nobody-talks-about.html#:~:text=Similarly%2C%20their%20presence%20must%20be,functions%20to%20verify%20these%20claims
  2. Audience is not encrypted in the payload. It is just encrypted in some 2U config.

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

No branches or pull requests

2 participants