question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Same "sync" user credentials across facilities cause sync to fail

See original GitHub issue

Observed behavior

Have two facilities with the same admin credentials on a server. Was attempting to import facilities on two different devices using kolibri manage sync...

The sync was always failing on the 2nd device with this error -

requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: http://192.168.1.69:8080/api/morango/v1/certificates/

After a lot of permutations and combinations realised that setting different passwords for each of the admin users allowed the sync to complete successfully on each device.

Expected behavior

The sync should have worked even with the same user credentials across facilities since the sync command differentiates the users with a --facility <facilityid>

User-facing consequences

Confusion and anxiety as user has no way to know what is wrong and what is the cause of the error.

Errors and logs

Error message following a large exception dump -

requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: http://192.168.1.69:8080/api/morango/v1/certificates/

Steps to reproduce

  1. Create two facilities.
  2. Add a admin user in each of the facilities with exactly the same username and password - admin / password.
  3. On another device try importing the two facilities using kolibri manage sync --baseurl <source device ip/domain> --facility <facilityid[1,2]> --username admin --password password --no-push --noninteractive command.
  4. The import shall most likely fail for the second attempt.
  5. Now change password of the admin user of the facility for which the sync is failing.
  6. Stop Kolibri, remove the KOLIBRI_HOME folder and start Kolibri.
  7. Reattempt the sync for both the facilities.
  8. Now the sync shall work for both facilities.

Context

Kolibi 0.14.3

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
intelliant01commented, Oct 9, 2020

@jonboiser more than the need of clearing a morango table, to me it seems a case of acknowledging the fact that the 2nd sync attemtping admin user is a unique one based on its facility id and issue a new certificate. Once a certificate is issued, the credentials (username and password) will no longer matter.

0reactions
pateljj04commented, Oct 10, 2020

In addition, doing some more testing, if I set up the device as a new facility after deprovision, instead of doing an import facility, when I go to import a facility it doesn’t import the new facility (hope that makes sense)

Read more comments on GitHub >

github_iconTop Results From Across the Web

One or more objects don't sync when using the Azure Active ...
Describes an issue in which one or more AD DS object attributes don't sync to Azure AD through the Azure Active Directory Sync...
Read more >
How to resolve accounts that fail to sync from Salesforce to ...
To confirm the sync failure is due to this conflict · In Admin Center, check the matching criteria. · Find the account ID...
Read more >
Troubleshoot Password Sync - Google Workspace Admin Help
If some users' passwords aren't synchronized, make sure: You have installed Password Sync successfully on all of your domain's Microsoft Active Directory ...
Read more >
Okta AD Password Sync: Delegated vs. Federated
Okta can Sync Passwords from Okta to Active Directory. This is typically to support a use case where the administrator wants Okta to...
Read more >
Synchronizing Users and Admins into Duo from Active Directory
Before executing any Active Directory synchronization with Duo, understand the effect that synchronization can have on accounts with the same ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found