I'm local on Mac OS 10.14.6 using Angular 8, Symfony 4.3 and mercure 0.72 darwin. I'm quite new to symfony. I wanted to dispatch updates only to authorized clients on my local machine. So far it really is a big pain. I hope I can find some help or answers here.
Last error I get is
http: TLS handshake error from ip:55289: acme/autocert: unable to authorize "mydyndns-url.com"; challenge "http-01" failed with error: acme: authorization error for mydyndns-url.com: 400 urn:acme:error:connection: Fetching http://mydyndns-url.com/.well-known/acme-challenge/SomeHash: Error getting validation data; challenge "tls-alpn-01" failed with error: acme: authorization error for mydyndns-url.com: 400 urn:acme:error:connection: Connection refused
plus
http: TLS handshake error from ip:56803: acme/autocert: missing certificate
I have no remote server on which I could test anything.
But I want to dispatch some updates to authorized clients. Is there no way for me to test this locally ? without any sll tls stuff ?
So far if I understand correctly, to use authorization in clients (cookie or bearer) I must have encrypted mercure communication, for that I need a certificate, which I created with letsencrypt for my dyndns url, which I also just created for that, but then also I read that for the authorization with encrypt all must run on 443, but all is on one machine, so do I need to create subdomains for all my local test servers now ? (because there's a problem with my dyndns on certificate creation using sudo certbot certonly --standalone
, it gives me Challenge failed for my sub domains, being then sub sub domains of the dyndns provider), then also why does he try to fetch a :80 server for the authorization with the .well-known path ?
But because I feel like I went down alices rabbithole and that it has no end, I don't know if it even makes anymore sense to try anything with mercure.
I just want to push a message on '/messages' to target '/user/patata' and then get that message in my angular client autherized using a cookie. Is it so hard to do that on a local development server ? Is there some complete doc for that use case?
Using this to launch mercure
sudo PUBLISHER_JWT_KEY='mercure_key' SUBSCRIBER_JWT_KEY='mercure_key' JWT_KEY='mercure_key' ACME_HOSTS='mydyndns-url.com' ADDR='mydyndns-url.com:443' CERT_FILE='/Users/me/Projects/fullchain.pem' KEY_FILE='/Users/me/Projects/privkey.pem' CORS_ALLOWED_ORIGINS='*' ALLOW_ANONYMOUS='1' debug='1' ./mercure
Of course theres also the symfony settings and code and angular code and so forth. But that would be too much to put everything in here. And mostly I'd like to know how to uncomplicate this, not to make you dizzy as well :D