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

GET /.well-known/fxa-client-configuration HTTP/1.1" 404 #267

Open
thematrixdev opened this issue Dec 21, 2020 · 5 comments
Open

GET /.well-known/fxa-client-configuration HTTP/1.1" 404 #267

thematrixdev opened this issue Dec 21, 2020 · 5 comments

Comments

@thematrixdev
Copy link

thematrixdev commented Dec 21, 2020

Helo there. I am setting up syncserver with a reverse-proxy.

docker-compose.yml

mozilla-syncserver-container:
container_name: mozilla-syncserver-container
image: mozilla/syncserver:latest
volumes:
- type: bind
source: ./data/mozilla-syncserver
target: /data
environment:
SYNCSERVER_PUBLIC_URL: "https://mozillasyncserver.myserver.com"
SYNCSERVER_SECRET: "dummy"
SYNCSERVER_SQLURI: "sqlite:////data/syncserver.db"
SYNCSERVER_BATCH_UPLOAD_ENABLED: "true"
SYNCSERVER_FORCE_WSGI_ENVIRON: "true"
PORT: 5000
restart: unless-stopped

nginx sites

server{
location / {
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_redirect off;
proxy_read_timeout 120;
proxy_connect_timeout 10;
proxy_pass http://mozilla-syncserver-container:5000/;
}
server_name mozillasyncserver.myserver.com;
listen 443 ssl http2;
ssl_certificate /etc/nginx/ssl/myserver.com/cert.pem;
ssl_certificate_key /etc/nginx/ssl/myserver.com/private.key;
ssl_client_certificate /etc/nginx/ssl/cloudflare/origin-pull-ca.pem;
ssl_verify_client on;
}

Visiting from web browser:
https://mozillasyncserver.myserver.com/ gives "it works!"
https://mozillasyncserver.myserver.com/.well-known/fxa-client-configuration gives "0"

However, clicking "Sign in to Sync" in Firefox, this line is shown in Nginx log:
[21/Dec/2020:07:09:07 +0000] "GET /.well-known/fxa-client-configuration HTTP/1.1" 404 1 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0"

May anyone please help? Thanks.

@rfk
Copy link
Contributor

rfk commented Dec 21, 2020

GET /.well-known/fxa-client-configuration

This URL is served by the Firefox Account server; if you want to self-host the account server as well as syncserver it is unfortunately a much more complex process, ref https://moz-services-docs.readthedocs.io/en/latest/howtos/run-fxa.html

@thematrixdev
Copy link
Author

It seems I can self-host syncserver and use Account Server hosted by Mozilla? How should I configure Firefox for this?

GET /.well-known/fxa-client-configuration

This URL is served by the Firefox Account server; if you want to self-host the account server as well as syncserver it is unfortunately a much more complex process, ref https://moz-services-docs.readthedocs.io/en/latest/howtos/run-fxa.html

@rfk
Copy link
Contributor

rfk commented Dec 21, 2020

It seems I can self-host syncserver and use Account Server hosted by Mozilla? How should I configure Firefox for th

Yes, this is also possible. What Firefox are you setting up? (Desktop, Android, iOS..?)

On Desktop, you should be able to make this work by leaving the identity.fxaccounts.autoconfig.uri preference at its default value, and instead just setting the identity.sync.tokenserver.uri preference as documented here.

@thematrixdev
Copy link
Author

Great! I see HTTP-200 in Ngninx logs. The server is correctly set-up except I have modified the incorrect config in Firefox. May I know how to modify the config for Android Firefox as well?

@thematrixdev
Copy link
Author

Btw is data in LockWise synced to this self-hosted server?

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

2 participants