Scanning archi-dev-box from OUTSIDE found five ports serving their screens with no login — lnd-ui 18083, bitcoin-ui 8334, fips-ui 8336, electrs-ui 50002 and the Fedimint Guardian 8175 — none of which appeared in the gate's unprotected list. They are host-networked, so Podman publishes nothing to pin and their manifests declared 'ports: []'; the gate builds its map from declared ports, so it neither protected them nor reported them. An audit that reports success while five screens are open is worse than no audit. Their nginx now listens on 127.0.0.1 instead of 0.0.0.0, and each port is declared 'auth: gated' so the daemon owns the outside. 'bind:' on a host-networked app is a statement of where the container listens, not a publish instruction — quadlet already skips PublishPort in host mode. Guardian 8175 is declared on the fedimint app because its companion has no manifest, and the gate keys on port, not container. Credential paths were NOT exposed and are verified so: /lnd-connect-info, the /proxy/lnd/ passthrough, container logs and every RPC method through these screens all return 401 unauthenticated. What leaked was the page shell. Also fixes the delivery gap that would have made this unshippable: only bitcoin-ui, lnd-ui and electrs-ui were ever rsynced to /opt/archipelago/docker, so edits to fips-ui and fedimint-ui reached nodes through no path at all. All five now sync; the two whose rebuilds the daemon owns are synced without being handed to container-specs. Every remaining undeclared port is now declared with a stated reason — gated: botfights 9100, router 8084, pine 10380; exempt with rationale: fedimint consensus 8173/8174, gateway 8176/9737, netbird 8086/8087 (TLS + own auth, and enrolled devices cannot hold a session), pine TLS 10381, lightning-stack REST 8091 (macaroon, mirrors lnd). Zero undeclared ports remain across all 56 manifests. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
68 lines
2.3 KiB
YAML
68 lines
2.3 KiB
YAML
app:
|
|
id: bitcoin-ui
|
|
name: Bitcoin UI
|
|
version: 1.0.0
|
|
description: |
|
|
Archipelago-native HTTP proxy + static site for interacting with the
|
|
Bitcoin Core / Bitcoin Knots JSON-RPC. Runs nginx inside a container
|
|
and reverse-proxies /bitcoin-rpc/ to 127.0.0.1:8332 on the host. The
|
|
upstream Authorization header is substituted from
|
|
/var/lib/archipelago/secrets/bitcoin-rpc-password by the prod
|
|
orchestrator's pre-start hook, rendered into an nginx.conf that is
|
|
bind-mounted read-only at container start.
|
|
|
|
container:
|
|
build:
|
|
context: /opt/archipelago/docker/bitcoin-ui
|
|
dockerfile: Dockerfile
|
|
tag: localhost/bitcoin-ui:local
|
|
|
|
dependencies:
|
|
- app_id: bitcoin-core
|
|
|
|
resources:
|
|
memory_limit: 128Mi
|
|
|
|
security:
|
|
readonly_root: false
|
|
network_policy: host
|
|
|
|
# Host networking: nginx listens on 8334 directly on the host IP, and
|
|
# proxies to 127.0.0.1:8332 which is where the bitcoin backend binds
|
|
# its RPC. `ports:` is intentionally empty because host networking
|
|
# bypasses port mapping.
|
|
# Declared so the APP GATE can see this port. Host networking means Podman
|
|
# publishes nothing (quadlet skips PublishPort in host mode), so `bind:` here
|
|
# is a statement of where the container's own nginx listens — 127.0.0.1 —
|
|
# not a publish instruction. Without this declaration the gate had no idea
|
|
# the port existed: it was neither protected nor listed as unprotected, and
|
|
# served the Bitcoin screen unauthenticated on every interface.
|
|
ports:
|
|
- host: 8334
|
|
container: 8334
|
|
protocol: tcp
|
|
bind: 127.0.0.1
|
|
auth: gated
|
|
|
|
volumes:
|
|
# Bind-mount the rendered nginx.conf read-only. The prod orchestrator
|
|
# renders /var/lib/archipelago/bitcoin-ui/nginx.conf on every install
|
|
# and every reconcile pass, substituting the base64 RPC auth from
|
|
# the plaintext password secret. If the rendered bytes change (the
|
|
# password rotated, or the template was updated by OTA), the
|
|
# reconciler restarts this container so nginx re-reads the config.
|
|
- type: bind
|
|
source: /var/lib/archipelago/bitcoin-ui/nginx.conf
|
|
target: /etc/nginx/conf.d/default.conf
|
|
options: [ro]
|
|
|
|
environment: []
|
|
|
|
health_check:
|
|
type: http
|
|
endpoint: http://127.0.0.1:8334
|
|
path: /
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|