-
Notifications
You must be signed in to change notification settings - Fork 138
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
Update django-oauth-toolkit #2710
Comments
|
Removing our spec for oauthlib, as it is already a hard dependency of django-oauth-toolkit, and unpinning the later; we have:
With the following updated django-oauth-toolkit dependencies:
|
We have the following incidental updates here:
|
Upon starting our services we have, in rockstor.log (under debug mode):
Likely what we are seeing here is the result of an upstream migrations squash:
Which may (hopefully) render our prior patch re fake applying of 0002_08_updates redundant. |
Referencing our prior encounter with changes in this area, and our adaptation to them:
From the above issue we have @FroggyFlox excellent synopsis:
|
Remove pinning for django-oauth-toolkit and remove explicit declaration of oauthlib as it is a dependency of django-oauth-toolkit. Re-address prior work-around for older oauth2_provider migration file silently failing to apply and holding up all subsequent oauth2_provider migrations, as this migration file, and a few subsequent ones, have now been squashed upstream. "oauth2_provider" is part of django-oauth-toolkit. Added dev logging for before/after our migration in this area.
As from Django Oauth Toolkit 2.x onwards, Oauth app client_secret is hashed within dd, dictating that we can no longer source this secret from the db for our internal cli client app token requests. Move to establishing a dynamic Oathapp client_secret, established in settings.py, and reset by rockstor-bootstrap.service. # Includes - Adding a requests timeouts to client token requests. - Arbitrary fsting application. - Update disk, pool, share, snap state every 20s not every minute. - Abandon bootstrap after 10, not 15 attempts.
Note that this issue is also related to our recent move to Py3.9 as we have from:
|
https://django-oauth-toolkit.readthedocs.io/en/latest/changelog.html#id49
|
Remove pinning for django-oauth-toolkit and remove explicit declaration of oauthlib as it is a dependency of django-oauth-toolkit. Re-address prior work-around for older oauth2_provider migration file silently failing to apply, and holding up all subsequent oauth2_provider migrations, as this migration file, and a few subsequent ones, have now been squashed upstream. "oauth2_provider" is part of django-oauth-toolkit. # Includes: - Added logging for before & after django-oauth-toolkit migration. - Adopt dynamic client_secret for internal Oauth app. As from Django Oauth Toolkit 2.x onwards, Oauth app client_secret is hashed within Django's database, dictating that we can no longer source this secret from the db for our internal cli client app token requests. Move to establishing a dynamic Oathapp client_secret, established in settings.py, and reset by rockstor-bootstrap.service, i.e. on each service restart/reboot. - Adding a requests timeouts to client token requests. - Arbitrary fsting application. - Update disk, pool, share, snap state every 20s not every minute. - Abandon rockstor-bootstrap.service start (boostrap scritp) after 10, not 15 attempts.
Our current pinning relates to a now defunct Django and Python constraint. It is proposed that we remove this pinning as from the projects PyPi page (below) we can now use the latest available.
PyPi: https://pypi.org/project/django-oauth-toolkit/
Changelog: https://github.com/jazzband/django-oauth-toolkit/blob/master/CHANGELOG.md
The Changelog notes a number of breaking changes between our current version and the latest.
A likely related pinning that should be addressed also within this issue.
The text was updated successfully, but these errors were encountered: