-
Notifications
You must be signed in to change notification settings - Fork 7
Remove call to map_kv2sid #67
Remove call to map_kv2sid #67
Conversation
|
True, but client_id+state should be unique. |
|
Actually it is up to the client to decide whether the state will be unique (it should but there are no guarantees). In addition some clients may not even use state. This is why I believe we should not rely on state for fetching the sid, since it is not within out control. |
|
Interesting and generally I agree, state would not used as a search key because it's forged client side and it could produce a kind of escalation to get other sessions. I found this weakness in my storage implementation in django-oidc-op, I'd like to go deeper. |
|
@nsklikas im my storage implementation (RDBMS ORM, whatever if MariaDB, sqlite, Postgres...) state is not unique but as you tell us it cannot be used as search key, because a state belonging to a session could collide to another. Actually I get only the last from those are not expired. Please corect me if you see something ambigous or wrong. We have the following flow in oidcendpoint, after a client registration have been done, and Authorization endpoint returns a HTML authentication form with a token and once the user has been authenticated, we have the first query in sso_db that checks if is there a sid linked to the state. Probably we should link together client_id+state+sid or simply client_id+state and not state+sid (@rohe any clue on this?): It didn't find any, so set it: Then it get or set a sid, linked to that state: So, by my point of view, the weakness is the in first query, when sso_db try to get the session quering the state value. I put some kind of remediations, filtering only valid_until sessions, cleaning them on user logout and scheduling an expired sessions cleanup. All this belong to my data handler and oidc-op implementation. |
|
Can't merge, tests still fails |
9bdd99e to
81a2cb6
Compare
|
I think we need to rethink the session handling. Would like to use this PR as input to that work. |
|
A long Road ... Which Will be the concepts and principles to handle, ideally, a persistent session would be the question |
State can't be assumed to be unique ince the client chooses it so we can't use it as an identifier for getting the sid
81a2cb6 to
62fb080
Compare
peppelinux
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ILGTM
we should keep an eye on the branch that Roland have created for the new session model
|
@rohe let's merge this before the new session storage, this latter would be merged on top. Do you think that there Will be conflicts? if It Is so, would this be closed when new session storage Will be merged? |
|
There will probably be conflicts but that can be dealt with then. |
State can't be assumed to be unique since the client chooses it, so we
can't use it as an identifier for getting the sid
In general I don't think don't see a use case for the
map_kv2sidfunction.