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

identity: fix expired session deletion #3855

Merged
merged 1 commit into from Jan 5, 2023
Merged

Conversation

calebdoxsey
Copy link
Contributor

Summary

I think we were deleting a session when a user refresh failed and then immediately re-adding it. These changes remove the session from the session collection in addition to deleting it so that we don't attempt to refresh these session.

Related issues

Fixes https://github.com/pomerium/internal/issues/1207

Checklist

  • reference any related issues
  • updated unit tests
  • add appropriate tag (improvement / bug / etc)
  • ready for review

@calebdoxsey calebdoxsey added bug Something isn't working backport 0-20-0 labels Jan 5, 2023
@calebdoxsey calebdoxsey requested a review from a team as a code owner January 5, 2023 18:25
@coveralls
Copy link

Coverage Status

Coverage: 62.937% (+0.05%) from 62.883% when pulling d3712e2 on cdoxsey/fix-delete-session into e019885 on main.

@calebdoxsey
Copy link
Contributor Author

Seems to fix the problem:

{"level":"info","config_file_source":"/home/caleb/src/github.com/calebdoxsey/pomerium-notes/2023/01/05/config.json","bootstrap":true,"service":"identity_manager","user_id":"calebdoxsey","session_id":"1fa43a5d-1bd6-4f1c-a2dd-e75f7409bf05","time":"2023-01-05T11:34:42-07:00","message":"refreshing session"}
{"level":"info","config_file_source":"/home/caleb/src/github.com/calebdoxsey/pomerium-notes/2023/01/05/config.json","bootstrap":true,"service":"identity_manager","user_id":"calebdoxsey","session_id":"1fa43a5d-1bd6-4f1c-a2dd-e75f7409bf05","time":"2023-01-05T11:34:42-07:00","message":"deleting expired session"}
{"level":"info","type":"type.googleapis.com/session.Session","id":"1fa43a5d-1bd6-4f1c-a2dd-e75f7409bf05","time":"2023-01-05T11:34:42-07:00","message":"get"}
{"level":"info","record-type":"type.googleapis.com/session.Session","record-id":"1fa43a5d-1bd6-4f1c-a2dd-e75f7409bf05","time":"2023-01-05T11:34:42-07:00","message":"put"}

@calebdoxsey calebdoxsey merged commit 78fc485 into main Jan 5, 2023
@calebdoxsey calebdoxsey deleted the cdoxsey/fix-delete-session branch January 5, 2023 20:48
calebdoxsey added a commit that referenced this pull request Jan 6, 2023
identity: fix expired session deletion (#3855)

Co-authored-by: Caleb Doxsey <cdoxsey@pomerium.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 0-20-0 bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants