Skip to content

Automatic Sync of Self-hosting Families Sponsorships doesn't work #5338

@dionysius

Description

@dionysius

Steps To Reproduce

According to https://bitwarden.com/help/families-for-enterprise-self-hosted/ the self-hosted bitwarden needs to comply with several settings laid out on that page.

you'll need to configure your server to allow communication with our cloud systems.

Everything set to EU and cloud communication is enabled:

# environment of a bitwarden service, all services have the same one, XXXX is redacted
root@bitwarden-scsj6:~# xargs -0 -L1 -a /proc/30496/environ | sort
# ...
globalSettings__baseServiceUri__cloudRegion=EU
globalSettings__enableCloudCommunication=true
globalSettings__installation__apiUri=https://api.bitwarden.eu
globalSettings__installation__id=XXXX
globalSettings__installation__identityUri=https://identity.bitwarden.eu
globalSettings__installation__key=XXXX
globalSettings__pushRelayBaseUri=https://push.bitwarden.eu
globalSettings__selfHosted=true
globalSettings__unifiedDeployment=true
# ...

The value for globalSettings__baseServiceUri__cloudRegion must match the data region that was selected when retrieving your Installation ID & Key.

matches

Enabling automatic sync requires communication with Bitwarden's cloud systems. If your environment uses a firewall to block outbound traffic, you will need to allow https://api.bitwarden.com or .eu and https://identity.bitwarden.com or .eu.

Can access those URI's fine:

root@bitwarden-scsj6:~# curl -sSLI https://api.bitwarden.eu | head -n1
HTTP/2 404 
root@bitwarden-scsj6:~# curl -sSLI https://identity.bitwarden.eu | head -n1
HTTP/2 404 

Retrieve billing sync token & Apply billing sync token

Done accordingly

Trigger a sync once you've completed setup. Billing sync will occur once daily, however you can manually trigger a sync at any time.

I can see the sync triggering daily in the logs but no specific output that something failed. Since the sync didn't work the validation of the licence expired:

2025-01-29 00:29:38.035 +00:00 [INF] Starting job SelfHostedSponsorshipSyncJob at "2025-01-29T00:29:38.0350845Z".
2025-01-29 00:29:38.212 +00:00 [INF] Finished job SelfHostedSponsorshipSyncJob at "2025-01-29T00:29:38.2126576Z".
2025-01-29 00:30:00.000 +00:00 [INF] Starting job ValidateOrganizationsJob at "2025-01-29T00:30:00.0002271Z".
2025-01-29 00:30:00.004 +00:00 [INF] Validating licenses for 1 organizations.
2025-01-29 00:30:00.006 +00:00 [INF] Organization "XXXXX" (XXX) has an invalid license and is being disabled. Reason: Invalid data.
2025-01-29 00:30:00.338 +00:00 [INF] Finished job ValidateOrganizationsJob at "2025-01-29T00:30:00.3380858Z".

Expected Result

Sync to occur correctly

Actual Result

No indication whether sync did something. Licence validation afterwards is invalid.

Screenshots or Videos

No response

Additional Context

Due to the bug #5223 we couldn't use any 2025.x.x versions. At the time only 2025.1.0 was available.

The manual sync works fine.

Githash Version

{"version":"2024.12.1","gitHash":"c507058e-dirty","server":null,"environment":{"cloudRegion":"EU","vault":"https://bitwarden.XXX.XXX","api":"https://bitwarden.XXX.XXX/api","identity":"https://bitwarden.XXX.XXX/identity","notifications":"https://bitwarden.XXX.XXX/notifications","sso":"https://bitwarden.XXX.XXX/sso"},"featureStates":{"duo-redirect":true},"settings":{"disableUserRegistration":false},"object":"config"}

Environment Details

  • Operating system: Ubuntu jammy
  • Environment: LXD (lxc container)

Database Image

separate ubuntu jammy container in lxc with postgresql-14

Issue-Link

#2480

Issue Tracking Info

  • I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugbw-unified-deployAn Issue related to Bitwarden unified deployment

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions