-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
chore!: replace pyjwkest with PyJWT #31829
Conversation
…uthlib' into iamsobanjaved/replace-pyjwkest-authlib
@@ -4303,7 +4303,7 @@ def _make_locale_paths(settings): # pylint: disable=missing-function-docstring | |||
CREDIT_TASK_MAX_RETRIES = 5 | |||
|
|||
# Dummy secret key for dev/test | |||
SECRET_KEY = 'dev key' | |||
SECRET_KEY = 'dev-key' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this change isn't a blocker, it will be reverted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does PyJWT forbid the underscore for some reason?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made this change early in the process but will be reverted in the next commit as it isn't needed anymore. PyJWT doesn't base64 encode if we create PyJWK and then use that for signing the token, so added that manually here in this line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see. Hmm. So we won't need to change SECRET_KEY
in configs, right?
It looks like p, q, and the other optional values are for performance optimization. If you back out the changes to My only concern is that I don't know how significant the performance impact is. However, I notice that |
After some discussion, the approaches I see:
At this point I'm favoring option 2 because it entails the least amount of new code. |
This doesn't actually work with pyjwkest, but will with PyJWT. It was intended for use with #31829 but it won't actually be usable until after the upgrade.
The keys for stage, prod, and edge (though not sandbox) have been enhanced by the new https://github.com/openedx/edx-platform/blob/master/scripts/jwk-precompute-params.py script, which means we can now move forward with this work. Could you run the old signing key through that script? See openedx/edx-drf-extensions#337 for a formatting suggestion that allows easier inspection and copy/paste of JSON. Also, could you change the commit and PR commit type to |
b90a927
to
845dbac
Compare
Closing this PR in favor of #32270 |
Description
Describe what this pull request changes, and why. Include implications for people using this change.
Design decisions and their rationales should be documented in the repo (docstring / ADR), per
OEP-19, and can be
linked here.
Useful information to include:
"Developer", and "Operator".
changes.
Supporting information
Link to other information about the change, such as Jira issues, GitHub issues, or Discourse discussions.
Be sure to check they are publicly readable, or if not, repeat the information here.
Testing instructions
Please provide detailed step-by-step instructions for testing this change.
Deadline
"None" if there's no rush, or provide a specific date or event (and reason) if there is one.
Other information
Include anything else that will help reviewers and consumers understand the change.