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

Sessions are not cleaned up when using bolt db #126

Open
maragunde93 opened this issue Apr 30, 2024 · 0 comments
Open

Sessions are not cleaned up when using bolt db #126

maragunde93 opened this issue Apr 30, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@maragunde93
Copy link

Is this a bug report or feature request?

  • Bug Report

Describe the bug

We have and old version of oidc-authservice but I still think this bug happens on the current version, please read through it.

We faced multiple disruptions because of the bolt db size keeps increasing, as these are sessions that expires one would expect that the size of it is kind of constant.

When I started checking the code I saw that there is a process that should clean the sessions, I keep debuging this and realized that some data of the sessions had an expiratio date after 60 years from now. Finally after a lot of troubleshooting and debugging I found that this line is wrong (at least for my tests I am not an expert on go): https://github.com/arrikto/oidc-authservice/blob/master/sessions/state.go#L52

image

time.minute is a constant that returns 1 minute in nano seconds:
image

As the MaxAge is expected to be in seconds the result is totally different from 20 minutes.

How to Reproduce
Save sessions on bolt db
verify the expiration date of the sessions

Expected behavior

Sessions should be cleaned up

@maragunde93 maragunde93 added the bug Something isn't working label Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant