Closed Fmstrat closed 10 years ago
I guess what's going on is that the default remote verifier at verifier.accounts.firefox.com
is trying to verify the assertion from your local install, but can't reach it to fetch the /.well-known/browserid
file. One option is to run your own copy of the verifier server:
https://github.com/mozilla/browserid-verifier
And add a [browserid]
section to your syncserver.ini, to configure it like this:
[browserid]
backend = tokenserver.verifiers.RemoteVerifier
verifier_url = url-of-your-self-hosted-verifier
audiences = your-public-url-with-no-trailing-slash
Slightly simpler might be to use the local verification capabilities of PyBrowserID, which is already included with the tokenserver codebase. There are some pending API/format changes between PyBrowserID and the hosted verifier, but for now it works fine and lets you avoid running Yet Another Server:
[browserid]
backend = tokenserver.verifiers.LocalVerifier
audiences = your-public-url-with-no-trailing-slash
Thanks @rfk. This issue might make sense to put an update into the default syncserver.ini file that users receive to ensure they don't have the same issue.
That being said, the above change didn't seem to work for me. I added this to my syncserver.ini file:
[browserid]
backend = tokenserver.verifiers.LocalVerifier
audiences = https://firefox-vm.domain.local:1443
However, the Firefox Sync error log now shows:
1406209157497 Sync.Status DEBUG Status.service: success.status_ok => success.status_ok
1406209157497 Sync.Status DEBUG Status.service: success.status_ok => success.status_ok
1406209157509 FirefoxAccounts DEBUG got keyPair
1406209157509 FirefoxAccounts DEBUG getCertificateSigned: true true
1406209157510 Sync.Tracker.Clients WARN Changed IDs file clients contains non-object value.
1406209157537 Sync.Tracker.Passwords WARN Changed IDs file passwords contains non-object value.
1406209157538 Sync.Tracker.Addons WARN Changed IDs file addons contains non-object value.
1406209157675 FirefoxAccounts DEBUG (Response) /certificate/sign: code: 200 - Status text: OK
1406209157675 FirefoxAccounts DEBUG Clock offset vs https://firefox-vm.nowsci.local:15900/v1: -675
1406209157676 FirefoxAccounts DEBUG getCertificate got a new one: true
1406209157676 FirefoxAccounts DEBUG getAssertionFromCert
1406209157678 FirefoxAccounts DEBUG getAssertionFromCert returning signed: true
1406209157678 Sync.BrowserIDManager DEBUG Getting a token
1406209157692 Sync.BrowserIDManager ERROR Non-authentication error in _fetchTokenForUser: Client error.
1406209157692 Sync.Status DEBUG Status.login: success.login => error.login.reason.network
1406209157692 Sync.Status DEBUG Status.service: success.status_ok => error.login.failed
1406209157692 Sync.SyncScheduler DEBUG Clearing sync triggers and the global score.
1406209157693 Sync.SyncScheduler DEBUG Next sync in 3600000 ms.
It no longer attempts to connect to the remote server, but still errors out. Since this is running through WSGI as the apache user, where would the /.well-known/browserid
file be? It doesn't seem to get created on my system. Time-sync seems OK, as I've heard this issue has occurred because of that, too.
I found the fix to work once the public URL matched a hostname valid for the SSL cert, so the above recommendation worked. I've created a pull request that adds some pre-commented elements to syncserver.ini to make this more clear for future administrators. Thanks!
Pull request: https://github.com/mozilla-services/syncserver/pull/34
Self hosted FxA and Sync, FxA seems to operate fine but sync 1.5 is throwing errors. It seems there is a hard coded verifier URL in ./local/lib/python2.7/site-packages/tokenserver/verifiers.py of "verifier.accounts.firefox.com," but I'm not sure exactly what that's doing, or why a self-hosted service would be using the firefox.com servers. The below configurations were used with a fresh git, and a reset fxa and sync database.
The below errors occurred when registering a new user and after the verification of email. Email shows as verified in the fxa database.
As a note, the sync database tables are created, but no records are placed in the DB.
Sync output:
Firefox's sync error-log:
syncserver.ini:
auth-config.json:
content-config.json:
apache conf: