Add an option to disable web installer #42

Open
opened 2024-04-08 15:25:31 +00:00 by 3wordchant · 3 comments
Owner

If we know that we're about to import a DB dump etc. (e.g. migrating servers) then having the web installer available just seems like a needless recipe for disaster

If we know that we're about to import a DB dump etc. (e.g. migrating servers) then having the web installer available just seems like a needless recipe for disaster
3wordchant changed title from Add a to Add an option to disable web installer 2024-04-08 15:25:42 +00:00
Owner

I would like to prioritize this, as bots are so fast in scanning for uninitialized wordpress instances.

I would like to prioritize this, as bots are so fast in scanning for uninitialized wordpress instances.
Author
Owner

@moritz any suggestions on how?

We already have settings for TITLE / LOCALE / ADMIN_EMAIL, so in theory we could make those mandatory for new installs, and run cmd ... app core:install? But maybe there's a neater way to just disable the installer.

@moritz any suggestions on how? We already have settings for `TITLE` / `LOCALE` / `ADMIN_EMAIL`, so in theory we could make those mandatory for new installs, and run `cmd ... app core:install`? But maybe there's a neater way to just disable the installer.
Owner

An IP allowlist could solve it. It could also be used to only allow specific VPN Gateways. I plan to implement IP allowlists for all our maintained recipes to be able to restrict specific paths behind a VPN:

      labels:
        - "traefik.http.routers.${STACK_NAME}-installer.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS}) && (Path(`/wp-admin/install.php`) || Path(`/wp-admin/setup-config.php`))"
        - "traefik.http.routers.${STACK_NAME}-installer.entrypoints=web-secure"
        - "traefik.http.routers.${STACK_NAME}-installer.tls=true"
        - "traefik.http.routers.${STACK_NAME}-installer.middlewares=${STACK_NAME}-installer-allow"
        - "traefik.http.middlewares.${STACK_NAME}-installer-allow.ipallowlist.sourcerange=${INSTALLER_ALLOWED_IPS:-0.0.0.0/0,::/0}"
#INSTALLER_ALLOWED_IPS=127.0.0.1/32

I haven't tested it yet.

An IP allowlist could solve it. It could also be used to only allow specific VPN Gateways. I plan to implement IP allowlists for all our maintained recipes to be able to restrict specific paths behind a VPN: ``` labels: - "traefik.http.routers.${STACK_NAME}-installer.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS}) && (Path(`/wp-admin/install.php`) || Path(`/wp-admin/setup-config.php`))" - "traefik.http.routers.${STACK_NAME}-installer.entrypoints=web-secure" - "traefik.http.routers.${STACK_NAME}-installer.tls=true" - "traefik.http.routers.${STACK_NAME}-installer.middlewares=${STACK_NAME}-installer-allow" - "traefik.http.middlewares.${STACK_NAME}-installer-allow.ipallowlist.sourcerange=${INSTALLER_ALLOWED_IPS:-0.0.0.0/0,::/0}" ``` ``` #INSTALLER_ALLOWED_IPS=127.0.0.1/32 ``` I haven't tested it yet.
Sign in to join this conversation.
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: coop-cloud/wordpress#42