providers/oauth2: fix clean_expired_models failing - #15687
Conversation
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
✅ Deploy Preview for authentik-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for authentik-storybook canceled.
|
✅ Deploy Preview for authentik-integrations canceled.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #15687 +/- ##
=======================================
Coverage 93.17% 93.18%
=======================================
Files 831 831
Lines 44161 44161
=======================================
+ Hits 41149 41150 +1
+ Misses 3012 3011 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
authentik PR Installation instructions Instructions for docker-composeAdd the following block to your AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-f7c9b97dd538c05219e2e16eb350814c0fce622e
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)sAfterwards, run the upgrade commands from the latest release notes. Instructions for KubernetesAdd the following block to your authentik:
outposts:
container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
global:
image:
repository: ghcr.io/goauthentik/dev-server
tag: gh-f7c9b97dd538c05219e2e16eb350814c0fce622eAfterwards, run the upgrade commands from the latest release notes. |
|
Actually, the session field on the AccessToken might be null at that point, no? |
| AccessToken.objects.filter( | ||
| user=instance.user, | ||
| session__session__session_key=instance.session.session_key, | ||
| session__session__session_key=instance.pk, |
There was a problem hiding this comment.
So this change should be fine, but we might need to also update the backchannel stuff that was added in the meantime.
One thing that is weird to me, is that the session field is marked as cascade on delete for AccessTokens, so that should happen automatically I think?
Details
In this signal we were accessing the relation which at that point might've been deleted already, but we can use the PK
Checklist
ak test authentik/)make lint-fix)If an API change has been made
make gen-build)If changes to the frontend have been made
make web)If applicable
make docs)