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

It seems DeleteOpenIDConnectSession is never called? #538

Closed
mitar opened this issue Nov 24, 2020 · 14 comments · Fixed by #634
Closed

It seems DeleteOpenIDConnectSession is never called? #538

mitar opened this issue Nov 24, 2020 · 14 comments · Fixed by #634

Comments

@mitar
Copy link
Contributor

mitar commented Nov 24, 2020

Describe the bug

I see that DeleteOpenIDConnectSession is defined and implemented for in-memory storage, but it is never called. This leads me to think that those session entries are never removed from the storage?

@aeneasr
Copy link
Member

aeneasr commented Nov 25, 2020

That could be possible!

@mitar
Copy link
Contributor Author

mitar commented May 13, 2021

What to do about this?

@aeneasr
Copy link
Member

aeneasr commented May 17, 2021

It's probably being used in Ory Hydra

@mitar
Copy link
Contributor Author

mitar commented May 17, 2021

I searched in Hydra and I could not find it being used except in tests. :-)

@aeneasr
Copy link
Member

aeneasr commented May 18, 2021

Ah then I guess we can omit it here :)

@mitar
Copy link
Contributor Author

mitar commented May 18, 2021

But does this mean sessions are never cleared? :-)

@aeneasr
Copy link
Member

aeneasr commented May 20, 2021

Looks like it! Not sure if it makes sense to delete the rows though as it contains info required for refreshing the oidc session

@mitar
Copy link
Contributor Author

mitar commented May 20, 2021

So should we just delete this from the interface (and I can remove it from Hydra tests, too) and then if at a later time see we need some cleanup, we add things at that time, whatever is needed?

@aeneasr
Copy link
Member

aeneasr commented May 24, 2021

Hm, since it’s a breaking change and there’s no downside in keeping it I’m not sure if it’s worth to remove it.

@mitar
Copy link
Contributor Author

mitar commented May 24, 2021

How it is a breaking change? If we remove it from the interface, all existing implementations will still be valid implementations of the interface. Only that code might have around an extra function nobody will ever call.

I can leave it in Hydra if you want. But removing it from the interface here would make it easier for developers of Fosite stores to know that to (or not to) implement.

@aeneasr
Copy link
Member

aeneasr commented May 25, 2021

It’s possible that someone (e.g. Hydra) relies on the interface method being available (https://github.com/ory/hydra/search?q=DeleteOpenIDConnectSession&type=) so removing it is a breaking change!

@mitar
Copy link
Contributor Author

mitar commented May 25, 2021

Hm, only if you are passing the interface and not concrete type, sure. But otherwise code still keeps the implementation.

Hydra does not rely on it.

@mitar
Copy link
Contributor Author

mitar commented May 25, 2021

Maybe we can just then in documentation mentioned, that it is not really used and is deprecated?

@aeneasr
Copy link
Member

aeneasr commented May 27, 2021

SGTM

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 a pull request may close this issue.

2 participants