@celilo/cli 0.13.1 → 0.13.2
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/package.json
CHANGED
|
@@ -74,6 +74,22 @@
|
|
|
74
74
|
"maximum": 4094,
|
|
75
75
|
"description": "VLAN tag for internal zone (not defaulted; internal is untagged)"
|
|
76
76
|
},
|
|
77
|
+
"network.secure-mgmt.subnet": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"pattern": "^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}/\\d{1,2}$",
|
|
80
|
+
"description": "Control-plane subnet CIDR — the network celilo-mgr itself occupies when it does not sit on the internal LAN (not defaulted — discovered at celilo-mgmt install, or recorded by firewall onboarding). Derives the firewall's trusted sources and the internal resolver's split-horizon view for celilo's own traffic."
|
|
81
|
+
},
|
|
82
|
+
"network.secure-mgmt.gateway": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"pattern": "^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$",
|
|
85
|
+
"description": "Control-plane gateway IP address (not defaulted — discovered from the default route)"
|
|
86
|
+
},
|
|
87
|
+
"network.secure-mgmt.vlan": {
|
|
88
|
+
"type": "integer",
|
|
89
|
+
"minimum": 1,
|
|
90
|
+
"maximum": 4094,
|
|
91
|
+
"description": "VLAN tag for the control-plane zone (not defaulted)"
|
|
92
|
+
},
|
|
77
93
|
"dns.primary": {
|
|
78
94
|
"type": "string",
|
|
79
95
|
"pattern": "^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$",
|
|
@@ -355,6 +355,8 @@ _celilo_system_config_keys() {
|
|
|
355
355
|
'network.secure.gateway:Secure gateway IP'
|
|
356
356
|
'network.internal.subnet:Internal subnet'
|
|
357
357
|
'network.internal.gateway:Internal gateway IP'
|
|
358
|
+
'network.secure-mgmt.subnet:Control-plane subnet (celilo-mgr own network)'
|
|
359
|
+
'network.secure-mgmt.gateway:Control-plane gateway IP'
|
|
358
360
|
'dns.primary:Primary DNS server'
|
|
359
361
|
'dns.fallback:Fallback DNS servers'
|
|
360
362
|
'routing.internal_gateway:Internal gateway IP'
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { describe, expect, it } from 'bun:test';
|
|
2
|
+
import { readFileSync } from 'node:fs';
|
|
3
|
+
import { join } from 'node:path';
|
|
2
4
|
import type { SystemConfigProperty, SystemConfigSchema } from './system-config-schema-types';
|
|
3
5
|
import { validateKey, validateValue } from './system-config-validator';
|
|
4
6
|
|
|
@@ -158,3 +160,26 @@ describe('validateKey', () => {
|
|
|
158
160
|
expect(result.error).toContain('network.bridge');
|
|
159
161
|
});
|
|
160
162
|
});
|
|
163
|
+
|
|
164
|
+
// The shipped schema is what `celilo system config set` validates against, and it
|
|
165
|
+
// is a hand-maintained enumeration of zones. `secure-mgmt` was added to
|
|
166
|
+
// NETWORK_ZONES, IPAM, zone detection and the manifest schema but NOT here, so the
|
|
167
|
+
// zone existed everywhere except the one place its subnet could be RECORDED — and
|
|
168
|
+
// recording it is what derives firewall trust and the resolver's split-horizon
|
|
169
|
+
// view. It failed only on the live box, at `system config set`.
|
|
170
|
+
describe('shipped system_config.json covers every placement zone', () => {
|
|
171
|
+
const shipped = JSON.parse(
|
|
172
|
+
readFileSync(join(import.meta.dir, '../../schemas/system_config.json'), 'utf-8'),
|
|
173
|
+
) as SystemConfigSchema;
|
|
174
|
+
|
|
175
|
+
// `external` is deliberately absent: cloud/VPS systems carry their own
|
|
176
|
+
// addressing and celilo allocates nothing for them.
|
|
177
|
+
const ADDRESSABLE_ZONES = ['internal', 'dmz', 'app', 'secure', 'secure-mgmt'] as const;
|
|
178
|
+
|
|
179
|
+
for (const zone of ADDRESSABLE_ZONES) {
|
|
180
|
+
it(`accepts network.${zone}.subnet and .gateway`, () => {
|
|
181
|
+
expect(validateKey(`network.${zone}.subnet`, shipped).valid).toBe(true);
|
|
182
|
+
expect(validateKey(`network.${zone}.gateway`, shipped).valid).toBe(true);
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
});
|