-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Generate/load pickle key on SSO #29568
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
Conversation
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.
Would be good to reuse code rather than duplicate it, especially as the other codepath has helpful logging. Please extract the code from setLoggedIn
into a method which both code paths can share.
Just done that, to avoid different behaviours, |
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.
Looks sane to me other than the prettier
fail
Signed-off-by: Julien CLEMENT <[email protected]>
In lifecycle, no pickle key seems to be ever created when logging in through SSO since the pickle key creation is done in
setLoggedIn
which is not called afterattemptDelegatedAuthLogin
. Thus when using SSO login, the indexed DB will be stored in plaintext on disk.This aims to try to generate and load a pickle key in
onSuccessfulDelegatedAuthLogin
.Testing strategy:
keytar
I am still unsure on how to write unit tests about this as the OIDC native flow tests all seems to call
setLoggedIn
manually but I do not think that this code is actually reachable in the actual app when doing SSO, onlydoSetLoggedIn
is.I would like to take feedbacks on this before making significant changes to tests I did not write and may not understand completely.