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

Database inconsistencies for scim / saml users between spar, brig? #1147

Open
fisx opened this issue Jun 25, 2020 · 1 comment
Open

Database inconsistencies for scim / saml users between spar, brig? #1147

fisx opened this issue Jun 25, 2020 · 1 comment

Comments

@fisx
Copy link
Contributor

fisx commented Jun 25, 2020

In rare cases after production availability issues, you may get 409 conflict responses for creating new users. Searching for those users with curl on brig or on ES will yield no results.

The 409 conflict can have two possible causes:

  1. SAML NameID (externalId in scim, usually email address); symptom: the error message contains the phrase "externalId is already taken".
  2. Wire handle (userName in scim); symptom: error message contains the user handle in the reason phrase.

The first one is more likely. To confirm, talk to spar's cassandra:

$ /opt/cassandra/bin/cqlsh $(hostname -i) | tee table.dump
> select * from spar.user where issuer='<entity id of the IdP>'

Now press <enter> a few times until you've seen the entire output, then:

$ grep $externaiId table.dump

If this doesn't yield anything, you don't have ruled out case 1.

If it does yield one line, you have a user id. If that user doesn't exist in brig, you have confirmed 1.

Work-around:

delete * from spar.user where issuer='<what you entered above>' and sso_id='<what you found above>'

Fix: coming up!

@fisx
Copy link
Contributor Author

fisx commented Jun 25, 2020

New data point on the context in which 409 conflict was received:

  • send a few scim user search and post requests
  • see brig exhaust its cpu and become unresponsive
  • phantom appears

I don't know how to explain this, it seems these events should result in a user record on brig, but not on spar, and not vice versa.

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

No branches or pull requests

1 participant