@celilo/e2e 0.17.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/e2e-status +1 -1
- package/config/namecheap/ddns-tls.crt +21 -0
- package/config/namecheap/ddns-tls.key +28 -0
- package/config/namecheap/namecheap-ca.crt +20 -0
- package/config/routing/management-routes.sh +0 -3
- package/docker/Dockerfile.management +6 -0
- package/docker/Dockerfile.namecheap-dns +6 -0
- package/package.json +2 -2
- package/registry-server/package.json +1 -1
- package/scripts/stage-apt-repo.ts +3 -1
- package/simulators/namecheap-ddns/server.ts +22 -1
- package/src/container-manager.ts +5 -0
- package/src/docker-compose-generator.ts +0 -2
- package/src/module-host.ts +0 -1
- package/src/router-swap.ts +16 -2
- package/src/simulator-ips.ts +1 -1
- package/src/types.ts +13 -1
package/bin/e2e-status
CHANGED
|
@@ -32,4 +32,4 @@ done
|
|
|
32
32
|
echo ""
|
|
33
33
|
echo "=== DDNS Simulator ==="
|
|
34
34
|
echo -n " Status: "
|
|
35
|
-
docker compose -p "$PROJECT_NAME" exec -T namecheap-dns curl -s
|
|
35
|
+
docker compose -p "$PROJECT_NAME" exec -T namecheap-dns curl -s --cacert /etc/ssl/namecheap-sim/namecheap-ca.crt https://dynamicdns.park-your-domain.com/status --resolve dynamicdns.park-your-domain.com:443:127.0.0.1 2>/dev/null || echo "(not running)"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
-----BEGIN CERTIFICATE-----
|
|
2
|
+
MIIDfTCCAmWgAwIBAgIUdjRGJDcAnXSrb8e8pgTGItaituQwDQYJKoZIhvcNAQEL
|
|
3
|
+
BQAwJjEkMCIGA1UEAwwbY2VsaWxvIGUyZSBOYW1lY2hlYXAgc2ltIENBMCAXDTI2
|
|
4
|
+
MDgyMTA2NDEyNFoYDzIxMjYwNzI4MDY0MTI0WjAqMSgwJgYDVQQDDB9keW5hbWlj
|
|
5
|
+
ZG5zLnBhcmsteW91ci1kb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30pQ
|
|
16
|
+
keyX1ahBzWwSg3FmdEOt35SfhvFQ4S/TAoEM33QARq+jJfMBupPNSIETgcr+Rimn
|
|
17
|
+
YWbshg1zfXuQnju9qV3R1bEST7ZSH+CjXhPu6CCbu/jTT3lPRIB04w2Yw5IAi1Kh
|
|
18
|
+
SzCF3TlQEUXpkPhlYpglhW0q3wgfp7QmnquNLHo6E8I+PyBjkSkg+Xq2cw14bE0i
|
|
19
|
+
MWHp
|
|
20
|
+
-----END CERTIFICATE-----
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
set -e
|
|
3
3
|
|
|
4
4
|
# System-wide environment for all processes (hooks, ansible, etc.)
|
|
5
|
-
echo 'DDNS_ENDPOINT=http://100.64.0.55:8080/update' >> /etc/environment
|
|
6
|
-
export DDNS_ENDPOINT="http://100.64.0.55:8080/update"
|
|
7
5
|
|
|
8
6
|
# Generate SSH keys if needed
|
|
9
7
|
/config/ssh/generate-keys.sh /ssh-keys
|
|
@@ -105,7 +103,6 @@ cat > /root/.zshrc << ZSHRC
|
|
|
105
103
|
export PATH="/root/.bun/bin:/usr/local/bin:\$PATH"
|
|
106
104
|
|
|
107
105
|
# Simulated network overrides
|
|
108
|
-
export DDNS_ENDPOINT="http://100.64.0.55:8080/update"
|
|
109
106
|
|
|
110
107
|
# History
|
|
111
108
|
HISTFILE=/root/.zsh_history
|
|
@@ -96,6 +96,12 @@ COPY config/pebble/pebble-ca.crt /usr/local/share/ca-certificates/pebble-ca.crt
|
|
|
96
96
|
# external_web's authoritative post-publish check HTTPS-GETs the route from
|
|
97
97
|
# here, which is why mgmt in particular must trust it.
|
|
98
98
|
COPY config/cpanel-host/cpanel-host-ca.crt /usr/local/share/ca-certificates/cpanel-host-ca.crt
|
|
99
|
+
# Trust the Namecheap DDNS sim's CA. Its cert is likewise PRE-INSTALLED rather
|
|
100
|
+
# than Pebble-issued: celilo does not own a third-party API's TLS. This is what
|
|
101
|
+
# lets namecheap's hooks call the REAL endpoint URL over real TLS, instead of
|
|
102
|
+
# being redirected at an http://ip:port by an environment variable that an
|
|
103
|
+
# allow-listed hook environment no longer carries.
|
|
104
|
+
COPY config/namecheap/namecheap-ca.crt /usr/local/share/ca-certificates/namecheap-ca.crt
|
|
99
105
|
RUN update-ca-certificates
|
|
100
106
|
|
|
101
107
|
# Tell bun (and Node-compat code) to merge the system CA bundle with
|
|
@@ -14,6 +14,12 @@ RUN apt-get update && apt-get install -y \
|
|
|
14
14
|
RUN curl -fsSL https://bun.sh/install | bash
|
|
15
15
|
ENV PATH="/root/.bun/bin:$PATH"
|
|
16
16
|
|
|
17
|
+
# The endpoint's own certificate, PRE-INSTALLED the way a real third-party
|
|
18
|
+
# service's is (same pattern as the cPanel host sim). The CA rides along so the
|
|
19
|
+
# container can probe its own HTTPS endpoint without disabling verification.
|
|
20
|
+
COPY config/namecheap/ddns-tls.crt config/namecheap/ddns-tls.key config/namecheap/namecheap-ca.crt /etc/ssl/namecheap-sim/
|
|
21
|
+
RUN chmod 600 /etc/ssl/namecheap-sim/ddns-tls.key
|
|
22
|
+
|
|
17
23
|
COPY simulators/namecheap-ddns/ /simulator/
|
|
18
24
|
COPY config/routing/dns-routes.sh /dns-routes.sh
|
|
19
25
|
RUN chmod +x /dns-routes.sh
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@celilo/e2e",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"description": "E2E test infrastructure for Celilo-deployed applications. Provides a simulated internet with DNS hierarchy, ACME server, firewalls, and target machines in Docker.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.ts",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"README.md"
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@celilo/capabilities": "^
|
|
40
|
+
"@celilo/capabilities": "^3.0.0",
|
|
41
41
|
"@celilo/cli-display": "^0.2.0",
|
|
42
42
|
"@celilo/event-bus": "^0.6.0",
|
|
43
43
|
"@celilo/terraform-fake": "^0.3.1",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"start": "bun run src/index.ts",
|
|
9
9
|
"dev": "bun --watch src/index.ts",
|
|
10
10
|
"build:binary": "bun build --compile --target=bun-linux-x64 --outfile=dist/celilo-registry-server src/index.ts",
|
|
11
|
-
"test": "bun test"
|
|
11
|
+
"test": "bun test --timeout 30000"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
14
|
"bun-types": "latest",
|
|
@@ -98,7 +98,9 @@ export function stageAptRepo(repoRoot: string, pkgDir: string): boolean {
|
|
|
98
98
|
|
|
99
99
|
const debs = readdirSync(distDir).filter((f) => f.endsWith('.deb') && f.includes(version));
|
|
100
100
|
for (const deb of debs) {
|
|
101
|
-
|
|
101
|
+
// `force` explicit: a rebuilt .deb at the same version must replace the
|
|
102
|
+
// one already pooled, or build-infra serves stale bytes.
|
|
103
|
+
cpSync(join(distDir, deb), join(pool, deb), { force: true });
|
|
102
104
|
}
|
|
103
105
|
|
|
104
106
|
console.log(
|
|
@@ -46,7 +46,24 @@ const PASSWORD_MAP: Record<string, string> = (() => {
|
|
|
46
46
|
return {};
|
|
47
47
|
})();
|
|
48
48
|
const FALLBACK_PASSWORD = process.env.DDNS_PASSWORD || 'test123';
|
|
49
|
-
|
|
49
|
+
/**
|
|
50
|
+
* The real Namecheap DDNS endpoint is `https://dynamicdns.park-your-domain.com`,
|
|
51
|
+
* so that is what this serves: port 443, with a certificate for that name.
|
|
52
|
+
*
|
|
53
|
+
* It used to listen on plain HTTP at 8080 and the rig pointed the module at
|
|
54
|
+
* `http://100.64.0.55:8080/update` through a `DDNS_ENDPOINT` environment
|
|
55
|
+
* variable. That bypassed both the DNS chain the rig had already built (the
|
|
56
|
+
* `park-your-domain.com` zone has always been there) and TLS, and it stopped
|
|
57
|
+
* working when hooks became subprocesses with an allow-listed environment
|
|
58
|
+
* (openspec/changes/hook-process-boundary, design D5).
|
|
59
|
+
*
|
|
60
|
+
* The certificate is PRE-INSTALLED rather than issued by Pebble, the same way
|
|
61
|
+
* the cPanel host simulator's is, and for the same reason: celilo does not own
|
|
62
|
+
* this service's TLS. A real third-party API has a certificate from a real CA
|
|
63
|
+
* long before celilo talks to it, and there is no ACME exchange to model.
|
|
64
|
+
*/
|
|
65
|
+
const PORT = Number(process.env.DDNS_PORT) || 443;
|
|
66
|
+
const TLS_DIR = process.env.DDNS_TLS_DIR || '/etc/ssl/namecheap-sim';
|
|
50
67
|
|
|
51
68
|
function expectedPasswordFor(domain: string): string {
|
|
52
69
|
return PASSWORD_MAP[domain] ?? FALLBACK_PASSWORD;
|
|
@@ -107,6 +124,10 @@ function normalizeIp(address: string): string {
|
|
|
107
124
|
|
|
108
125
|
const server = Bun.serve({
|
|
109
126
|
port: PORT,
|
|
127
|
+
tls: {
|
|
128
|
+
cert: Bun.file(`${TLS_DIR}/ddns-tls.crt`),
|
|
129
|
+
key: Bun.file(`${TLS_DIR}/ddns-tls.key`),
|
|
130
|
+
},
|
|
110
131
|
fetch(req, server) {
|
|
111
132
|
const url = new URL(req.url);
|
|
112
133
|
|
package/src/container-manager.ts
CHANGED
|
@@ -813,6 +813,11 @@ function buildNetworkHandle(
|
|
|
813
813
|
await handle.celilo(`module config set iptables firewall_ip ${firewallIp}`);
|
|
814
814
|
await handle.celilo(`module config set iptables nat_ip ${natIp}`);
|
|
815
815
|
await handle.celilo(`module config set iptables zones '${JSON.stringify(declaredZones)}'`);
|
|
816
|
+
// Caller-supplied settings last, so a suite can turn on an opt-in policy
|
|
817
|
+
// the way an operator would rather than assert against the default.
|
|
818
|
+
for (const [key, value] of Object.entries(opts.config ?? {})) {
|
|
819
|
+
await handle.celilo(`module config set iptables ${key} ${value}`);
|
|
820
|
+
}
|
|
816
821
|
// `check: false` returns the failed deploy instead of throwing, so a test
|
|
817
822
|
// can assert on WHAT the refusal said. Interface classification refuses
|
|
818
823
|
// by design (D12 onboarding), and a refusal is only useful if it names
|
|
@@ -595,7 +595,6 @@ export function generateTestComposeYaml(config: NetworkConfig, celiloRoot?: stri
|
|
|
595
595
|
...(config.managementVolumes ?? []),
|
|
596
596
|
],
|
|
597
597
|
environment: {
|
|
598
|
-
DDNS_ENDPOINT: `http://${SIMULATOR_IPS.NAMECHEAP_DNS}:8080/update`,
|
|
599
598
|
// On its own control-plane network the only router in reach is fw-main's
|
|
600
599
|
// leg there — both for the default route and for the segmented zones.
|
|
601
600
|
DEFAULT_GATEWAY: zone === 'secure-mgmt' ? SECURE_MGMT_GATEWAY : managementDefaultGw,
|
|
@@ -821,7 +820,6 @@ export function generateComposeYaml(config: NetworkConfig, celiloRoot = '..'): s
|
|
|
821
820
|
...(config.managementVolumes ?? []),
|
|
822
821
|
],
|
|
823
822
|
environment: {
|
|
824
|
-
DDNS_ENDPOINT: `http://${SIMULATOR_IPS.NAMECHEAP_DNS}:8080/update`,
|
|
825
823
|
DEFAULT_GATEWAY: managementDefaultGw,
|
|
826
824
|
CELILO_REGISTRY_URL: 'http://e2e-registry.lab',
|
|
827
825
|
},
|
package/src/module-host.ts
CHANGED
|
@@ -48,7 +48,6 @@ export function parseModuleHost(statusOutput: string): ModuleHost | null {
|
|
|
48
48
|
// both, and a raw match silently finds nothing.
|
|
49
49
|
const lines = statusOutput
|
|
50
50
|
.split('\n')
|
|
51
|
-
// biome-ignore lint/suspicious/noControlCharactersInRegex: stripping ANSI is the point
|
|
52
51
|
.map((line) => line.replace(/\x1b\[[0-9;]*m/g, '').replace(/^[\s│|]+/, ''));
|
|
53
52
|
|
|
54
53
|
for (const line of lines) {
|
package/src/router-swap.ts
CHANGED
|
@@ -102,7 +102,21 @@ export function forwardedPorts(listing: string): string[] {
|
|
|
102
102
|
return [...new Set(ports)].sort();
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
/**
|
|
105
|
+
/**
|
|
106
|
+
* The DHCP pool's advertised DNS servers, read back off the device.
|
|
107
|
+
*
|
|
108
|
+
* Queries the pool INSTANCE (`…Pool.1.`), not the collection (`…Pool.`). The
|
|
109
|
+
* simulator answers the collection form with `{"Objects":[]}` — no error, just
|
|
110
|
+
* an empty list — so the collection form reads as "the router advertises no DNS
|
|
111
|
+
* servers" whatever is actually configured. Both `greenwave` and `axon` write
|
|
112
|
+
* through `Device.DHCPv4.Server.Pool.1.`
|
|
113
|
+
* (`modules/greenwave/scripts/isp-router-functions.ts:153`), so this reads back
|
|
114
|
+
* exactly where the module wrote.
|
|
115
|
+
*
|
|
116
|
+
* Nothing called this until `e2e/tests/provider-arrival-backfill.test.ts`, which
|
|
117
|
+
* is how the mismatch survived: against the collection form an assertion fails
|
|
118
|
+
* identically whether the router was configured or not.
|
|
119
|
+
*/
|
|
106
120
|
export async function routerDhcpDnsServers(
|
|
107
121
|
net: NetworkHandle,
|
|
108
122
|
device: RouterDevice,
|
|
@@ -115,7 +129,7 @@ export async function routerDhcpDnsServers(
|
|
|
115
129
|
);
|
|
116
130
|
const listed = await net.exec(
|
|
117
131
|
'fw-isp',
|
|
118
|
-
`curl -sk 'https://${greenwaveRouterIp()}/cgi/cgi_get?Object=Device.DHCPv4.Server.Pool.' -b /tmp/dhcp-cookies`,
|
|
132
|
+
`curl -sk 'https://${greenwaveRouterIp()}/cgi/cgi_get?Object=Device.DHCPv4.Server.Pool.1.' -b /tmp/dhcp-cookies`,
|
|
119
133
|
);
|
|
120
134
|
return listed.stdout;
|
|
121
135
|
}
|
package/src/simulator-ips.ts
CHANGED
|
@@ -23,7 +23,7 @@ export const SIMULATOR_IPS = {
|
|
|
23
23
|
ROOT_DNS: '100.64.0.53',
|
|
24
24
|
/** Authoritative TLD DNS for `com.`, `org.`, `net.`. */
|
|
25
25
|
TLD_DNS: '100.64.0.54',
|
|
26
|
-
/** Authoritative DNS for the customer domains; also serves the DDNS update endpoint at
|
|
26
|
+
/** Authoritative DNS for the customer domains; also serves the DDNS update endpoint at https://dynamicdns.park-your-domain.com. */
|
|
27
27
|
NAMECHEAP_DNS: '100.64.0.55',
|
|
28
28
|
/** Internal e2e module registry (replaces production celilo.computer in tests). */
|
|
29
29
|
REGISTRY: '100.64.0.56',
|
package/src/types.ts
CHANGED
|
@@ -449,7 +449,19 @@ export interface NetworkHandle {
|
|
|
449
449
|
*
|
|
450
450
|
* @param opts.natIp - NAT IP for port-forwarded traffic (default 10.226.1.253)
|
|
451
451
|
*/
|
|
452
|
-
|
|
452
|
+
/**
|
|
453
|
+
* @param opts.config - Extra `module config set iptables <key> <value>` pairs,
|
|
454
|
+
* applied after the topology-derived ones and before the deploy. For
|
|
455
|
+
* settings whose whole point is that they are OPT-IN: the harness deploys a
|
|
456
|
+
* DEFAULT firewall, so a suite testing an opt-in policy has to turn it on
|
|
457
|
+
* the way an operator would, and asserting on a default deploy would only
|
|
458
|
+
* ever measure the default.
|
|
459
|
+
*/
|
|
460
|
+
deployFirewall(opts?: {
|
|
461
|
+
natIp?: string;
|
|
462
|
+
check?: boolean;
|
|
463
|
+
config?: Record<string, string>;
|
|
464
|
+
}): Promise<ExecResult>;
|
|
453
465
|
|
|
454
466
|
/**
|
|
455
467
|
* Deploy the `greenwave` module against the ISP router (`fw-isp`) — the box
|