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

G Suite sync fails unexpectedly #21

Closed
darkyat opened this issue Jun 11, 2019 · 8 comments
Closed

G Suite sync fails unexpectedly #21

darkyat opened this issue Jun 11, 2019 · 8 comments
Labels

Comments

@darkyat
Copy link

darkyat commented Jun 11, 2019

Hi,

I have tried to sync with G Suite using both App and CLI but wasn't successful either way.

CLI responds with:
[object Object]

App responds with:
An unexpected error has occurred.

The app.log just says:

[2019-06-11 15:57:06.611] [info] Querying users - nextPageToken:null
[2019-06-11 15:57:07.214] [info] Querying deleted users - nextPageToken:null
[2019-06-11 15:57:09.646] [info] Querying users - nextPageToken:null
[2019-06-11 15:57:10.190] [info] Querying deleted users - nextPageToken:null

I have tried using two different Bitwarden user which had either Admin or Owner permission. bwdc test prints the list of users just fine.

I don't have any hint at where it breaks right now and I might compile and debug it more later today. Any help is appreciated though, as always.

Thanks!

@kspearrin
Copy link
Member

Could you share what settings you are using?

@darkyat
Copy link
Author

darkyat commented Jun 11, 2019

Could you share what settings you are using?

Sure!

{
  "installedVersion": "2.6.0",
  "environmentUrls": {
    "base": "REDACTED",
    "api": null,
    "identity": null,
    "webVault": null,
    "icons": null,
    "notifications": null
  },
  "appId": "REDACTED",
  "accessToken": "REDACTED",
  "refreshToken": "REDACTED",
  "userEmail": "REDACTED",
  "userId": "REDACTED",
  "kdf": 0,
  "kdfIterations": 100000,
  "directoryType": 2,
  "directoryConfig_0": {
    "ssl": false,
    "sslAllowUnauthorized": false,
    "port": 389,
    "currentUser": false,
    "ad": true,
    "password": null
  },
  "directoryConfig_2": {
    "privateKey": "[STORED SECURELY]",
    "domain": "REDACTED",
    "adminUser": "REDACTED",
    "clientEmail": "REDACTED"
  },
  "directoryConfig_1": {
    "key": null
  },
  "directoryConfig_3": {
    "token": null
  },
  "syncConfig": {
    "users": true,
    "groups": false,
    "interval": 5,
    "removeDisabled": false,
    "overwriteExisting": false,
    "useEmailPrefixSuffix": false,
    "creationDateAttribute": "whenCreated",
    "revisionDateAttribute": "whenChanged",
    "emailPrefixAttribute": "sAMAccountName",
    "memberAttribute": "member",
    "userObjectClass": "person",
    "groupObjectClass": "group",
    "userEmailAttribute": "mail",
    "groupNameAttribute": "name",
    "groupPath": "CN=Users",
    "userPath": "CN=Users",
    "userFilter": "exclude:REDACTED"
  },
  "organizationId": "REDACTED"
}

The only thing I realized, looking at your latest commits is that I keep the Customer Id empty but retrieving users from G Suite works just fine, just storing them to bitwarden seems to fail?

@kspearrin
Copy link
Member

So a test succeeds in returning a list of users, but the sync with the server fails?

@darkyat
Copy link
Author

darkyat commented Jun 11, 2019

Yup, exactly. The server is running Version 2.10.1 in case that matters.

@kspearrin
Copy link
Member

Does the network tab under dev tools show the call to the server?

@darkyat
Copy link
Author

darkyat commented Jun 11, 2019

I think you got me on the right track here. I just checked the logs on the server side of things, and it seems the culprit is on the receiving end rather than the connector:

[2019-06-11 14:11:25][rocket::rocket][INFO] POST /api/organizations/<REDACTED>/import application/json; charset=utf-8:
[2019-06-11 14:11:25][_][ERROR] No matching routes for POST /api/organizations/<REDACTED>/import application/json; charset=utf-8.
[2019-06-11 14:11:25][_][WARN] Responding with 404 Not Found catcher.
[2019-06-11 14:11:25][_][WARN] Data left unread. Force closing network stream.
[2019-06-11 14:11:25][_][INFO] Response succeeded.

@kspearrin
Copy link
Member

Does the org id you configured exist?

  "organizationId": "REDACTED"

@bitwarden-bot
Copy link

bitwarden-bot commented Apr 12, 2022

Hi @darkyat,
We're cleaning up our repositories in preparation for a major reorganization. Issues from last year will be marked as stale and closed after two weeks. If you still need help, simply clear the label and we'll look into it.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants