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

Spar re-login deleted sso users; fix handling of brig errors. #588

Merged
merged 7 commits into from
Jan 24, 2019

Conversation

fisx
Copy link
Contributor

@fisx fisx commented Jan 23, 2019

No description provided.

@fisx fisx force-pushed the spar-relogin-deleted-sso-users branch from a97d72d to 87d9e2f Compare January 23, 2019 11:34
@neongreen
Copy link
Contributor

Ping when this can be reviewed

@fisx fisx force-pushed the spar-relogin-deleted-sso-users branch from 87d9e2f to dbffd78 Compare January 23, 2019 16:55
@fisx
Copy link
Contributor Author

fisx commented Jan 23, 2019

i'm actually not sure what to do with the intra calls to brig if they do not return 2xx. i'll think about it some more tomorrow.

@fisx fisx changed the title [WIP] Spar re-login deleted sso users; fix handling of brig errors. Spar re-login deleted sso users; fix handling of brig errors. Jan 24, 2019
@fisx fisx force-pushed the spar-relogin-deleted-sso-users branch from dbffd78 to ba9a458 Compare January 24, 2019 12:24
@fisx
Copy link
Contributor Author

fisx commented Jan 24, 2019

ping @neongreen

all integration tests pass locally.

@@ -269,9 +269,12 @@ verdictHandlerResult bindCky = catchVerdictErrors . \case
| uid == uid' -> pure uid -- redundant binding (no change to brig or spar)
| otherwise -> throwSpar SparBindUserRefTaken -- attempt to use ssoid for a second wire user

cky :: SetCookie <- Intra.ssoLogin uid
SAML.logger SAML.Debug (show uid)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to have a message here as well, not just a lonely UUID

@@ -93,6 +94,8 @@ sparToWaiError (SAML.CustomError SparNoBodyInBrigResponse) = Righ
sparToWaiError (SAML.CustomError (SparCouldNotParseBrigResponse msg)) = Right $ Wai.Error status502 "bad-upstream" ("Could not parse response body: " <> msg)
sparToWaiError (SAML.CustomError (SparBrigError msg)) = Right $ Wai.Error status500 "bad-upstream" msg
-- Galley-specific errors
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line should be deleted


-- second login

liftIO $ threadDelay 1000000
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

100000

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also a comment about "why it's sensible to leave this threadDelay here" will be useful when we both forget in the future.

@fisx fisx merged commit c4fd0cc into develop Jan 24, 2019
@fisx fisx deleted the spar-relogin-deleted-sso-users branch January 24, 2019 15:46
@fisx fisx mentioned this pull request Jan 24, 2019
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 this pull request may close these issues.

None yet

2 participants