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

Support Cognito JWT Auth in backend, remove django-oauth-toolkit #3121

Merged
merged 5 commits into from
Jan 27, 2024

Conversation

henrikhorluck
Copy link
Member

@henrikhorluck henrikhorluck commented Jan 26, 2024

  • Remove weird migration dependency
  • Remove shop and inventory aka nibble
  • Remove django-oauth-toolkit and the "new" OIDC-idp
  • Support auth to backend with Cognito JWT

I have verified locally that this does work with vengeful vineyard (with a patch to use Cognito as Identity provider, thus supplying a Cognito-signed JWT), and OWF using our django-oidc-provider IDP in OW4

What this breaks

It breaks all existing uses of the /sso-based OIDC-clients authenticating towards OW4, which should be essentially no-one, since config for that was completely broken for the last couple years, anyways.

This also breaks OAuth2-only uses of the same API, which I think was only used for nibble? Which is no longer in use.

We are going to remove the whole SSO app, which this migration
dependency hinders. I do not see why the dependency should be there in
the first place?
@henrikhorluck henrikhorluck changed the title Support Cognito JWT Auth in backend Support Cognito JWT Auth in backend, remove django-oauth-toolkit Jan 26, 2024
@henrikhorluck henrikhorluck force-pushed the feat/cognito-token-auth branch 3 times, most recently from eb8c7e5 to 689d60b Compare January 26, 2024 23:25
Hinder a later removal of django-oauth-toolkit.

shop = nibble, which is now unused

orderline, transactiopn and usersaldo APIs are essentially unused, some
minor changes to OWF might be warranted since it might use the usersaldo
API
- If the token does not exist do a fallthrough, since other auth might
  accept it.
- If the token is expired, we should fail immediately
- override the `authenticate_header` so that we keep giving 401's
  instead of 403's if tests, even if OidcOAuth2Auth is moved further up
  in the AUTH-classses
Copy link
Contributor

@henrikskog henrikskog left a comment

Choose a reason for hiding this comment

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

Awesome, good job! 🤩 🤩 I trust you in determining when it is ready.

@henrikhorluck henrikhorluck added this pull request to the merge queue Jan 27, 2024
Merged via the queue into main with commit 2e3a652 Jan 27, 2024
8 of 10 checks passed
@henrikhorluck henrikhorluck deleted the feat/cognito-token-auth branch January 27, 2024 18:44
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.

2 participants