You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cmd/main.go
+7-5Lines changed: 7 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -81,7 +81,6 @@ func main() {
81
81
varimageServerURLstring
82
82
vararchitecturestring
83
83
varallowedRegistriesstring
84
-
varblockedRegistriesstring
85
84
86
85
flag.StringVar(&architecture, "architecture", "amd64", "Target system architecture (e.g., amd64, arm64)")
87
86
flag.IntVar(&ipxeServicePort, "ipxe-service-port", 5000, "IPXE Service port to listen on.")
@@ -101,8 +100,7 @@ func main() {
101
100
flag.BoolVar(&secureMetrics, "metrics-secure", true, "If set the metrics endpoint is served securely")
102
101
flag.BoolVar(&enableHTTP2, "enable-http2", false,
103
102
"If set, HTTP/2 will be enabled for the metrics and webhook servers")
104
-
flag.StringVar(&allowedRegistries, "allowed-registries", "", "Comma-separated list of allowed OCI registries. If set, only these registries are permitted.")
105
-
flag.StringVar(&blockedRegistries, "blocked-registries", "", "Comma-separated list of blocked OCI registries. If set, these registries are denied.")
103
+
flag.StringVar(&allowedRegistries, "allowed-registries", "", "Comma-separated list of allowed OCI registries. Defaults to ghcr.io if not set.")
106
104
107
105
controllers:=switches.New(
108
106
// core controllers
@@ -233,8 +231,12 @@ func main() {
233
231
}
234
232
235
233
// Initialize registry validator for OCI image validation
Copy file name to clipboardExpand all lines: docs/README.md
+10-9Lines changed: 10 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,10 +31,10 @@ Boot Operator includes the following key components:
31
31
- Handles `/image` requests
32
32
- Extracts layers from OCI (Open Container Initiative) images, with support for multiple registries (e.g., GHCR, Docker Hub, Keppel, and any OCI-compliant registry)
33
33
- Downloads specific layers based on the requested URI and image specifications
34
-
- Registry access is controlled via CLI flags:
34
+
- Registry access is controlled via CLI flag:
35
35
-`--allowed-registries`: comma-separated list of permitted registries (allowlist mode)
36
-
-`--blocked-registries`: comma-separated list of denied registries (blocklist mode)
37
-
-If neither flag is set, all registries are denied (fail-closed)
36
+
-If not set, defaults to allowing only `ghcr.io` (zero-config default)
37
+
-When set, the specified registries completely replace the default (ghcr.io must be explicitly included if needed)
@@ -48,17 +48,18 @@ These servers leverage Kubernetes controllers and API objects to manage the boot
48
48
49
49
Boot Operator enforces OCI registry restrictions at two levels:
50
50
51
-
1.**Controller level (early validation):** The PXE and HTTP boot controllers validate image references against the registry allow/block list during reconciliation. This means misconfigured or disallowed registries are rejected immediately when a `ServerBootConfiguration` is created, providing fast feedback before any machine attempts to boot.
51
+
1.**Controller level (early validation):** The PXE and HTTP boot controllers validate image references against the registry allow list during reconciliation. This means misconfigured or disallowed registries are rejected immediately when a `ServerBootConfiguration` is created, providing fast feedback before any machine attempts to boot.
52
52
53
53
2.**Image Proxy Server level (runtime enforcement):** The image proxy server also validates registry domains before proxying layer downloads, acting as a second line of defense.
54
54
55
-
Registry restrictions are configured via CLI flags on the manager binary:
55
+
Registry restrictions are configured via CLI flag on the manager binary:
56
56
57
57
| Flag | Description |
58
58
|------|-------------|
59
-
|`--allowed-registries`| Comma-separated list of permitted registries (allowlist mode). Only these registries are accepted. |
60
-
|`--blocked-registries`| Comma-separated list of denied registries (blocklist mode). All registries except these are accepted. |
59
+
|`--allowed-registries`| Comma-separated list of permitted registries (allowlist mode). When not set, defaults to `ghcr.io`. |
61
60
62
-
- If `--allowed-registries` is set, it takes precedence over `--blocked-registries`.
63
-
- If neither flag is set, all registries are **denied** (fail-closed).
61
+
**Behavior:**
62
+
-**Default (no flag set):** Only `ghcr.io` is allowed, enabling zero-config operation with a secure default.
63
+
-**Custom allow list:** When `--allowed-registries` is specified, it completely replaces the default. If you want to allow `ghcr.io` along with other registries, you must explicitly include it in the list (e.g., `--allowed-registries=ghcr.io,myregistry.example.com`).
64
+
-**Case-insensitive matching:** All registry domain comparisons are case-insensitive.
64
65
- Docker Hub variants (`docker.io`, `index.docker.io`, `registry-1.docker.io`) are normalized for consistent matching.
0 commit comments