14 Commits

Author SHA1 Message Date
Mateusz Urbanek
403cd5a563
fix: centralize schematic ownership enforcement
Move ownership/auth checks from scattered frontend handlers into
  schematic.Factory.Get, which now accepts an OwnershipChecker. This
  eliminates duplicated checkOwnership methods across http and spdx
  frontends and ensures anonymous callers cannot probe schematic
  existence when auth is enabled.

  Also guard PXE credential embedding behind AuthProvider != nil so
  credentials are never propagated when auth is disabled.

Signed-off-by: Mateusz Urbanek <mateusz.urbanek@siderolabs.com>
2026-04-21 15:12:24 +02:00
Mateusz Urbanek
1b834b7d2a
feat: add SHA-256 and SHA-512 checksum frontend
Add enterprise-only checksum endpoint: appending .sha256 or .sha512
to any /image/ path returns a single-line checksum file instead of
the asset. Algorithm is selected from the suffix; the Checksummer
interface takes the suffix so no circular import is needed.

Wizard UI shows (sha256) and (sha512) links per download button;
non-enterprise builds show a localized (checksums) tooltip.
Integration tests cover both algorithms (GET, HEAD, validate,
reproducibility, error cases).

Signed-off-by: Mateusz Urbanek <mateusz.urbanek@siderolabs.com>
2026-04-17 14:11:55 +02:00
Andrey Smirnov
b379bf2cd2
feat: switch schematic cache to LRU and negative TTL
Fixes #408

Now we have proper cache capacity, LRU, and also negative cache TTL to
help with case when multiple instance might disagree on whether cache
contains not found or not.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2026-02-27 16:17:26 +04:00
Noel Georgi
f1dad9da10
feat: better test matrix
Better test matrix for `EnhanceFromSchematic`.

Less duplicates and covers all versions, easier to add newer Talos versions, this caught a very small bug where `extraKernelArgs` were populated when overlays were used.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2025-11-05 19:14:37 +05:30
Aleksandr Gamzin
15596662c7
feat: replace hardcoded artifact image constants with CLI-configurable values
Adds CLI flags that replace hardcoded image constants

Signed-off-by: Aleksandr Gamzin <gamzin@altlinux.org>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-10-17 20:27:07 +04:00
Mateusz Urbanek
a1e37078e1
feat: add fallback if S3 is missbehaving
Add fallback to direct asset download in case of S3 issues.

Signed-off-by: Mateusz Urbanek <mateusz.urbanek@siderolabs.com>
2025-08-14 11:35:40 +02:00
Mateusz Urbanek
e1e80fdf71
feat: serve talosctl from image factory
Add support for serving talosctl-all image which will contain all
talosctls built for all platform/architecture combinations, so we can
offer a download URL for them in Image Factory.

Fixes #260

Signed-off-by: Mateusz Urbanek <mateusz.urbanek@siderolabs.com>
2025-07-09 17:22:08 +02:00
Andrey Smirnov
d9ebc5a257
fix: refresh remote pullers and pushers on interval
This is not a fix, but a bit of a workaround for issues in the upstream
library.

Use a refresh on interval strategy to ensure that both remote pushers
and pullers are refreshed.

Fixes #231

Fixes #235

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-06-05 10:10:08 +04:00
Noel Georgi
a016223e8c
feat: pull in new Talos machinery
Pull in new Talos machinery, drop dependency on alpine and add required
tools from pkgs.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2025-03-05 21:56:34 +05:30
Andrey Smirnov
a8cdc21f87
feat: update dependencies for Talos 1.9
Update Talos and other dependencies preparing for Talos 1.9 release.

Fixes https://github.com/siderolabs/talos/issues/9826

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-12-02 15:20:32 +04:00
Andrey Smirnov
f82ff73745
fix: properly handle from ghcr.io
It returns 404 only when trying to pull a layer, but not when we get the
manifest.

Refactor all cases when we try to handle registry errors to use a common
function.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-11-30 14:21:47 +04:00
Andrey Smirnov
1a4d8364de
feat: implement metrics for Image Factory
Fixes #14

This adds "standard" HTTP metrics for the frontend, and also three kinds
of custom metrics:

* schematic get/create
* system extension popularity score
* asset build metrics: cached/not cached, bytes, requests, in dimension
  of asset kind

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-10-31 22:09:02 +04:00
Andrey Smirnov
25100a658a
fix: various (small) fixes for registry operations
Pass auth to the registry frontend so that it correctly authenticates to
the registry on uploads/checks.

Refactor the code in the registry frontend to use digest instead of tag
when redirecting request for additional security.

In the schematic registry storage, push a manifest on top of raw blob to
make sure it doesn't get garbage collected as orphaned. We never use the
manifest though.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-09-20 22:28:17 +04:00
Andrew Rynhard
91bbcd2c82
chore: rename with new nomenclature
Themes the nomenclature to align with Talos Linux

Signed-off-by: Andrew Rynhard <andrew@rynhard.io>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-09-18 22:30:22 +04:00