Page MenuHomePhabricator

clean up commons-query on miscweb setup
Closed, ResolvedPublic

Assigned To
Authored By
Dzahn
Mar 30 2023, 12:17 AM
Referenced Files
F41602632: Screenshot from 2023-12-15 14-15-43.png
Dec 15 2023, 10:16 PM
F36932686: Screenshot from 2023-03-29 17-19-24.png
Mar 30 2023, 12:20 AM
Tokens
"Barnstar" token, awarded by bking."Pterodactyl" token, awarded by LSobanski.

Description

https://commons-query.wikimedia.org somehow redirects to the appserver cluster for a rewrite rule but ALSO exists as a virtual host on miscweb machines.

But it has not been added to the TLS certs used by envoy on miscweb* machines. So apparently something speaks to it unencrypted on port 80!

So you have a virtual host but if you ask the machines for it over TLS you get a certificate error that this is not on the cert.

Since we put effort into making everything else use TLS from the caching servers and terminate with envoy and because this causes monitoring alerts or workarounds.. we should get this cleaned up.

Also we should probably drop access to port 80 from external completely to prevent this from happening with new sites and so that we can rely on TLS being used for everything.

Needs coordination with maintainers of the service of course.

Event Timeline

Screenshot from 2023-03-29 17-19-24.png (468×1 px, 111 KB)

host commons-query.wikimedia.org
commons-query.wikimedia.org is an alias for dyna.wikimedia.org.
dyna.wikimedia.org has address 208.80.154.224
dyna.wikimedia.org has IPv6 address 2620:0:861:ed1a::1
root@miscweb1002:/etc/apache2/sites-enabled# grep ServerName 50-commons-query-wikimedia-org.conf 
    ServerName commons-query.wikimedia.org

Change 904377 had a related patch set uploaded (by Dzahn; author: Dzahn):

[operations/puppet@production] microsites: do not use TLS when monitoring commons-query.wikimedia.org

https://gerrit.wikimedia.org/r/904377

Change 904377 merged by Dzahn:

[operations/puppet@production] microsites: do not use TLS when monitoring commons-query.wikimedia.org

https://gerrit.wikimedia.org/r/904377

Change 904382 had a related patch set uploaded (by Dzahn; author: Dzahn):

[operations/puppet@production] microsites: commons-query.wm.org only works on port 80/http

https://gerrit.wikimedia.org/r/904382

Change 904382 merged by Dzahn:

[operations/puppet@production] microsites: commons-query.wm.org only works on port 80/http

https://gerrit.wikimedia.org/r/904382

Change 904384 had a related patch set uploaded (by Dzahn; author: Dzahn):

[operations/puppet@production] microsites: do not expect 301 for commons-query.wikimedia.org

https://gerrit.wikimedia.org/r/904384

Change 904384 merged by Dzahn:

[operations/puppet@production] microsites: do not expect 301 for commons-query.wikimedia.org

https://gerrit.wikimedia.org/r/904384

LSobanski moved this task from Incoming to Backlog on the collaboration-services board.

Change 980950 had a related patch set uploaded (by Dzahn; author: Dzahn):

[operations/puppet@production] microsites/query_service: enable TLS when monitoring commons-query

https://gerrit.wikimedia.org/r/980950

Change 980950 merged by Dzahn:

[operations/puppet@production] microsites/query_service: enable TLS when monitoring commons-query

https://gerrit.wikimedia.org/r/980950

Change 983470 had a related patch set uploaded (by Dzahn; author: Dzahn):

[operations/puppet@production] ssl: update certificate for webserver-misc-apps.discovery.wmnet

https://gerrit.wikimedia.org/r/983470

Change 983470 merged by Dzahn:

[operations/puppet@production] ssl: update certificate for webserver-misc-apps.discovery.wmnet

https://gerrit.wikimedia.org/r/983470

Screenshot from 2023-12-15 14-15-43.png (690×1 px, 72 KB)

^ screenshot shows how service name commons-query.wikimedia.org gets 200 on https

Change 983491 had a related patch set uploaded (by Dzahn; author: Dzahn):

[operations/puppet@production] query_service: force TLS for monitoring for search-platform team

https://gerrit.wikimedia.org/r/983491

re: original ticket description:

  • fixed the TLS cert and added the missing domain to SANs
  • switched monitoring for our team to force TLS, like the other checks
  • confirmed it actually works
  • the firewall part is already the case, only localhost (from envoy) and deployment servers (for httpbb) are allowed port 80, it was only working because monitoring services are allowed everything

resolved

Change 983491 merged by Dzahn:

[operations/puppet@production] query_service: force TLS for monitoring for search-platform team

https://gerrit.wikimedia.org/r/983491