Add the snapshot provider, asset server, plugin binary and install docs #6
GROQ_API_KEY / GROQ_API_KEY_backup in .env
does it make more sense to just merge all of these in one PR with rebase-merge? we don't have to do squash merge here yet?
@@ -1,10 +1,344 @@
# Azure Blob object-store plugin
-An out-of-tree [Agent Substrate](https://github.com/agent-substrate/substrate)
-object-store plugin backed by Azure Blob Storage.
+This plugin implements [Agent Substrate](https://github.com/agent-substrate/substrate)'s
+`substrate.objectstore.v1` node and control services with Azure Blob Storage,
+and its `AssetProvider` for sandbox assets. It runs in `node` mode beside
+atelet and in `control` mode beside ate-api-server. The module imports only
+substrate's public `api/` and `pkg/` packages.
-The plugin code is landing in follow-up pull requests. This repository
-currently holds the Go module, its build targets and CI.
+The plugin stores each requested snapshot file as one block blob. Uploads use
+deterministic staged block IDs and atomically replace the committed block list,
+so a retry after a partial upload is safe. Each blob carries a SHA-256 digest
+in metadata. Fetch and copy verify that digest before exposing or committing
+the destination bytes. Azure also verifies each staged block's MD5 in transit.
+
+## Compatibility
+
+The plugin needs a substrate that serves the `substrate.objectstore.v1` proto
+package, introduced by
+[agent-substrate/substrate@48f5744](https://github.com/agent-substrate/substrate/commit/48f5744c1dde5ffa63e926f5b4d037065f109965).
+As of 2026-10-28, no substrate release includes it and the `release-0.6` branch
+does not either. Releases cut from `main` after that commit will; v0.6.x patch
+releases cut from `release-0.6` will not unless the commit is cherry-picked
+there. v0.6.0 and earlier call the old `objectstore.v1` service name, so this
:robot: non-blocking: this is already stale, v1.0.0 contains 48f5744. We should just say it needs substrate v1.0.0 or later, drop the dated sentence, and bump go.mod to v1.0.0 instead of the pseudo-version. The only changes to api/objectstore and pkg/assetfetch since the pin are copyright headers.
@@ -1,10 +1,344 @@
# Azure Blob object-store plugin
-An out-of-tree [Agent Substrate](https://github.com/agent-substrate/substrate)
-object-store plugin backed by Azure Blob Storage.
+This plugin implements [Agent Substrate](https://github.com/agent-substrate/substrate)'s
+`substrate.objectstore.v1` node and control services with Azure Blob Storage,
+and its `AssetProvider` for sandbox assets. It runs in `node` mode beside
+atelet and in `control` mode beside ate-api-server. The module imports only
+substrate's public `api/` and `pkg/` packages.
-The plugin code is landing in follow-up pull requests. This repository
-currently holds the Go module, its build targets and CI.
+The plugin stores each requested snapshot file as one block blob. Uploads use
+deterministic staged block IDs and atomically replace the committed block list,
+so a retry after a partial upload is safe. Each blob carries a SHA-256 digest
+in metadata. Fetch and copy verify that digest before exposing or committing
+the destination bytes. Azure also verifies each staged block's MD5 in transit.
+
+## Compatibility
+
+The plugin needs a substrate that serves the `substrate.objectstore.v1` proto
+package, introduced by
+[agent-substrate/substrate@48f5744](https://github.com/agent-substrate/substrate/commit/48f5744c1dde5ffa63e926f5b4d037065f109965).
+As of 2026-10-28, no substrate release includes it and the `release-0.6` branch
+does not either. Releases cut from `main` after that commit will; v0.6.x patch
+releases cut from `release-0.6` will not unless the commit is cherry-picked
+there. v0.6.0 and earlier call the old `objectstore.v1` service name, so this
+plugin answers them with `Unimplemented`. `go.mod` pins the substrate version
+the plugin is built and tested against.
+
+## Sidecars
+
+Substrate's install manifests run an `objectstore-plugin` native sidecar next to
+atelet and ate-api-server, and the callers reach it over a Unix socket in a
+pod-local `emptyDir`:
+
+- node socket: `/run/objectstore-plugin/node.sock`
+- control socket: `/run/objectstore-plugin/control.sock`
+- node snapshot root: `/var/lib/ate`
+
+The `config/` component replaces those sidecars' image and arguments with this
+plugin's, removes the base `ATE_STORAGE_BACKEND`, adds the workload identity
+environment and projected token, and points their startup probes at
+`azure-blob-objectstore-plugin healthcheck`, which reports whether the plugin at
+`--socket` is serving gRPC health. It leaves the caller containers and the
+socket volume as the base defines them. The base control sidecar's credential
+exchange settings also stay: the `exchange` port, `ATE_API_ACTOR_JWT_ISSUER`,
+`POD_NAMESPACE`, and the `servicedns`, `podidentity` and `actor-id-jwt-jwks`
+mounts; this plugin serves no exchange and reads none of them. The
+`ATE_API_SNAPSHOT_TRANSFER_SERVICE_ACCOUNT` variable still comes from the
+ConfigMap key ate-setup writes, so a hand-written ConfigMap must still carry
+that key for the pod to start. On the kind overlay, the `AWS_*` variables its
+RustFS patches add also stay on both sidecars; the plugin reads none of them.
+
+## Snapshot URIs
+
+The plugin accepts:
+
+```text
+azblob://<container>/<snapshot-prefix>
+```
+
+`<container>` must be one of `--containers`, and `CopySnapshot` may copy
+between any two of them. `--prefix`, when set, is prepended to every snapshot
+prefix in every container, allowing all substrate data to live below one
+directory. The blob name prefix is the URI's percent-decoded path, so
+`root%2Fsub` and `root/sub` name the same blobs, as they do in substrate's
+objectstore-plugin. A bare container, userinfo, a query or fragment, `\`, and `.`,
+`..` or other path segments made only of dots and spaces are rejected.
+
+## Sandbox assets
+
+In `node` mode with `--asset-containers` set (the `config/assets` component
+sets it), the plugin also serves
+`AssetProvider.FetchAsset`, which atelet calls for every sandbox asset URL
+that is not `gs://` (for example the micro-VM kernel, rootfs,
:robot: non-blocking: this isn't quite right, atelet calls FetchAsset for every asset URL, gs:// included, and only reads a gs:// asset anonymously after the plugin declines it.
https://github.com/agent-substrate/substrate/blob/b34fbee742906494b5eb4f1f36987176bf8770a4/cmd/atelet/sandbox_assets.go#L299-L337
@@ -1,10 +1,344 @@
# Azure Blob object-store plugin
-An out-of-tree [Agent Substrate](https://github.com/agent-substrate/substrate)
-object-store plugin backed by Azure Blob Storage.
+This plugin implements [Agent Substrate](https://github.com/agent-substrate/substrate)'s
+`substrate.objectstore.v1` node and control services with Azure Blob Storage,
+and its `AssetProvider` for sandbox assets. It runs in `node` mode beside
+atelet and in `control` mode beside ate-api-server. The module imports only
+substrate's public `api/` and `pkg/` packages.
-The plugin code is landing in follow-up pull requests. This repository
-currently holds the Go module, its build targets and CI.
+The plugin stores each requested snapshot file as one block blob. Uploads use
+deterministic staged block IDs and atomically replace the committed block list,
+so a retry after a partial upload is safe. Each blob carries a SHA-256 digest
+in metadata. Fetch and copy verify that digest before exposing or committing
+the destination bytes. Azure also verifies each staged block's MD5 in transit.
+
+## Compatibility
+
+The plugin needs a substrate that serves the `substrate.objectstore.v1` proto
+package, introduced by
+[agent-substrate/substrate@48f5744](https://github.com/agent-substrate/substrate/commit/48f5744c1dde5ffa63e926f5b4d037065f109965).
+As of 2026-10-28, no substrate release includes it and the `release-0.6` branch
+does not either. Releases cut from `main` after that commit will; v0.6.x patch
+releases cut from `release-0.6` will not unless the commit is cherry-picked
+there. v0.6.0 and earlier call the old `objectstore.v1` service name, so this
+plugin answers them with `Unimplemented`. `go.mod` pins the substrate version
+the plugin is built and tested against.
+
+## Sidecars
+
+Substrate's install manifests run an `objectstore-plugin` native sidecar next to
+atelet and ate-api-server, and the callers reach it over a Unix socket in a
+pod-local `emptyDir`:
+
+- node socket: `/run/objectstore-plugin/node.sock`
+- control socket: `/run/objectstore-plugin/control.sock`
+- node snapshot root: `/var/lib/ate`
+
+The `config/` component replaces those sidecars' image and arguments with this
+plugin's, removes the base `ATE_STORAGE_BACKEND`, adds the workload identity
+environment and projected token, and points their startup probes at
+`azure-blob-objectstore-plugin healthcheck`, which reports whether the plugin at
+`--socket` is serving gRPC health. It leaves the caller containers and the
+socket volume as the base defines them. The base control sidecar's credential
+exchange settings also stay: the `exchange` port, `ATE_API_ACTOR_JWT_ISSUER`,
+`POD_NAMESPACE`, and the `servicedns`, `podidentity` and `actor-id-jwt-jwks`
+mounts; this plugin serves no exchange and reads none of them. The
+`ATE_API_SNAPSHOT_TRANSFER_SERVICE_ACCOUNT` variable still comes from the
+ConfigMap key ate-setup writes, so a hand-written ConfigMap must still carry
+that key for the pod to start. On the kind overlay, the `AWS_*` variables its
+RustFS patches add also stay on both sidecars; the plugin reads none of them.
+
+## Snapshot URIs
+
+The plugin accepts:
+
+```text
+azblob://<container>/<snapshot-prefix>
+```
+
+`<container>` must be one of `--containers`, and `CopySnapshot` may copy
+between any two of them. `--prefix`, when set, is prepended to every snapshot
+prefix in every container, allowing all substrate data to live below one
+directory. The blob name prefix is the URI's percent-decoded path, so
+`root%2Fsub` and `root/sub` name the same blobs, as they do in substrate's
+objectstore-plugin. A bare container, userinfo, a query or fragment, `\`, and `.`,
+`..` or other path segments made only of dots and spaces are rejected.
+
+## Sandbox assets
+
+In `node` mode with `--asset-containers` set (the `config/assets` component
+sets it), the plugin also serves
+`AssetProvider.FetchAsset`, which atelet calls for every sandbox asset URL
+that is not `gs://` (for example the micro-VM kernel, rootfs,
+`cloud-hypervisor` and `virtiofsd` in a `SandboxConfig`). Asset URLs use the
+blob's native URL in the plugin's account:
+
+```text
+https://<account>.blob.core.windows.net/<container>/<blob>
+```
+
+`<container>` must be one of `--asset-containers`; it may also be a snapshot
+container. The blob name is used as is: `--prefix` does not apply. A URL on
+another host, with a query (such as a SAS token), user info or a fragment, or
+with a non-canonical blob name (empty, `.`-terminated or space-padded
+segments, `\`) is rejected with `InvalidArgument`.
+
+The plugin applies the same two checks as substrate's objectstore-plugin,
+through substrate's `pkg/assetfetch`:
+
+- It refuses, with `PermissionDenied` and before any download, any blob
+ stored under a snapshot or tag location
+ (`.../atespaces/<atespace>/actors/<uid>/snapshots/<name>/...` or
+ `.../atespaces/<atespace>/tags/<uid>/...`) in any container, so the node
+ identity's read access to snapshots cannot be used to read them as assets.
+- It downloads into `--asset-staging-dir`, which only the plugin container
+ mounts, stops at `max_bytes`, verifies the requested sha256, and only then
+ atomically replaces atelet's existing file with the bytes. atelet verifies
+ the sha256 again.
+
+Downloads in flight hold at most `--asset-staging-capacity` bytes in the
+staging directory together: each reserves its blob's size, and one that does
+not fit waits for the others. A blob larger than the capacity is refused with
+`FailedPrecondition`. The default, `8Gi`, matches atelet's per-asset cap and
+the base manifest's `asset-staging` volume.
+
+The node identity needs `Storage Blob Data Reader` on each asset container
+that is not also a snapshot container.
+
+Without `--asset-containers`, atelet's plugin serves no assets and atelet gets
+`Unimplemented`: it still reads public `gs://` assets, such as the default
+gVisor release, anonymously, and fails any other asset URL. The `config/`
+component alone is therefore a snapshot-only install; see
+[Deployment](#deployment) for adding assets.
+
+## Configuration
+
+| Flag | Environment fallback | Default | Purpose |
+|---|---|---|---|
+| `--account-url` | `AZURE_STORAGE_ACCOUNT_URL` | required | `https://<account>.blob.core.windows.net` |
+| `--containers` | `AZURE_STORAGE_CONTAINERS` | required | Comma-separated blob containers that snapshot URIs may name; a name that breaks Azure's container naming rules fails startup |
+| `--prefix` | `AZURE_STORAGE_PREFIX` | empty | Prefix prepended to every snapshot key |
+| `--socket` | none | required | Unix socket to serve |
+| `--root` | none | `/var/lib/ate` | Node mode's allowed local snapshot and asset tree |
+| `--asset-containers` | `AZURE_STORAGE_ASSET_CONTAINERS` | empty | Node mode: comma-separated blob containers that sandbox asset URLs may name; empty serves no assets (atelet then gets `Unimplemented`) |
+| `--asset-staging-dir` | none | `/var/lib/objectstore-plugin/asset-staging` | Node mode: private directory assets are downloaded into and verified in; must not be below `--root` |
+| `--asset-staging-capacity` | none | `8Gi` | Node mode: the most asset downloads in `--asset-staging-dir` may hold at once, as a Kubernetes quantity |
+
+`healthcheck` mode takes `--socket` and `--timeout` (default `5s`) and exits
+non-zero unless the plugin at `--socket` reports `SERVING` within the timeout.
+
+The account URL must use `https`. The plugin sends requests, and with them its
+storage token, only to the scheme and host of `--account-url`: it refuses a
+request to any other endpoint and does not follow redirects. Snapshot URIs
+name only a container and prefix, never a host, so no request can choose
+where the token goes.
+
+## Authentication
+
+The plugin authenticates to Azure Storage only with Microsoft Entra workload
+identity federation: it exchanges the pod's projected service account token for
+an Entra token. It does not accept storage account keys, connection strings,
+SAS tokens, client secrets or certificates, and never authenticates as the
+node's managed identity. It reads the standard `azidentity` variables:
+
+| Variable | Value |
+|---|---|
+| `AZURE_CLIENT_ID` | Client ID of the user-assigned managed identity whose federated identity credential trusts the cluster's service account token issuer |
+| `AZURE_TENANT_ID` | Microsoft Entra tenant ID |
+| `AZURE_FEDERATED_TOKEN_FILE` | Path of the projected service account token |
+
+The plugin fails at startup, naming the missing variables, when any of them is
+unset or the token file cannot be read. It has no other credential to fall
+back to.
+
+Create federated identity credentials with audience
+`api://AzureADTokenExchange`, the cluster's service account issuer, and these
+subjects:
+
+```text
+system:serviceaccount:ate-system:atelet
+system:serviceaccount:ate-system:ate-api-server
+```
+
+Microsoft Entra ID must be able to fetch the issuer's OIDC discovery document
+and signing keys.
+
+Grant each identity `Storage Blob Data Contributor` scoped to each container in
+`--containers`:
+
+```bash
+CONTAINER_SCOPE="/subscriptions/<subscription>/resourceGroups/<resource-group>/providers/Microsoft.Storage/storageAccounts/<account>/blobServices/default/containers/<container>"
+az role assignment create \
+ --assignee-object-id <principal-object-id> \
+ --assignee-principal-type ServicePrincipal \
+ --role "Storage Blob Data Contributor" \
+ --scope "$CONTAINER_SCOPE"
+```
+
+`ServicePrincipal` is the principal type Azure role assignments use for
+managed identities as well, so it is correct for a user-assigned managed
+identity; no client secret or certificate is involved.
+
+The identity federated to `system:serviceaccount:ate-system:atelet` (the
+plugin in `node` mode) needs blob read/write access. The identity federated to
+`system:serviceaccount:ate-system:ate-api-server` (the plugin in `control` mode)
+needs blob read/write/delete access; the built-in role above covers both.
+
+## Deployment
+
+Clone this repository and build and push the image:
+
+```bash
+KO_DOCKER_REPO=<registry> make build-image
+```
+
+The `config/` component configures workload identity: it projects a service
+account token with audience `api://AzureADTokenExchange` into both sidecars and
+sets their `AZURE_*` variables, without a webhook mutating the whole Pod. Edit
+`config/kustomization.yaml` to set:
+
+- both `example.invalid/replace-with-azure-blob-objectstore-plugin:latest` image
+ fields to the digest reference printed by `make build-image`;
+- both client IDs and the tenant ID;
+- the storage account URL;
+- the containers;
+- the optional storage prefix.
+
+`ate-setup` has no option to add a component, so add this one, by its path
+relative to the overlay, to the overlay that `ate-setup deploy ate-system`
+renders in your substrate checkout: `manifests/ate-install/base` by default,
+or `manifests/ate-install/kind` with `--kind`. For example, with this
+repository cloned next to substrate, in
+`manifests/ate-install/kind/kustomization.yaml`:
+
+```yaml
+components:
+- ../../../../objectstore-azure-blob/config
+```
+
+To serve sandbox assets from blob containers as well, replace the
+`REPLACE_WITH_ASSET_CONTAINERS` placeholder in `config/assets/kustomization.yaml`
+with a comma-separated list of containers, grant the node identity read access
+to them, and list that component after the first:
+
+```yaml
+components:
+- ../../../../objectstore-azure-blob/config
+- ../../../../objectstore-azure-blob/config/assets
+```
+
+A `SandboxConfig` version then names each asset by its blob URL and sha256, for
+example:
+
+```yaml
+assets:
+ amd64:
+ kata-kernel:
+ url: https://<account>.blob.core.windows.net/<container>/kata/vmlinux
+ sha256: <sha256 of the blob>
+```
+
+Then install from the substrate repository root:
+
+```bash
+go run ./cmd/ate-setup deploy ate-system \
+ --kind \
+ --context <context> \
+ --ko-docker-repo <registry> \
+ --ko-default-platforms linux/amd64 \
+ --credential-provider='{"name":"k8s.io"}' \
+ --snapshot-location=azblob://<container>/<snapshot-root>/
+```
+
+`--kind` selects the kind overlay. It does not create a kind cluster, but it
+defaults several settings to a local kind setup, including the context,
+registry, and build platform, so name all three for any other cluster. It
+also defaults the snapshot location to `gs://ate-snapshots/`, which this plugin
+rejects, so set `--snapshot-location` on kind too.
+
+On any other cluster, ate-setup currently installs for GKE: `deploy ate-system`
+refuses to start without `--snapshot-transfer-gsa-name` and
+`--gcp-project-id`, which configure the GCS credential exchange this plugin
+replaces. The plugin reads neither.
+
+Only `deploy ate-system` renders that overlay. `deploy atelet` and
+`deploy apiserver` apply their manifests without it, which puts the base
+`objectstore-plugin` sidecars back, so redeploy with `deploy ate-system`.
+
+The component changes only the sidecars. atelet and ate-api-server have no
+object storage settings of their own. atelet still needs the node's kubelet
+image credential provider from the chosen overlay to pull private actor
+images: `base` uses GKE's credential provider paths, and the kind overlay pulls
+actor images without credentials.
+
+## Snapshot location
+
+ate-api-server stores snapshots under `--snapshot-location`, which must be an
+`azblob://` URI in one of the configured containers. With the
+`PerTemplateSnapshotLocation` preview gate, an ActorTemplate's
+`snapshotConfig.storageLocation` overrides it and must meet the same rule.
+Without the gate, ate-api-server ignores that field. See
+[Snapshot storage](https://github.com/agent-substrate/substrate/blob/main/docs/operator-install.md#snapshot-storage).
:robot: non-blocking: as of v1.0.0 the API rejects snapshotConfig.storageLocation when the gate is off, it's not ignored. The link is also a 404 now, the doc moved to docs/guides/operator-install.md. I'd just link it and not restate the gate behavior here:
https://github.com/agent-substrate/substrate/blob/v1.0.0/docs/guides/operator-install.md#snapshot-storage
@@ -1,10 +1,344 @@
# Azure Blob object-store plugin
-An out-of-tree [Agent Substrate](https://github.com/agent-substrate/substrate)
-object-store plugin backed by Azure Blob Storage.
+This plugin implements [Agent Substrate](https://github.com/agent-substrate/substrate)'s
+`substrate.objectstore.v1` node and control services with Azure Blob Storage,
+and its `AssetProvider` for sandbox assets. It runs in `node` mode beside
+atelet and in `control` mode beside ate-api-server. The module imports only
+substrate's public `api/` and `pkg/` packages.
-The plugin code is landing in follow-up pull requests. This repository
-currently holds the Go module, its build targets and CI.
+The plugin stores each requested snapshot file as one block blob. Uploads use
+deterministic staged block IDs and atomically replace the committed block list,
+so a retry after a partial upload is safe. Each blob carries a SHA-256 digest
+in metadata. Fetch and copy verify that digest before exposing or committing
+the destination bytes. Azure also verifies each staged block's MD5 in transit.
+
+## Compatibility
+
+The plugin needs a substrate that serves the `substrate.objectstore.v1` proto
+package, introduced by
+[agent-substrate/substrate@48f5744](https://github.com/agent-substrate/substrate/commit/48f5744c1dde5ffa63e926f5b4d037065f109965).
+As of 2026-10-28, no substrate release includes it and the `release-0.6` branch
+does not either. Releases cut from `main` after that commit will; v0.6.x patch
+releases cut from `release-0.6` will not unless the commit is cherry-picked
+there. v0.6.0 and earlier call the old `objectstore.v1` service name, so this
+plugin answers them with `Unimplemented`. `go.mod` pins the substrate version
+the plugin is built and tested against.
+
+## Sidecars
+
+Substrate's install manifests run an `objectstore-plugin` native sidecar next to
+atelet and ate-api-server, and the callers reach it over a Unix socket in a
+pod-local `emptyDir`:
+
+- node socket: `/run/objectstore-plugin/node.sock`
+- control socket: `/run/objectstore-plugin/control.sock`
+- node snapshot root: `/var/lib/ate`
+
+The `config/` component replaces those sidecars' image and arguments with this
+plugin's, removes the base `ATE_STORAGE_BACKEND`, adds the workload identity
+environment and projected token, and points their startup probes at
+`azure-blob-objectstore-plugin healthcheck`, which reports whether the plugin at
+`--socket` is serving gRPC health. It leaves the caller containers and the
+socket volume as the base defines them. The base control sidecar's credential
+exchange settings also stay: the `exchange` port, `ATE_API_ACTOR_JWT_ISSUER`,
+`POD_NAMESPACE`, and the `servicedns`, `podidentity` and `actor-id-jwt-jwks`
+mounts; this plugin serves no exchange and reads none of them. The
+`ATE_API_SNAPSHOT_TRANSFER_SERVICE_ACCOUNT` variable still comes from the
+ConfigMap key ate-setup writes, so a hand-written ConfigMap must still carry
+that key for the pod to start. On the kind overlay, the `AWS_*` variables its
+RustFS patches add also stay on both sidecars; the plugin reads none of them.
+
+## Snapshot URIs
+
+The plugin accepts:
+
+```text
+azblob://<container>/<snapshot-prefix>
+```
+
+`<container>` must be one of `--containers`, and `CopySnapshot` may copy
+between any two of them. `--prefix`, when set, is prepended to every snapshot
+prefix in every container, allowing all substrate data to live below one
+directory. The blob name prefix is the URI's percent-decoded path, so
+`root%2Fsub` and `root/sub` name the same blobs, as they do in substrate's
+objectstore-plugin. A bare container, userinfo, a query or fragment, `\`, and `.`,
+`..` or other path segments made only of dots and spaces are rejected.
+
+## Sandbox assets
+
+In `node` mode with `--asset-containers` set (the `config/assets` component
+sets it), the plugin also serves
+`AssetProvider.FetchAsset`, which atelet calls for every sandbox asset URL
+that is not `gs://` (for example the micro-VM kernel, rootfs,
+`cloud-hypervisor` and `virtiofsd` in a `SandboxConfig`). Asset URLs use the
+blob's native URL in the plugin's account:
+
+```text
+https://<account>.blob.core.windows.net/<container>/<blob>
+```
+
+`<container>` must be one of `--asset-containers`; it may also be a snapshot
+container. The blob name is used as is: `--prefix` does not apply. A URL on
+another host, with a query (such as a SAS token), user info or a fragment, or
+with a non-canonical blob name (empty, `.`-terminated or space-padded
+segments, `\`) is rejected with `InvalidArgument`.
+
+The plugin applies the same two checks as substrate's objectstore-plugin,
+through substrate's `pkg/assetfetch`:
+
+- It refuses, with `PermissionDenied` and before any download, any blob
+ stored under a snapshot or tag location
+ (`.../atespaces/<atespace>/actors/<uid>/snapshots/<name>/...` or
+ `.../atespaces/<atespace>/tags/<uid>/...`) in any container, so the node
+ identity's read access to snapshots cannot be used to read them as assets.
+- It downloads into `--asset-staging-dir`, which only the plugin container
+ mounts, stops at `max_bytes`, verifies the requested sha256, and only then
+ atomically replaces atelet's existing file with the bytes. atelet verifies
+ the sha256 again.
+
+Downloads in flight hold at most `--asset-staging-capacity` bytes in the
+staging directory together: each reserves its blob's size, and one that does
+not fit waits for the others. A blob larger than the capacity is refused with
+`FailedPrecondition`. The default, `8Gi`, matches atelet's per-asset cap and
+the base manifest's `asset-staging` volume.
+
+The node identity needs `Storage Blob Data Reader` on each asset container
+that is not also a snapshot container.
+
+Without `--asset-containers`, atelet's plugin serves no assets and atelet gets
+`Unimplemented`: it still reads public `gs://` assets, such as the default
+gVisor release, anonymously, and fails any other asset URL. The `config/`
+component alone is therefore a snapshot-only install; see
+[Deployment](#deployment) for adding assets.
+
+## Configuration
+
+| Flag | Environment fallback | Default | Purpose |
+|---|---|---|---|
+| `--account-url` | `AZURE_STORAGE_ACCOUNT_URL` | required | `https://<account>.blob.core.windows.net` |
+| `--containers` | `AZURE_STORAGE_CONTAINERS` | required | Comma-separated blob containers that snapshot URIs may name; a name that breaks Azure's container naming rules fails startup |
+| `--prefix` | `AZURE_STORAGE_PREFIX` | empty | Prefix prepended to every snapshot key |
+| `--socket` | none | required | Unix socket to serve |
+| `--root` | none | `/var/lib/ate` | Node mode's allowed local snapshot and asset tree |
+| `--asset-containers` | `AZURE_STORAGE_ASSET_CONTAINERS` | empty | Node mode: comma-separated blob containers that sandbox asset URLs may name; empty serves no assets (atelet then gets `Unimplemented`) |
+| `--asset-staging-dir` | none | `/var/lib/objectstore-plugin/asset-staging` | Node mode: private directory assets are downloaded into and verified in; must not be below `--root` |
+| `--asset-staging-capacity` | none | `8Gi` | Node mode: the most asset downloads in `--asset-staging-dir` may hold at once, as a Kubernetes quantity |
+
+`healthcheck` mode takes `--socket` and `--timeout` (default `5s`) and exits
+non-zero unless the plugin at `--socket` reports `SERVING` within the timeout.
+
+The account URL must use `https`. The plugin sends requests, and with them its
+storage token, only to the scheme and host of `--account-url`: it refuses a
+request to any other endpoint and does not follow redirects. Snapshot URIs
+name only a container and prefix, never a host, so no request can choose
+where the token goes.
+
+## Authentication
+
+The plugin authenticates to Azure Storage only with Microsoft Entra workload
+identity federation: it exchanges the pod's projected service account token for
+an Entra token. It does not accept storage account keys, connection strings,
+SAS tokens, client secrets or certificates, and never authenticates as the
+node's managed identity. It reads the standard `azidentity` variables:
+
+| Variable | Value |
+|---|---|
+| `AZURE_CLIENT_ID` | Client ID of the user-assigned managed identity whose federated identity credential trusts the cluster's service account token issuer |
+| `AZURE_TENANT_ID` | Microsoft Entra tenant ID |
+| `AZURE_FEDERATED_TOKEN_FILE` | Path of the projected service account token |
+
+The plugin fails at startup, naming the missing variables, when any of them is
+unset or the token file cannot be read. It has no other credential to fall
+back to.
+
+Create federated identity credentials with audience
+`api://AzureADTokenExchange`, the cluster's service account issuer, and these
+subjects:
+
+```text
+system:serviceaccount:ate-system:atelet
+system:serviceaccount:ate-system:ate-api-server
+```
+
+Microsoft Entra ID must be able to fetch the issuer's OIDC discovery document
+and signing keys.
+
+Grant each identity `Storage Blob Data Contributor` scoped to each container in
+`--containers`:
+
+```bash
+CONTAINER_SCOPE="/subscriptions/<subscription>/resourceGroups/<resource-group>/providers/Microsoft.Storage/storageAccounts/<account>/blobServices/default/containers/<container>"
+az role assignment create \
+ --assignee-object-id <principal-object-id> \
+ --assignee-principal-type ServicePrincipal \
+ --role "Storage Blob Data Contributor" \
+ --scope "$CONTAINER_SCOPE"
+```
+
+`ServicePrincipal` is the principal type Azure role assignments use for
+managed identities as well, so it is correct for a user-assigned managed
+identity; no client secret or certificate is involved.
+
+The identity federated to `system:serviceaccount:ate-system:atelet` (the
+plugin in `node` mode) needs blob read/write access. The identity federated to
+`system:serviceaccount:ate-system:ate-api-server` (the plugin in `control` mode)
+needs blob read/write/delete access; the built-in role above covers both.
+
+## Deployment
+
+Clone this repository and build and push the image:
+
+```bash
+KO_DOCKER_REPO=<registry> make build-image
+```
+
+The `config/` component configures workload identity: it projects a service
+account token with audience `api://AzureADTokenExchange` into both sidecars and
+sets their `AZURE_*` variables, without a webhook mutating the whole Pod. Edit
+`config/kustomization.yaml` to set:
+
+- both `example.invalid/replace-with-azure-blob-objectstore-plugin:latest` image
+ fields to the digest reference printed by `make build-image`;
+- both client IDs and the tenant ID;
+- the storage account URL;
+- the containers;
+- the optional storage prefix.
+
+`ate-setup` has no option to add a component, so add this one, by its path
+relative to the overlay, to the overlay that `ate-setup deploy ate-system`
+renders in your substrate checkout: `manifests/ate-install/base` by default,
+or `manifests/ate-install/kind` with `--kind`. For example, with this
+repository cloned next to substrate, in
+`manifests/ate-install/kind/kustomization.yaml`:
+
+```yaml
+components:
+- ../../../../objectstore-azure-blob/config
+```
+
+To serve sandbox assets from blob containers as well, replace the
+`REPLACE_WITH_ASSET_CONTAINERS` placeholder in `config/assets/kustomization.yaml`
+with a comma-separated list of containers, grant the node identity read access
+to them, and list that component after the first:
+
+```yaml
+components:
+- ../../../../objectstore-azure-blob/config
+- ../../../../objectstore-azure-blob/config/assets
+```
+
+A `SandboxConfig` version then names each asset by its blob URL and sha256, for
+example:
+
+```yaml
+assets:
+ amd64:
+ kata-kernel:
+ url: https://<account>.blob.core.windows.net/<container>/kata/vmlinux
+ sha256: <sha256 of the blob>
+```
+
+Then install from the substrate repository root:
+
+```bash
+go run ./cmd/ate-setup deploy ate-system \
+ --kind \
+ --context <context> \
+ --ko-docker-repo <registry> \
+ --ko-default-platforms linux/amd64 \
+ --credential-provider='{"name":"k8s.io"}' \
+ --snapshot-location=azblob://<container>/<snapshot-root>/
+```
+
+`--kind` selects the kind overlay. It does not create a kind cluster, but it
+defaults several settings to a local kind setup, including the context,
+registry, and build platform, so name all three for any other cluster. It
+also defaults the snapshot location to `gs://ate-snapshots/`, which this plugin
+rejects, so set `--snapshot-location` on kind too.
+
+On any other cluster, ate-setup currently installs for GKE: `deploy ate-system`
+refuses to start without `--snapshot-transfer-gsa-name` and
+`--gcp-project-id`, which configure the GCS credential exchange this plugin
+replaces. The plugin reads neither.
:robot: non-blocking: this reads like advice to run --kind against AKS etc, but --kind also brings the rest of the kind overlay (rustfs with rustfsadmin/rustfsadmin, which also leaves those AWS_* keys on both sidecars, plus the bundled prometheus and otel collector), and it fails without a working local docker info.
I think we should say plainly that ate-setup can only install this on kind for now, until agent-substrate/substrate#3651 lands, and not point other clusters at --kind.
@@ -1,10 +1,344 @@
# Azure Blob object-store plugin
-An out-of-tree [Agent Substrate](https://github.com/agent-substrate/substrate)
-object-store plugin backed by Azure Blob Storage.
+This plugin implements [Agent Substrate](https://github.com/agent-substrate/substrate)'s
+`substrate.objectstore.v1` node and control services with Azure Blob Storage,
+and its `AssetProvider` for sandbox assets. It runs in `node` mode beside
+atelet and in `control` mode beside ate-api-server. The module imports only
+substrate's public `api/` and `pkg/` packages.
-The plugin code is landing in follow-up pull requests. This repository
-currently holds the Go module, its build targets and CI.
+The plugin stores each requested snapshot file as one block blob. Uploads use
+deterministic staged block IDs and atomically replace the committed block list,
+so a retry after a partial upload is safe. Each blob carries a SHA-256 digest
+in metadata. Fetch and copy verify that digest before exposing or committing
+the destination bytes. Azure also verifies each staged block's MD5 in transit.
+
+## Compatibility
+
+The plugin needs a substrate that serves the `substrate.objectstore.v1` proto
+package, introduced by
+[agent-substrate/substrate@48f5744](https://github.com/agent-substrate/substrate/commit/48f5744c1dde5ffa63e926f5b4d037065f109965).
+As of 2026-10-28, no substrate release includes it and the `release-0.6` branch
+does not either. Releases cut from `main` after that commit will; v0.6.x patch
+releases cut from `release-0.6` will not unless the commit is cherry-picked
+there. v0.6.0 and earlier call the old `objectstore.v1` service name, so this
+plugin answers them with `Unimplemented`. `go.mod` pins the substrate version
+the plugin is built and tested against.
+
+## Sidecars
+
+Substrate's install manifests run an `objectstore-plugin` native sidecar next to
+atelet and ate-api-server, and the callers reach it over a Unix socket in a
+pod-local `emptyDir`:
+
+- node socket: `/run/objectstore-plugin/node.sock`
+- control socket: `/run/objectstore-plugin/control.sock`
+- node snapshot root: `/var/lib/ate`
+
+The `config/` component replaces those sidecars' image and arguments with this
+plugin's, removes the base `ATE_STORAGE_BACKEND`, adds the workload identity
+environment and projected token, and points their startup probes at
+`azure-blob-objectstore-plugin healthcheck`, which reports whether the plugin at
+`--socket` is serving gRPC health. It leaves the caller containers and the
+socket volume as the base defines them. The base control sidecar's credential
+exchange settings also stay: the `exchange` port, `ATE_API_ACTOR_JWT_ISSUER`,
+`POD_NAMESPACE`, and the `servicedns`, `podidentity` and `actor-id-jwt-jwks`
+mounts; this plugin serves no exchange and reads none of them. The
+`ATE_API_SNAPSHOT_TRANSFER_SERVICE_ACCOUNT` variable still comes from the
+ConfigMap key ate-setup writes, so a hand-written ConfigMap must still carry
+that key for the pod to start. On the kind overlay, the `AWS_*` variables its
+RustFS patches add also stay on both sidecars; the plugin reads none of them.
+
+## Snapshot URIs
+
+The plugin accepts:
+
+```text
+azblob://<container>/<snapshot-prefix>
+```
+
+`<container>` must be one of `--containers`, and `CopySnapshot` may copy
+between any two of them. `--prefix`, when set, is prepended to every snapshot
+prefix in every container, allowing all substrate data to live below one
+directory. The blob name prefix is the URI's percent-decoded path, so
+`root%2Fsub` and `root/sub` name the same blobs, as they do in substrate's
+objectstore-plugin. A bare container, userinfo, a query or fragment, `\`, and `.`,
+`..` or other path segments made only of dots and spaces are rejected.
+
+## Sandbox assets
+
+In `node` mode with `--asset-containers` set (the `config/assets` component
+sets it), the plugin also serves
+`AssetProvider.FetchAsset`, which atelet calls for every sandbox asset URL
+that is not `gs://` (for example the micro-VM kernel, rootfs,
+`cloud-hypervisor` and `virtiofsd` in a `SandboxConfig`). Asset URLs use the
+blob's native URL in the plugin's account:
+
+```text
+https://<account>.blob.core.windows.net/<container>/<blob>
+```
+
+`<container>` must be one of `--asset-containers`; it may also be a snapshot
+container. The blob name is used as is: `--prefix` does not apply. A URL on
+another host, with a query (such as a SAS token), user info or a fragment, or
+with a non-canonical blob name (empty, `.`-terminated or space-padded
+segments, `\`) is rejected with `InvalidArgument`.
+
+The plugin applies the same two checks as substrate's objectstore-plugin,
+through substrate's `pkg/assetfetch`:
+
+- It refuses, with `PermissionDenied` and before any download, any blob
+ stored under a snapshot or tag location
+ (`.../atespaces/<atespace>/actors/<uid>/snapshots/<name>/...` or
+ `.../atespaces/<atespace>/tags/<uid>/...`) in any container, so the node
+ identity's read access to snapshots cannot be used to read them as assets.
+- It downloads into `--asset-staging-dir`, which only the plugin container
+ mounts, stops at `max_bytes`, verifies the requested sha256, and only then
+ atomically replaces atelet's existing file with the bytes. atelet verifies
+ the sha256 again.
+
+Downloads in flight hold at most `--asset-staging-capacity` bytes in the
+staging directory together: each reserves its blob's size, and one that does
+not fit waits for the others. A blob larger than the capacity is refused with
+`FailedPrecondition`. The default, `8Gi`, matches atelet's per-asset cap and
+the base manifest's `asset-staging` volume.
+
+The node identity needs `Storage Blob Data Reader` on each asset container
+that is not also a snapshot container.
+
+Without `--asset-containers`, atelet's plugin serves no assets and atelet gets
+`Unimplemented`: it still reads public `gs://` assets, such as the default
+gVisor release, anonymously, and fails any other asset URL. The `config/`
+component alone is therefore a snapshot-only install; see
+[Deployment](#deployment) for adding assets.
+
+## Configuration
+
+| Flag | Environment fallback | Default | Purpose |
+|---|---|---|---|
+| `--account-url` | `AZURE_STORAGE_ACCOUNT_URL` | required | `https://<account>.blob.core.windows.net` |
+| `--containers` | `AZURE_STORAGE_CONTAINERS` | required | Comma-separated blob containers that snapshot URIs may name; a name that breaks Azure's container naming rules fails startup |
+| `--prefix` | `AZURE_STORAGE_PREFIX` | empty | Prefix prepended to every snapshot key |
+| `--socket` | none | required | Unix socket to serve |
+| `--root` | none | `/var/lib/ate` | Node mode's allowed local snapshot and asset tree |
+| `--asset-containers` | `AZURE_STORAGE_ASSET_CONTAINERS` | empty | Node mode: comma-separated blob containers that sandbox asset URLs may name; empty serves no assets (atelet then gets `Unimplemented`) |
+| `--asset-staging-dir` | none | `/var/lib/objectstore-plugin/asset-staging` | Node mode: private directory assets are downloaded into and verified in; must not be below `--root` |
+| `--asset-staging-capacity` | none | `8Gi` | Node mode: the most asset downloads in `--asset-staging-dir` may hold at once, as a Kubernetes quantity |
+
+`healthcheck` mode takes `--socket` and `--timeout` (default `5s`) and exits
+non-zero unless the plugin at `--socket` reports `SERVING` within the timeout.
+
+The account URL must use `https`. The plugin sends requests, and with them its
+storage token, only to the scheme and host of `--account-url`: it refuses a
+request to any other endpoint and does not follow redirects. Snapshot URIs
+name only a container and prefix, never a host, so no request can choose
+where the token goes.
+
+## Authentication
+
+The plugin authenticates to Azure Storage only with Microsoft Entra workload
+identity federation: it exchanges the pod's projected service account token for
+an Entra token. It does not accept storage account keys, connection strings,
+SAS tokens, client secrets or certificates, and never authenticates as the
+node's managed identity. It reads the standard `azidentity` variables:
+
+| Variable | Value |
+|---|---|
+| `AZURE_CLIENT_ID` | Client ID of the user-assigned managed identity whose federated identity credential trusts the cluster's service account token issuer |
+| `AZURE_TENANT_ID` | Microsoft Entra tenant ID |
+| `AZURE_FEDERATED_TOKEN_FILE` | Path of the projected service account token |
+
+The plugin fails at startup, naming the missing variables, when any of them is
+unset or the token file cannot be read. It has no other credential to fall
+back to.
+
+Create federated identity credentials with audience
+`api://AzureADTokenExchange`, the cluster's service account issuer, and these
+subjects:
+
+```text
+system:serviceaccount:ate-system:atelet
+system:serviceaccount:ate-system:ate-api-server
+```
+
+Microsoft Entra ID must be able to fetch the issuer's OIDC discovery document
+and signing keys.
+
+Grant each identity `Storage Blob Data Contributor` scoped to each container in
+`--containers`:
+
+```bash
+CONTAINER_SCOPE="/subscriptions/<subscription>/resourceGroups/<resource-group>/providers/Microsoft.Storage/storageAccounts/<account>/blobServices/default/containers/<container>"
+az role assignment create \
+ --assignee-object-id <principal-object-id> \
+ --assignee-principal-type ServicePrincipal \
+ --role "Storage Blob Data Contributor" \
+ --scope "$CONTAINER_SCOPE"
+```
+
+`ServicePrincipal` is the principal type Azure role assignments use for
+managed identities as well, so it is correct for a user-assigned managed
+identity; no client secret or certificate is involved.
+
+The identity federated to `system:serviceaccount:ate-system:atelet` (the
+plugin in `node` mode) needs blob read/write access. The identity federated to
+`system:serviceaccount:ate-system:ate-api-server` (the plugin in `control` mode)
+needs blob read/write/delete access; the built-in role above covers both.
+
+## Deployment
+
+Clone this repository and build and push the image:
+
+```bash
+KO_DOCKER_REPO=<registry> make build-image
+```
+
+The `config/` component configures workload identity: it projects a service
+account token with audience `api://AzureADTokenExchange` into both sidecars and
+sets their `AZURE_*` variables, without a webhook mutating the whole Pod. Edit
+`config/kustomization.yaml` to set:
+
+- both `example.invalid/replace-with-azure-blob-objectstore-plugin:latest` image
+ fields to the digest reference printed by `make build-image`;
+- both client IDs and the tenant ID;
+- the storage account URL;
+- the containers;
+- the optional storage prefix.
+
+`ate-setup` has no option to add a component, so add this one, by its path
+relative to the overlay, to the overlay that `ate-setup deploy ate-system`
+renders in your substrate checkout: `manifests/ate-install/base` by default,
+or `manifests/ate-install/kind` with `--kind`. For example, with this
+repository cloned next to substrate, in
+`manifests/ate-install/kind/kustomization.yaml`:
+
+```yaml
+components:
+- ../../../../objectstore-azure-blob/config
+```
+
+To serve sandbox assets from blob containers as well, replace the
+`REPLACE_WITH_ASSET_CONTAINERS` placeholder in `config/assets/kustomization.yaml`
+with a comma-separated list of containers, grant the node identity read access
+to them, and list that component after the first:
+
+```yaml
+components:
+- ../../../../objectstore-azure-blob/config
+- ../../../../objectstore-azure-blob/config/assets
+```
+
+A `SandboxConfig` version then names each asset by its blob URL and sha256, for
+example:
+
+```yaml
+assets:
+ amd64:
+ kata-kernel:
+ url: https://<account>.blob.core.windows.net/<container>/kata/vmlinux
+ sha256: <sha256 of the blob>
+```
+
+Then install from the substrate repository root:
+
+```bash
+go run ./cmd/ate-setup deploy ate-system \
+ --kind \
+ --context <context> \
+ --ko-docker-repo <registry> \
+ --ko-default-platforms linux/amd64 \
+ --credential-provider='{"name":"k8s.io"}' \
+ --snapshot-location=azblob://<container>/<snapshot-root>/
+```
:robot: non-blocking: with the default --sandbox-classes (gvisor,microvm) this leaves micro-VM broken. On kind ate-setup stages the micro-VM assets to rustfs and the microvm SandboxConfig names s3:// URLs, this plugin refuses those with InvalidArgument, and atelet only falls back for gs://.
We should pass --sandbox-classes=gvisor here or document uploading the assets and replacing the microvm SandboxConfig (agent-substrate/substrate#3651's --microvm-asset-location would cover this).
@@ -1,10 +1,344 @@
# Azure Blob object-store plugin
-An out-of-tree [Agent Substrate](https://github.com/agent-substrate/substrate)
-object-store plugin backed by Azure Blob Storage.
+This plugin implements [Agent Substrate](https://github.com/agent-substrate/substrate)'s
+`substrate.objectstore.v1` node and control services with Azure Blob Storage,
+and its `AssetProvider` for sandbox assets. It runs in `node` mode beside
+atelet and in `control` mode beside ate-api-server. The module imports only
+substrate's public `api/` and `pkg/` packages.
-The plugin code is landing in follow-up pull requests. This repository
-currently holds the Go module, its build targets and CI.
+The plugin stores each requested snapshot file as one block blob. Uploads use
+deterministic staged block IDs and atomically replace the committed block list,
+so a retry after a partial upload is safe. Each blob carries a SHA-256 digest
+in metadata. Fetch and copy verify that digest before exposing or committing
+the destination bytes. Azure also verifies each staged block's MD5 in transit.
+
+## Compatibility
+
+The plugin needs a substrate that serves the `substrate.objectstore.v1` proto
+package, introduced by
+[agent-substrate/substrate@48f5744](https://github.com/agent-substrate/substrate/commit/48f5744c1dde5ffa63e926f5b4d037065f109965).
+As of 2026-10-28, no substrate release includes it and the `release-0.6` branch
+does not either. Releases cut from `main` after that commit will; v0.6.x patch
+releases cut from `release-0.6` will not unless the commit is cherry-picked
+there. v0.6.0 and earlier call the old `objectstore.v1` service name, so this
+plugin answers them with `Unimplemented`. `go.mod` pins the substrate version
+the plugin is built and tested against.
+
+## Sidecars
+
+Substrate's install manifests run an `objectstore-plugin` native sidecar next to
+atelet and ate-api-server, and the callers reach it over a Unix socket in a
+pod-local `emptyDir`:
+
+- node socket: `/run/objectstore-plugin/node.sock`
+- control socket: `/run/objectstore-plugin/control.sock`
+- node snapshot root: `/var/lib/ate`
+
+The `config/` component replaces those sidecars' image and arguments with this
+plugin's, removes the base `ATE_STORAGE_BACKEND`, adds the workload identity
+environment and projected token, and points their startup probes at
+`azure-blob-objectstore-plugin healthcheck`, which reports whether the plugin at
+`--socket` is serving gRPC health. It leaves the caller containers and the
+socket volume as the base defines them. The base control sidecar's credential
+exchange settings also stay: the `exchange` port, `ATE_API_ACTOR_JWT_ISSUER`,
+`POD_NAMESPACE`, and the `servicedns`, `podidentity` and `actor-id-jwt-jwks`
+mounts; this plugin serves no exchange and reads none of them. The
+`ATE_API_SNAPSHOT_TRANSFER_SERVICE_ACCOUNT` variable still comes from the
+ConfigMap key ate-setup writes, so a hand-written ConfigMap must still carry
+that key for the pod to start. On the kind overlay, the `AWS_*` variables its
+RustFS patches add also stay on both sidecars; the plugin reads none of them.
:robot: non-blocking: this restates substrate's base manifests and has already drifted, the actor-id-jwt-jwks mount is gone as of v1.0.0. Agents especially will take this at face value. Once agent-substrate/substrate#3651 lands I'd point at its docs/reference/object-store-plugin-sidecar.md instead, and until then keep this to what the operator has to do (the ConfigMap key).
@@ -1,10 +1,344 @@
# Azure Blob object-store plugin
-An out-of-tree [Agent Substrate](https://github.com/agent-substrate/substrate)
-object-store plugin backed by Azure Blob Storage.
+This plugin implements [Agent Substrate](https://github.com/agent-substrate/substrate)'s
+`substrate.objectstore.v1` node and control services with Azure Blob Storage,
+and its `AssetProvider` for sandbox assets. It runs in `node` mode beside
+atelet and in `control` mode beside ate-api-server. The module imports only
+substrate's public `api/` and `pkg/` packages.
-The plugin code is landing in follow-up pull requests. This repository
-currently holds the Go module, its build targets and CI.
+The plugin stores each requested snapshot file as one block blob. Uploads use
+deterministic staged block IDs and atomically replace the committed block list,
+so a retry after a partial upload is safe. Each blob carries a SHA-256 digest
+in metadata. Fetch and copy verify that digest before exposing or committing
+the destination bytes. Azure also verifies each staged block's MD5 in transit.
+
+## Compatibility
+
+The plugin needs a substrate that serves the `substrate.objectstore.v1` proto
+package, introduced by
+[agent-substrate/substrate@48f5744](https://github.com/agent-substrate/substrate/commit/48f5744c1dde5ffa63e926f5b4d037065f109965).
+As of 2026-10-28, no substrate release includes it and the `release-0.6` branch
+does not either. Releases cut from `main` after that commit will; v0.6.x patch
+releases cut from `release-0.6` will not unless the commit is cherry-picked
+there. v0.6.0 and earlier call the old `objectstore.v1` service name, so this
+plugin answers them with `Unimplemented`. `go.mod` pins the substrate version
+the plugin is built and tested against.
+
+## Sidecars
+
+Substrate's install manifests run an `objectstore-plugin` native sidecar next to
+atelet and ate-api-server, and the callers reach it over a Unix socket in a
+pod-local `emptyDir`:
+
+- node socket: `/run/objectstore-plugin/node.sock`
+- control socket: `/run/objectstore-plugin/control.sock`
+- node snapshot root: `/var/lib/ate`
+
+The `config/` component replaces those sidecars' image and arguments with this
+plugin's, removes the base `ATE_STORAGE_BACKEND`, adds the workload identity
+environment and projected token, and points their startup probes at
+`azure-blob-objectstore-plugin healthcheck`, which reports whether the plugin at
+`--socket` is serving gRPC health. It leaves the caller containers and the
+socket volume as the base defines them. The base control sidecar's credential
+exchange settings also stay: the `exchange` port, `ATE_API_ACTOR_JWT_ISSUER`,
+`POD_NAMESPACE`, and the `servicedns`, `podidentity` and `actor-id-jwt-jwks`
+mounts; this plugin serves no exchange and reads none of them. The
+`ATE_API_SNAPSHOT_TRANSFER_SERVICE_ACCOUNT` variable still comes from the
+ConfigMap key ate-setup writes, so a hand-written ConfigMap must still carry
+that key for the pod to start. On the kind overlay, the `AWS_*` variables its
+RustFS patches add also stay on both sidecars; the plugin reads none of them.
+
+## Snapshot URIs
+
+The plugin accepts:
+
+```text
+azblob://<container>/<snapshot-prefix>
+```
+
+`<container>` must be one of `--containers`, and `CopySnapshot` may copy
+between any two of them. `--prefix`, when set, is prepended to every snapshot
+prefix in every container, allowing all substrate data to live below one
+directory. The blob name prefix is the URI's percent-decoded path, so
+`root%2Fsub` and `root/sub` name the same blobs, as they do in substrate's
+objectstore-plugin. A bare container, userinfo, a query or fragment, `\`, and `.`,
+`..` or other path segments made only of dots and spaces are rejected.
+
+## Sandbox assets
+
+In `node` mode with `--asset-containers` set (the `config/assets` component
+sets it), the plugin also serves
+`AssetProvider.FetchAsset`, which atelet calls for every sandbox asset URL
+that is not `gs://` (for example the micro-VM kernel, rootfs,
+`cloud-hypervisor` and `virtiofsd` in a `SandboxConfig`). Asset URLs use the
+blob's native URL in the plugin's account:
+
+```text
+https://<account>.blob.core.windows.net/<container>/<blob>
+```
+
+`<container>` must be one of `--asset-containers`; it may also be a snapshot
+container. The blob name is used as is: `--prefix` does not apply. A URL on
+another host, with a query (such as a SAS token), user info or a fragment, or
+with a non-canonical blob name (empty, `.`-terminated or space-padded
+segments, `\`) is rejected with `InvalidArgument`.
+
+The plugin applies the same two checks as substrate's objectstore-plugin,
+through substrate's `pkg/assetfetch`:
+
+- It refuses, with `PermissionDenied` and before any download, any blob
+ stored under a snapshot or tag location
+ (`.../atespaces/<atespace>/actors/<uid>/snapshots/<name>/...` or
+ `.../atespaces/<atespace>/tags/<uid>/...`) in any container, so the node
+ identity's read access to snapshots cannot be used to read them as assets.
+- It downloads into `--asset-staging-dir`, which only the plugin container
+ mounts, stops at `max_bytes`, verifies the requested sha256, and only then
+ atomically replaces atelet's existing file with the bytes. atelet verifies
+ the sha256 again.
+
+Downloads in flight hold at most `--asset-staging-capacity` bytes in the
+staging directory together: each reserves its blob's size, and one that does
+not fit waits for the others. A blob larger than the capacity is refused with
+`FailedPrecondition`. The default, `8Gi`, matches atelet's per-asset cap and
+the base manifest's `asset-staging` volume.
+
+The node identity needs `Storage Blob Data Reader` on each asset container
+that is not also a snapshot container.
+
+Without `--asset-containers`, atelet's plugin serves no assets and atelet gets
+`Unimplemented`: it still reads public `gs://` assets, such as the default
+gVisor release, anonymously, and fails any other asset URL. The `config/`
+component alone is therefore a snapshot-only install; see
+[Deployment](#deployment) for adding assets.
+
+## Configuration
+
+| Flag | Environment fallback | Default | Purpose |
+|---|---|---|---|
+| `--account-url` | `AZURE_STORAGE_ACCOUNT_URL` | required | `https://<account>.blob.core.windows.net` |
+| `--containers` | `AZURE_STORAGE_CONTAINERS` | required | Comma-separated blob containers that snapshot URIs may name; a name that breaks Azure's container naming rules fails startup |
+| `--prefix` | `AZURE_STORAGE_PREFIX` | empty | Prefix prepended to every snapshot key |
+| `--socket` | none | required | Unix socket to serve |
+| `--root` | none | `/var/lib/ate` | Node mode's allowed local snapshot and asset tree |
+| `--asset-containers` | `AZURE_STORAGE_ASSET_CONTAINERS` | empty | Node mode: comma-separated blob containers that sandbox asset URLs may name; empty serves no assets (atelet then gets `Unimplemented`) |
+| `--asset-staging-dir` | none | `/var/lib/objectstore-plugin/asset-staging` | Node mode: private directory assets are downloaded into and verified in; must not be below `--root` |
+| `--asset-staging-capacity` | none | `8Gi` | Node mode: the most asset downloads in `--asset-staging-dir` may hold at once, as a Kubernetes quantity |
+
+`healthcheck` mode takes `--socket` and `--timeout` (default `5s`) and exits
+non-zero unless the plugin at `--socket` reports `SERVING` within the timeout.
+
+The account URL must use `https`. The plugin sends requests, and with them its
+storage token, only to the scheme and host of `--account-url`: it refuses a
+request to any other endpoint and does not follow redirects. Snapshot URIs
+name only a container and prefix, never a host, so no request can choose
+where the token goes.
+
+## Authentication
+
+The plugin authenticates to Azure Storage only with Microsoft Entra workload
+identity federation: it exchanges the pod's projected service account token for
+an Entra token. It does not accept storage account keys, connection strings,
+SAS tokens, client secrets or certificates, and never authenticates as the
+node's managed identity. It reads the standard `azidentity` variables:
+
+| Variable | Value |
+|---|---|
+| `AZURE_CLIENT_ID` | Client ID of the user-assigned managed identity whose federated identity credential trusts the cluster's service account token issuer |
+| `AZURE_TENANT_ID` | Microsoft Entra tenant ID |
+| `AZURE_FEDERATED_TOKEN_FILE` | Path of the projected service account token |
+
+The plugin fails at startup, naming the missing variables, when any of them is
+unset or the token file cannot be read. It has no other credential to fall
+back to.
+
+Create federated identity credentials with audience
+`api://AzureADTokenExchange`, the cluster's service account issuer, and these
+subjects:
+
+```text
+system:serviceaccount:ate-system:atelet
+system:serviceaccount:ate-system:ate-api-server
+```
+
+Microsoft Entra ID must be able to fetch the issuer's OIDC discovery document
+and signing keys.
+
+Grant each identity `Storage Blob Data Contributor` scoped to each container in
+`--containers`:
+
+```bash
+CONTAINER_SCOPE="/subscriptions/<subscription>/resourceGroups/<resource-group>/providers/Microsoft.Storage/storageAccounts/<account>/blobServices/default/containers/<container>"
+az role assignment create \
+ --assignee-object-id <principal-object-id> \
+ --assignee-principal-type ServicePrincipal \
+ --role "Storage Blob Data Contributor" \
+ --scope "$CONTAINER_SCOPE"
+```
+
+`ServicePrincipal` is the principal type Azure role assignments use for
+managed identities as well, so it is correct for a user-assigned managed
+identity; no client secret or certificate is involved.
+
+The identity federated to `system:serviceaccount:ate-system:atelet` (the
+plugin in `node` mode) needs blob read/write access. The identity federated to
+`system:serviceaccount:ate-system:ate-api-server` (the plugin in `control` mode)
+needs blob read/write/delete access; the built-in role above covers both.
+
+## Deployment
+
+Clone this repository and build and push the image:
+
+```bash
+KO_DOCKER_REPO=<registry> make build-image
+```
+
+The `config/` component configures workload identity: it projects a service
+account token with audience `api://AzureADTokenExchange` into both sidecars and
+sets their `AZURE_*` variables, without a webhook mutating the whole Pod. Edit
+`config/kustomization.yaml` to set:
+
+- both `example.invalid/replace-with-azure-blob-objectstore-plugin:latest` image
+ fields to the digest reference printed by `make build-image`;
+- both client IDs and the tenant ID;
+- the storage account URL;
+- the containers;
+- the optional storage prefix.
:robot: non-blocking: the tenant ID, account URL and containers are also in both patches, so this should say "both" for those too, otherwise someone who edits only the first one gets a node sidecar with REPLACE_WITH_* values. Also the component sets --prefix=substrate while the config table says the default is empty, worth calling out here.
@@ -1,10 +1,344 @@
# Azure Blob object-store plugin
-An out-of-tree [Agent Substrate](https://github.com/agent-substrate/substrate)
-object-store plugin backed by Azure Blob Storage.
+This plugin implements [Agent Substrate](https://github.com/agent-substrate/substrate)'s
+`substrate.objectstore.v1` node and control services with Azure Blob Storage,
+and its `AssetProvider` for sandbox assets. It runs in `node` mode beside
+atelet and in `control` mode beside ate-api-server. The module imports only
+substrate's public `api/` and `pkg/` packages.
-The plugin code is landing in follow-up pull requests. This repository
-currently holds the Go module, its build targets and CI.
+The plugin stores each requested snapshot file as one block blob. Uploads use
+deterministic staged block IDs and atomically replace the committed block list,
+so a retry after a partial upload is safe. Each blob carries a SHA-256 digest
+in metadata. Fetch and copy verify that digest before exposing or committing
+the destination bytes. Azure also verifies each staged block's MD5 in transit.
+
+## Compatibility
+
+The plugin needs a substrate that serves the `substrate.objectstore.v1` proto
+package, introduced by
+[agent-substrate/substrate@48f5744](https://github.com/agent-substrate/substrate/commit/48f5744c1dde5ffa63e926f5b4d037065f109965).
+As of 2026-10-28, no substrate release includes it and the `release-0.6` branch
+does not either. Releases cut from `main` after that commit will; v0.6.x patch
+releases cut from `release-0.6` will not unless the commit is cherry-picked
+there. v0.6.0 and earlier call the old `objectstore.v1` service name, so this
+plugin answers them with `Unimplemented`. `go.mod` pins the substrate version
+the plugin is built and tested against.
+
+## Sidecars
+
+Substrate's install manifests run an `objectstore-plugin` native sidecar next to
+atelet and ate-api-server, and the callers reach it over a Unix socket in a
+pod-local `emptyDir`:
+
+- node socket: `/run/objectstore-plugin/node.sock`
+- control socket: `/run/objectstore-plugin/control.sock`
+- node snapshot root: `/var/lib/ate`
+
+The `config/` component replaces those sidecars' image and arguments with this
+plugin's, removes the base `ATE_STORAGE_BACKEND`, adds the workload identity
+environment and projected token, and points their startup probes at
+`azure-blob-objectstore-plugin healthcheck`, which reports whether the plugin at
+`--socket` is serving gRPC health. It leaves the caller containers and the
+socket volume as the base defines them. The base control sidecar's credential
+exchange settings also stay: the `exchange` port, `ATE_API_ACTOR_JWT_ISSUER`,
+`POD_NAMESPACE`, and the `servicedns`, `podidentity` and `actor-id-jwt-jwks`
+mounts; this plugin serves no exchange and reads none of them. The
+`ATE_API_SNAPSHOT_TRANSFER_SERVICE_ACCOUNT` variable still comes from the
+ConfigMap key ate-setup writes, so a hand-written ConfigMap must still carry
+that key for the pod to start. On the kind overlay, the `AWS_*` variables its
+RustFS patches add also stay on both sidecars; the plugin reads none of them.
+
+## Snapshot URIs
+
+The plugin accepts:
+
+```text
+azblob://<container>/<snapshot-prefix>
+```
+
+`<container>` must be one of `--containers`, and `CopySnapshot` may copy
+between any two of them. `--prefix`, when set, is prepended to every snapshot
+prefix in every container, allowing all substrate data to live below one
+directory. The blob name prefix is the URI's percent-decoded path, so
+`root%2Fsub` and `root/sub` name the same blobs, as they do in substrate's
+objectstore-plugin. A bare container, userinfo, a query or fragment, `\`, and `.`,
+`..` or other path segments made only of dots and spaces are rejected.
+
+## Sandbox assets
+
+In `node` mode with `--asset-containers` set (the `config/assets` component
+sets it), the plugin also serves
+`AssetProvider.FetchAsset`, which atelet calls for every sandbox asset URL
+that is not `gs://` (for example the micro-VM kernel, rootfs,
+`cloud-hypervisor` and `virtiofsd` in a `SandboxConfig`). Asset URLs use the
+blob's native URL in the plugin's account:
+
+```text
+https://<account>.blob.core.windows.net/<container>/<blob>
+```
+
+`<container>` must be one of `--asset-containers`; it may also be a snapshot
+container. The blob name is used as is: `--prefix` does not apply. A URL on
+another host, with a query (such as a SAS token), user info or a fragment, or
+with a non-canonical blob name (empty, `.`-terminated or space-padded
+segments, `\`) is rejected with `InvalidArgument`.
+
+The plugin applies the same two checks as substrate's objectstore-plugin,
+through substrate's `pkg/assetfetch`:
+
+- It refuses, with `PermissionDenied` and before any download, any blob
+ stored under a snapshot or tag location
+ (`.../atespaces/<atespace>/actors/<uid>/snapshots/<name>/...` or
+ `.../atespaces/<atespace>/tags/<uid>/...`) in any container, so the node
+ identity's read access to snapshots cannot be used to read them as assets.
+- It downloads into `--asset-staging-dir`, which only the plugin container
+ mounts, stops at `max_bytes`, verifies the requested sha256, and only then
+ atomically replaces atelet's existing file with the bytes. atelet verifies
+ the sha256 again.
+
+Downloads in flight hold at most `--asset-staging-capacity` bytes in the
+staging directory together: each reserves its blob's size, and one that does
+not fit waits for the others. A blob larger than the capacity is refused with
+`FailedPrecondition`. The default, `8Gi`, matches atelet's per-asset cap and
+the base manifest's `asset-staging` volume.
+
+The node identity needs `Storage Blob Data Reader` on each asset container
+that is not also a snapshot container.
+
+Without `--asset-containers`, atelet's plugin serves no assets and atelet gets
+`Unimplemented`: it still reads public `gs://` assets, such as the default
+gVisor release, anonymously, and fails any other asset URL. The `config/`
+component alone is therefore a snapshot-only install; see
+[Deployment](#deployment) for adding assets.
+
+## Configuration
+
+| Flag | Environment fallback | Default | Purpose |
+|---|---|---|---|
+| `--account-url` | `AZURE_STORAGE_ACCOUNT_URL` | required | `https://<account>.blob.core.windows.net` |
+| `--containers` | `AZURE_STORAGE_CONTAINERS` | required | Comma-separated blob containers that snapshot URIs may name; a name that breaks Azure's container naming rules fails startup |
+| `--prefix` | `AZURE_STORAGE_PREFIX` | empty | Prefix prepended to every snapshot key |
+| `--socket` | none | required | Unix socket to serve |
+| `--root` | none | `/var/lib/ate` | Node mode's allowed local snapshot and asset tree |
+| `--asset-containers` | `AZURE_STORAGE_ASSET_CONTAINERS` | empty | Node mode: comma-separated blob containers that sandbox asset URLs may name; empty serves no assets (atelet then gets `Unimplemented`) |
+| `--asset-staging-dir` | none | `/var/lib/objectstore-plugin/asset-staging` | Node mode: private directory assets are downloaded into and verified in; must not be below `--root` |
+| `--asset-staging-capacity` | none | `8Gi` | Node mode: the most asset downloads in `--asset-staging-dir` may hold at once, as a Kubernetes quantity |
+
+`healthcheck` mode takes `--socket` and `--timeout` (default `5s`) and exits
+non-zero unless the plugin at `--socket` reports `SERVING` within the timeout.
+
+The account URL must use `https`. The plugin sends requests, and with them its
+storage token, only to the scheme and host of `--account-url`: it refuses a
+request to any other endpoint and does not follow redirects. Snapshot URIs
+name only a container and prefix, never a host, so no request can choose
+where the token goes.
+
+## Authentication
+
+The plugin authenticates to Azure Storage only with Microsoft Entra workload
+identity federation: it exchanges the pod's projected service account token for
+an Entra token. It does not accept storage account keys, connection strings,
+SAS tokens, client secrets or certificates, and never authenticates as the
+node's managed identity. It reads the standard `azidentity` variables:
+
+| Variable | Value |
+|---|---|
+| `AZURE_CLIENT_ID` | Client ID of the user-assigned managed identity whose federated identity credential trusts the cluster's service account token issuer |
+| `AZURE_TENANT_ID` | Microsoft Entra tenant ID |
+| `AZURE_FEDERATED_TOKEN_FILE` | Path of the projected service account token |
+
+The plugin fails at startup, naming the missing variables, when any of them is
+unset or the token file cannot be read. It has no other credential to fall
+back to.
+
+Create federated identity credentials with audience
+`api://AzureADTokenExchange`, the cluster's service account issuer, and these
+subjects:
+
+```text
+system:serviceaccount:ate-system:atelet
+system:serviceaccount:ate-system:ate-api-server
+```
+
+Microsoft Entra ID must be able to fetch the issuer's OIDC discovery document
+and signing keys.
+
+Grant each identity `Storage Blob Data Contributor` scoped to each container in
+`--containers`:
+
+```bash
+CONTAINER_SCOPE="/subscriptions/<subscription>/resourceGroups/<resource-group>/providers/Microsoft.Storage/storageAccounts/<account>/blobServices/default/containers/<container>"
+az role assignment create \
+ --assignee-object-id <principal-object-id> \
+ --assignee-principal-type ServicePrincipal \
+ --role "Storage Blob Data Contributor" \
+ --scope "$CONTAINER_SCOPE"
+```
+
+`ServicePrincipal` is the principal type Azure role assignments use for
+managed identities as well, so it is correct for a user-assigned managed
+identity; no client secret or certificate is involved.
+
+The identity federated to `system:serviceaccount:ate-system:atelet` (the
+plugin in `node` mode) needs blob read/write access. The identity federated to
+`system:serviceaccount:ate-system:ate-api-server` (the plugin in `control` mode)
+needs blob read/write/delete access; the built-in role above covers both.
+
+## Deployment
+
+Clone this repository and build and push the image:
+
+```bash
+KO_DOCKER_REPO=<registry> make build-image
+```
+
+The `config/` component configures workload identity: it projects a service
+account token with audience `api://AzureADTokenExchange` into both sidecars and
+sets their `AZURE_*` variables, without a webhook mutating the whole Pod. Edit
+`config/kustomization.yaml` to set:
+
+- both `example.invalid/replace-with-azure-blob-objectstore-plugin:latest` image
+ fields to the digest reference printed by `make build-image`;
+- both client IDs and the tenant ID;
+- the storage account URL;
+- the containers;
+- the optional storage prefix.
+
+`ate-setup` has no option to add a component, so add this one, by its path
+relative to the overlay, to the overlay that `ate-setup deploy ate-system`
+renders in your substrate checkout: `manifests/ate-install/base` by default,
+or `manifests/ate-install/kind` with `--kind`. For example, with this
:robot: non-blocking: with --atenet-dataplane=agentgateway, deploy ate-system renders agentgateway or kind-agentgateway instead (SystemOverlay in cmd/ate-setup/internal/steps/overlay.go), so adding the component to base or kind there silently gets the stock sidecars back.
@@ -1,10 +1,344 @@
# Azure Blob object-store plugin
-An out-of-tree [Agent Substrate](https://github.com/agent-substrate/substrate)
-object-store plugin backed by Azure Blob Storage.
+This plugin implements [Agent Substrate](https://github.com/agent-substrate/substrate)'s
+`substrate.objectstore.v1` node and control services with Azure Blob Storage,
+and its `AssetProvider` for sandbox assets. It runs in `node` mode beside
+atelet and in `control` mode beside ate-api-server. The module imports only
+substrate's public `api/` and `pkg/` packages.
-The plugin code is landing in follow-up pull requests. This repository
-currently holds the Go module, its build targets and CI.
+The plugin stores each requested snapshot file as one block blob. Uploads use
+deterministic staged block IDs and atomically replace the committed block list,
+so a retry after a partial upload is safe. Each blob carries a SHA-256 digest
+in metadata. Fetch and copy verify that digest before exposing or committing
+the destination bytes. Azure also verifies each staged block's MD5 in transit.
+
+## Compatibility
+
+The plugin needs a substrate that serves the `substrate.objectstore.v1` proto
+package, introduced by
+[agent-substrate/substrate@48f5744](https://github.com/agent-substrate/substrate/commit/48f5744c1dde5ffa63e926f5b4d037065f109965).
+As of 2026-10-28, no substrate release includes it and the `release-0.6` branch
+does not either. Releases cut from `main` after that commit will; v0.6.x patch
+releases cut from `release-0.6` will not unless the commit is cherry-picked
+there. v0.6.0 and earlier call the old `objectstore.v1` service name, so this
+plugin answers them with `Unimplemented`. `go.mod` pins the substrate version
+the plugin is built and tested against.
+
+## Sidecars
+
+Substrate's install manifests run an `objectstore-plugin` native sidecar next to
+atelet and ate-api-server, and the callers reach it over a Unix socket in a
+pod-local `emptyDir`:
+
+- node socket: `/run/objectstore-plugin/node.sock`
+- control socket: `/run/objectstore-plugin/control.sock`
+- node snapshot root: `/var/lib/ate`
+
+The `config/` component replaces those sidecars' image and arguments with this
+plugin's, removes the base `ATE_STORAGE_BACKEND`, adds the workload identity
+environment and projected token, and points their startup probes at
+`azure-blob-objectstore-plugin healthcheck`, which reports whether the plugin at
+`--socket` is serving gRPC health. It leaves the caller containers and the
+socket volume as the base defines them. The base control sidecar's credential
+exchange settings also stay: the `exchange` port, `ATE_API_ACTOR_JWT_ISSUER`,
+`POD_NAMESPACE`, and the `servicedns`, `podidentity` and `actor-id-jwt-jwks`
+mounts; this plugin serves no exchange and reads none of them. The
+`ATE_API_SNAPSHOT_TRANSFER_SERVICE_ACCOUNT` variable still comes from the
+ConfigMap key ate-setup writes, so a hand-written ConfigMap must still carry
+that key for the pod to start. On the kind overlay, the `AWS_*` variables its
+RustFS patches add also stay on both sidecars; the plugin reads none of them.
+
+## Snapshot URIs
+
+The plugin accepts:
+
+```text
+azblob://<container>/<snapshot-prefix>
+```
+
+`<container>` must be one of `--containers`, and `CopySnapshot` may copy
+between any two of them. `--prefix`, when set, is prepended to every snapshot
+prefix in every container, allowing all substrate data to live below one
+directory. The blob name prefix is the URI's percent-decoded path, so
+`root%2Fsub` and `root/sub` name the same blobs, as they do in substrate's
+objectstore-plugin. A bare container, userinfo, a query or fragment, `\`, and `.`,
+`..` or other path segments made only of dots and spaces are rejected.
+
+## Sandbox assets
+
+In `node` mode with `--asset-containers` set (the `config/assets` component
+sets it), the plugin also serves
+`AssetProvider.FetchAsset`, which atelet calls for every sandbox asset URL
+that is not `gs://` (for example the micro-VM kernel, rootfs,
+`cloud-hypervisor` and `virtiofsd` in a `SandboxConfig`). Asset URLs use the
+blob's native URL in the plugin's account:
+
+```text
+https://<account>.blob.core.windows.net/<container>/<blob>
+```
+
+`<container>` must be one of `--asset-containers`; it may also be a snapshot
+container. The blob name is used as is: `--prefix` does not apply. A URL on
+another host, with a query (such as a SAS token), user info or a fragment, or
+with a non-canonical blob name (empty, `.`-terminated or space-padded
+segments, `\`) is rejected with `InvalidArgument`.
+
+The plugin applies the same two checks as substrate's objectstore-plugin,
+through substrate's `pkg/assetfetch`:
+
+- It refuses, with `PermissionDenied` and before any download, any blob
+ stored under a snapshot or tag location
+ (`.../atespaces/<atespace>/actors/<uid>/snapshots/<name>/...` or
+ `.../atespaces/<atespace>/tags/<uid>/...`) in any container, so the node
+ identity's read access to snapshots cannot be used to read them as assets.
+- It downloads into `--asset-staging-dir`, which only the plugin container
+ mounts, stops at `max_bytes`, verifies the requested sha256, and only then
+ atomically replaces atelet's existing file with the bytes. atelet verifies
+ the sha256 again.
+
+Downloads in flight hold at most `--asset-staging-capacity` bytes in the
+staging directory together: each reserves its blob's size, and one that does
+not fit waits for the others. A blob larger than the capacity is refused with
+`FailedPrecondition`. The default, `8Gi`, matches atelet's per-asset cap and
+the base manifest's `asset-staging` volume.
+
+The node identity needs `Storage Blob Data Reader` on each asset container
+that is not also a snapshot container.
+
+Without `--asset-containers`, atelet's plugin serves no assets and atelet gets
+`Unimplemented`: it still reads public `gs://` assets, such as the default
+gVisor release, anonymously, and fails any other asset URL. The `config/`
+component alone is therefore a snapshot-only install; see
+[Deployment](#deployment) for adding assets.
+
+## Configuration
+
+| Flag | Environment fallback | Default | Purpose |
+|---|---|---|---|
+| `--account-url` | `AZURE_STORAGE_ACCOUNT_URL` | required | `https://<account>.blob.core.windows.net` |
+| `--containers` | `AZURE_STORAGE_CONTAINERS` | required | Comma-separated blob containers that snapshot URIs may name; a name that breaks Azure's container naming rules fails startup |
+| `--prefix` | `AZURE_STORAGE_PREFIX` | empty | Prefix prepended to every snapshot key |
+| `--socket` | none | required | Unix socket to serve |
+| `--root` | none | `/var/lib/ate` | Node mode's allowed local snapshot and asset tree |
+| `--asset-containers` | `AZURE_STORAGE_ASSET_CONTAINERS` | empty | Node mode: comma-separated blob containers that sandbox asset URLs may name; empty serves no assets (atelet then gets `Unimplemented`) |
+| `--asset-staging-dir` | none | `/var/lib/objectstore-plugin/asset-staging` | Node mode: private directory assets are downloaded into and verified in; must not be below `--root` |
+| `--asset-staging-capacity` | none | `8Gi` | Node mode: the most asset downloads in `--asset-staging-dir` may hold at once, as a Kubernetes quantity |
+
+`healthcheck` mode takes `--socket` and `--timeout` (default `5s`) and exits
+non-zero unless the plugin at `--socket` reports `SERVING` within the timeout.
+
+The account URL must use `https`. The plugin sends requests, and with them its
+storage token, only to the scheme and host of `--account-url`: it refuses a
+request to any other endpoint and does not follow redirects. Snapshot URIs
+name only a container and prefix, never a host, so no request can choose
+where the token goes.
+
+## Authentication
+
+The plugin authenticates to Azure Storage only with Microsoft Entra workload
+identity federation: it exchanges the pod's projected service account token for
+an Entra token. It does not accept storage account keys, connection strings,
+SAS tokens, client secrets or certificates, and never authenticates as the
+node's managed identity. It reads the standard `azidentity` variables:
+
+| Variable | Value |
+|---|---|
+| `AZURE_CLIENT_ID` | Client ID of the user-assigned managed identity whose federated identity credential trusts the cluster's service account token issuer |
+| `AZURE_TENANT_ID` | Microsoft Entra tenant ID |
+| `AZURE_FEDERATED_TOKEN_FILE` | Path of the projected service account token |
+
+The plugin fails at startup, naming the missing variables, when any of them is
+unset or the token file cannot be read. It has no other credential to fall
+back to.
+
+Create federated identity credentials with audience
+`api://AzureADTokenExchange`, the cluster's service account issuer, and these
+subjects:
+
+```text
+system:serviceaccount:ate-system:atelet
+system:serviceaccount:ate-system:ate-api-server
+```
+
+Microsoft Entra ID must be able to fetch the issuer's OIDC discovery document
+and signing keys.
:robot: non-blocking: how does this work with the --kind example below? kubeadm's default issuer is https://kubernetes.default.svc.cluster.local, which Entra can't reach.
https://github.com/kubernetes/kubernetes/blob/v1.34.0/cmd/kubeadm/app/phases/controlplane/manifests.go#L194
Has this install been run end to end, on kind or AKS? The integration tests use a shared key, so workload identity isn't exercised against Azure in CI.
@@ -1,10 +1,344 @@
# Azure Blob object-store plugin
-An out-of-tree [Agent Substrate](https://github.com/agent-substrate/substrate)
-object-store plugin backed by Azure Blob Storage.
+This plugin implements [Agent Substrate](https://github.com/agent-substrate/substrate)'s
+`substrate.objectstore.v1` node and control services with Azure Blob Storage,
+and its `AssetProvider` for sandbox assets. It runs in `node` mode beside
+atelet and in `control` mode beside ate-api-server. The module imports only
+substrate's public `api/` and `pkg/` packages.
-The plugin code is landing in follow-up pull requests. This repository
-currently holds the Go module, its build targets and CI.
+The plugin stores each requested snapshot file as one block blob. Uploads use
+deterministic staged block IDs and atomically replace the committed block list,
+so a retry after a partial upload is safe. Each blob carries a SHA-256 digest
+in metadata. Fetch and copy verify that digest before exposing or committing
+the destination bytes. Azure also verifies each staged block's MD5 in transit.
+
+## Compatibility
+
+The plugin needs a substrate that serves the `substrate.objectstore.v1` proto
+package, introduced by
+[agent-substrate/substrate@48f5744](https://github.com/agent-substrate/substrate/commit/48f5744c1dde5ffa63e926f5b4d037065f109965).
+As of 2026-10-28, no substrate release includes it and the `release-0.6` branch
+does not either. Releases cut from `main` after that commit will; v0.6.x patch
+releases cut from `release-0.6` will not unless the commit is cherry-picked
+there. v0.6.0 and earlier call the old `objectstore.v1` service name, so this
+plugin answers them with `Unimplemented`. `go.mod` pins the substrate version
+the plugin is built and tested against.
+
+## Sidecars
+
+Substrate's install manifests run an `objectstore-plugin` native sidecar next to
+atelet and ate-api-server, and the callers reach it over a Unix socket in a
+pod-local `emptyDir`:
+
+- node socket: `/run/objectstore-plugin/node.sock`
+- control socket: `/run/objectstore-plugin/control.sock`
+- node snapshot root: `/var/lib/ate`
+
+The `config/` component replaces those sidecars' image and arguments with this
+plugin's, removes the base `ATE_STORAGE_BACKEND`, adds the workload identity
+environment and projected token, and points their startup probes at
+`azure-blob-objectstore-plugin healthcheck`, which reports whether the plugin at
+`--socket` is serving gRPC health. It leaves the caller containers and the
+socket volume as the base defines them. The base control sidecar's credential
+exchange settings also stay: the `exchange` port, `ATE_API_ACTOR_JWT_ISSUER`,
+`POD_NAMESPACE`, and the `servicedns`, `podidentity` and `actor-id-jwt-jwks`
+mounts; this plugin serves no exchange and reads none of them. The
+`ATE_API_SNAPSHOT_TRANSFER_SERVICE_ACCOUNT` variable still comes from the
+ConfigMap key ate-setup writes, so a hand-written ConfigMap must still carry
+that key for the pod to start. On the kind overlay, the `AWS_*` variables its
+RustFS patches add also stay on both sidecars; the plugin reads none of them.
+
+## Snapshot URIs
+
+The plugin accepts:
+
+```text
+azblob://<container>/<snapshot-prefix>
+```
+
+`<container>` must be one of `--containers`, and `CopySnapshot` may copy
+between any two of them. `--prefix`, when set, is prepended to every snapshot
+prefix in every container, allowing all substrate data to live below one
+directory. The blob name prefix is the URI's percent-decoded path, so
+`root%2Fsub` and `root/sub` name the same blobs, as they do in substrate's
+objectstore-plugin. A bare container, userinfo, a query or fragment, `\`, and `.`,
+`..` or other path segments made only of dots and spaces are rejected.
+
+## Sandbox assets
+
+In `node` mode with `--asset-containers` set (the `config/assets` component
+sets it), the plugin also serves
+`AssetProvider.FetchAsset`, which atelet calls for every sandbox asset URL
+that is not `gs://` (for example the micro-VM kernel, rootfs,
+`cloud-hypervisor` and `virtiofsd` in a `SandboxConfig`). Asset URLs use the
+blob's native URL in the plugin's account:
+
+```text
+https://<account>.blob.core.windows.net/<container>/<blob>
+```
+
+`<container>` must be one of `--asset-containers`; it may also be a snapshot
+container. The blob name is used as is: `--prefix` does not apply. A URL on
+another host, with a query (such as a SAS token), user info or a fragment, or
+with a non-canonical blob name (empty, `.`-terminated or space-padded
+segments, `\`) is rejected with `InvalidArgument`.
+
+The plugin applies the same two checks as substrate's objectstore-plugin,
+through substrate's `pkg/assetfetch`:
+
+- It refuses, with `PermissionDenied` and before any download, any blob
+ stored under a snapshot or tag location
+ (`.../atespaces/<atespace>/actors/<uid>/snapshots/<name>/...` or
+ `.../atespaces/<atespace>/tags/<uid>/...`) in any container, so the node
+ identity's read access to snapshots cannot be used to read them as assets.
+- It downloads into `--asset-staging-dir`, which only the plugin container
+ mounts, stops at `max_bytes`, verifies the requested sha256, and only then
+ atomically replaces atelet's existing file with the bytes. atelet verifies
+ the sha256 again.
+
+Downloads in flight hold at most `--asset-staging-capacity` bytes in the
+staging directory together: each reserves its blob's size, and one that does
+not fit waits for the others. A blob larger than the capacity is refused with
+`FailedPrecondition`. The default, `8Gi`, matches atelet's per-asset cap and
+the base manifest's `asset-staging` volume.
+
+The node identity needs `Storage Blob Data Reader` on each asset container
+that is not also a snapshot container.
+
+Without `--asset-containers`, atelet's plugin serves no assets and atelet gets
+`Unimplemented`: it still reads public `gs://` assets, such as the default
+gVisor release, anonymously, and fails any other asset URL. The `config/`
+component alone is therefore a snapshot-only install; see
+[Deployment](#deployment) for adding assets.
+
+## Configuration
+
+| Flag | Environment fallback | Default | Purpose |
+|---|---|---|---|
+| `--account-url` | `AZURE_STORAGE_ACCOUNT_URL` | required | `https://<account>.blob.core.windows.net` |
+| `--containers` | `AZURE_STORAGE_CONTAINERS` | required | Comma-separated blob containers that snapshot URIs may name; a name that breaks Azure's container naming rules fails startup |
+| `--prefix` | `AZURE_STORAGE_PREFIX` | empty | Prefix prepended to every snapshot key |
+| `--socket` | none | required | Unix socket to serve |
+| `--root` | none | `/var/lib/ate` | Node mode's allowed local snapshot and asset tree |
+| `--asset-containers` | `AZURE_STORAGE_ASSET_CONTAINERS` | empty | Node mode: comma-separated blob containers that sandbox asset URLs may name; empty serves no assets (atelet then gets `Unimplemented`) |
+| `--asset-staging-dir` | none | `/var/lib/objectstore-plugin/asset-staging` | Node mode: private directory assets are downloaded into and verified in; must not be below `--root` |
+| `--asset-staging-capacity` | none | `8Gi` | Node mode: the most asset downloads in `--asset-staging-dir` may hold at once, as a Kubernetes quantity |
+
+`healthcheck` mode takes `--socket` and `--timeout` (default `5s`) and exits
+non-zero unless the plugin at `--socket` reports `SERVING` within the timeout.
+
+The account URL must use `https`. The plugin sends requests, and with them its
+storage token, only to the scheme and host of `--account-url`: it refuses a
+request to any other endpoint and does not follow redirects. Snapshot URIs
+name only a container and prefix, never a host, so no request can choose
+where the token goes.
+
+## Authentication
+
+The plugin authenticates to Azure Storage only with Microsoft Entra workload
+identity federation: it exchanges the pod's projected service account token for
+an Entra token. It does not accept storage account keys, connection strings,
+SAS tokens, client secrets or certificates, and never authenticates as the
+node's managed identity. It reads the standard `azidentity` variables:
+
+| Variable | Value |
+|---|---|
+| `AZURE_CLIENT_ID` | Client ID of the user-assigned managed identity whose federated identity credential trusts the cluster's service account token issuer |
+| `AZURE_TENANT_ID` | Microsoft Entra tenant ID |
+| `AZURE_FEDERATED_TOKEN_FILE` | Path of the projected service account token |
+
+The plugin fails at startup, naming the missing variables, when any of them is
+unset or the token file cannot be read. It has no other credential to fall
+back to.
+
+Create federated identity credentials with audience
+`api://AzureADTokenExchange`, the cluster's service account issuer, and these
+subjects:
+
+```text
+system:serviceaccount:ate-system:atelet
+system:serviceaccount:ate-system:ate-api-server
+```
+
+Microsoft Entra ID must be able to fetch the issuer's OIDC discovery document
+and signing keys.
+
+Grant each identity `Storage Blob Data Contributor` scoped to each container in
+`--containers`:
+
+```bash
+CONTAINER_SCOPE="/subscriptions/<subscription>/resourceGroups/<resource-group>/providers/Microsoft.Storage/storageAccounts/<account>/blobServices/default/containers/<container>"
+az role assignment create \
+ --assignee-object-id <principal-object-id> \
+ --assignee-principal-type ServicePrincipal \
+ --role "Storage Blob Data Contributor" \
+ --scope "$CONTAINER_SCOPE"
+```
+
+`ServicePrincipal` is the principal type Azure role assignments use for
+managed identities as well, so it is correct for a user-assigned managed
+identity; no client secret or certificate is involved.
+
+The identity federated to `system:serviceaccount:ate-system:atelet` (the
+plugin in `node` mode) needs blob read/write access. The identity federated to
+`system:serviceaccount:ate-system:ate-api-server` (the plugin in `control` mode)
+needs blob read/write/delete access; the built-in role above covers both.
+
+## Deployment
+
+Clone this repository and build and push the image:
+
+```bash
+KO_DOCKER_REPO=<registry> make build-image
+```
+
+The `config/` component configures workload identity: it projects a service
+account token with audience `api://AzureADTokenExchange` into both sidecars and
+sets their `AZURE_*` variables, without a webhook mutating the whole Pod. Edit
+`config/kustomization.yaml` to set:
+
+- both `example.invalid/replace-with-azure-blob-objectstore-plugin:latest` image
+ fields to the digest reference printed by `make build-image`;
+- both client IDs and the tenant ID;
+- the storage account URL;
+- the containers;
+- the optional storage prefix.
+
+`ate-setup` has no option to add a component, so add this one, by its path
+relative to the overlay, to the overlay that `ate-setup deploy ate-system`
+renders in your substrate checkout: `manifests/ate-install/base` by default,
+or `manifests/ate-install/kind` with `--kind`. For example, with this
+repository cloned next to substrate, in
+`manifests/ate-install/kind/kustomization.yaml`:
+
+```yaml
+components:
+- ../../../../objectstore-azure-blob/config
+```
+
+To serve sandbox assets from blob containers as well, replace the
+`REPLACE_WITH_ASSET_CONTAINERS` placeholder in `config/assets/kustomization.yaml`
+with a comma-separated list of containers, grant the node identity read access
+to them, and list that component after the first:
+
+```yaml
+components:
+- ../../../../objectstore-azure-blob/config
+- ../../../../objectstore-azure-blob/config/assets
+```
+
+A `SandboxConfig` version then names each asset by its blob URL and sha256, for
+example:
+
+```yaml
+assets:
+ amd64:
+ kata-kernel:
+ url: https://<account>.blob.core.windows.net/<container>/kata/vmlinux
+ sha256: <sha256 of the blob>
+```
+
+Then install from the substrate repository root:
+
+```bash
+go run ./cmd/ate-setup deploy ate-system \
+ --kind \
+ --context <context> \
+ --ko-docker-repo <registry> \
+ --ko-default-platforms linux/amd64 \
+ --credential-provider='{"name":"k8s.io"}' \
+ --snapshot-location=azblob://<container>/<snapshot-root>/
+```
+
+`--kind` selects the kind overlay. It does not create a kind cluster, but it
+defaults several settings to a local kind setup, including the context,
+registry, and build platform, so name all three for any other cluster. It
+also defaults the snapshot location to `gs://ate-snapshots/`, which this plugin
+rejects, so set `--snapshot-location` on kind too.
+
+On any other cluster, ate-setup currently installs for GKE: `deploy ate-system`
+refuses to start without `--snapshot-transfer-gsa-name` and
+`--gcp-project-id`, which configure the GCS credential exchange this plugin
+replaces. The plugin reads neither.
+
+Only `deploy ate-system` renders that overlay. `deploy atelet` and
+`deploy apiserver` apply their manifests without it, which puts the base
+`objectstore-plugin` sidecars back, so redeploy with `deploy ate-system`.
+
+The component changes only the sidecars. atelet and ate-api-server have no
+object storage settings of their own. atelet still needs the node's kubelet
+image credential provider from the chosen overlay to pull private actor
+images: `base` uses GKE's credential provider paths, and the kind overlay pulls
+actor images without credentials.
+
+## Snapshot location
+
+ate-api-server stores snapshots under `--snapshot-location`, which must be an
+`azblob://` URI in one of the configured containers. With the
+`PerTemplateSnapshotLocation` preview gate, an ActorTemplate's
+`snapshotConfig.storageLocation` overrides it and must meet the same rule.
+Without the gate, ate-api-server ignores that field. See
+[Snapshot storage](https://github.com/agent-substrate/substrate/blob/main/docs/operator-install.md#snapshot-storage).
+
+## Error behavior
+
+| Condition | gRPC code |
+|---|---|
+| Invalid URI, local path, or file list | `InvalidArgument` |
+| Requested blob absent during fetch | `NotFound` |
+| Configured container absent (cleanup succeeds instead) | `FailedPrecondition` |
+| Empty copy source | `FailedPrecondition` |
+| Azure Storage returns HTTP 401 or 403 | `PermissionDenied` |
+| Azure throttling, timeout, or server failure | `Unavailable` |
+| Connection failure, DNS server failure, or DNS timeout after the SDK's retries, or a download that fails after resuming | `Unavailable` |
+| Storage request that makes no progress for one minute (sending, awaiting the response, or one body read), after the SDK's retries | `Unavailable` |
+| Unknown storage account host name | `Internal` |
+| Microsoft Entra token request throttled, timed out, failed with a server error, or got no response | `Unavailable` |
+| Microsoft Entra rejects the token request | `Internal` |
+| Blob replaced while a download was resuming | `Unavailable` |
+| Context canceled or deadline exceeded | `Canceled` / `DeadlineExceeded` |
+| SHA-256 metadata absent, invalid, or mismatched | `DataLoss` |
+| Other local or Azure failures | `Internal` |
+
+`FetchAsset` differs where its codes carry a narrower meaning:
+`PermissionDenied` means a refused snapshot location, so an Azure 401 or 403
+is `Internal`; an absent asset container is `NotFound`; and a size or sha256
+mismatch is `FailedPrecondition`. A 401 or 403 refuses the plugin's own
+identity, not the URL; atelet reads an asset anonymously after `Internal` only
+for `gs://` URLs, which this plugin never reads.
+
+## Limitations and open edges
+
+- atelet sends an `actor_jwt` with every snapshot transfer. The plugin
+ ignores it and does not authorize per actor: the node identity can read and
+ write every snapshot in the configured containers and prefix.
:robot: follow-up: pkg/objectstore/actorauthz is in v1.0.0 now (agent-substrate/substrate#3358), can we file an issue here to adopt it and link it from this bullet?
@@ -1,10 +1,344 @@
# Azure Blob object-store plugin
-An out-of-tree [Agent Substrate](https://github.com/agent-substrate/substrate)
-object-store plugin backed by Azure Blob Storage.
+This plugin implements [Agent Substrate](https://github.com/agent-substrate/substrate)'s
+`substrate.objectstore.v1` node and control services with Azure Blob Storage,
+and its `AssetProvider` for sandbox assets. It runs in `node` mode beside
+atelet and in `control` mode beside ate-api-server. The module imports only
+substrate's public `api/` and `pkg/` packages.
-The plugin code is landing in follow-up pull requests. This repository
-currently holds the Go module, its build targets and CI.
+The plugin stores each requested snapshot file as one block blob. Uploads use
+deterministic staged block IDs and atomically replace the committed block list,
+so a retry after a partial upload is safe. Each blob carries a SHA-256 digest
+in metadata. Fetch and copy verify that digest before exposing or committing
+the destination bytes. Azure also verifies each staged block's MD5 in transit.
+
+## Compatibility
+
+The plugin needs a substrate that serves the `substrate.objectstore.v1` proto
+package, introduced by
+[agent-substrate/substrate@48f5744](https://github.com/agent-substrate/substrate/commit/48f5744c1dde5ffa63e926f5b4d037065f109965).
+As of 2026-10-28, no substrate release includes it and the `release-0.6` branch
+does not either. Releases cut from `main` after that commit will; v0.6.x patch
+releases cut from `release-0.6` will not unless the commit is cherry-picked
+there. v0.6.0 and earlier call the old `objectstore.v1` service name, so this
+plugin answers them with `Unimplemented`. `go.mod` pins the substrate version
+the plugin is built and tested against.
+
+## Sidecars
+
+Substrate's install manifests run an `objectstore-plugin` native sidecar next to
+atelet and ate-api-server, and the callers reach it over a Unix socket in a
+pod-local `emptyDir`:
+
+- node socket: `/run/objectstore-plugin/node.sock`
+- control socket: `/run/objectstore-plugin/control.sock`
+- node snapshot root: `/var/lib/ate`
+
+The `config/` component replaces those sidecars' image and arguments with this
+plugin's, removes the base `ATE_STORAGE_BACKEND`, adds the workload identity
+environment and projected token, and points their startup probes at
+`azure-blob-objectstore-plugin healthcheck`, which reports whether the plugin at
+`--socket` is serving gRPC health. It leaves the caller containers and the
+socket volume as the base defines them. The base control sidecar's credential
+exchange settings also stay: the `exchange` port, `ATE_API_ACTOR_JWT_ISSUER`,
+`POD_NAMESPACE`, and the `servicedns`, `podidentity` and `actor-id-jwt-jwks`
+mounts; this plugin serves no exchange and reads none of them. The
+`ATE_API_SNAPSHOT_TRANSFER_SERVICE_ACCOUNT` variable still comes from the
+ConfigMap key ate-setup writes, so a hand-written ConfigMap must still carry
+that key for the pod to start. On the kind overlay, the `AWS_*` variables its
+RustFS patches add also stay on both sidecars; the plugin reads none of them.
+
+## Snapshot URIs
+
+The plugin accepts:
+
+```text
+azblob://<container>/<snapshot-prefix>
+```
+
+`<container>` must be one of `--containers`, and `CopySnapshot` may copy
+between any two of them. `--prefix`, when set, is prepended to every snapshot
+prefix in every container, allowing all substrate data to live below one
+directory. The blob name prefix is the URI's percent-decoded path, so
+`root%2Fsub` and `root/sub` name the same blobs, as they do in substrate's
+objectstore-plugin. A bare container, userinfo, a query or fragment, `\`, and `.`,
+`..` or other path segments made only of dots and spaces are rejected.
+
+## Sandbox assets
+
+In `node` mode with `--asset-containers` set (the `config/assets` component
+sets it), the plugin also serves
+`AssetProvider.FetchAsset`, which atelet calls for every sandbox asset URL
+that is not `gs://` (for example the micro-VM kernel, rootfs,
+`cloud-hypervisor` and `virtiofsd` in a `SandboxConfig`). Asset URLs use the
+blob's native URL in the plugin's account:
+
+```text
+https://<account>.blob.core.windows.net/<container>/<blob>
+```
+
+`<container>` must be one of `--asset-containers`; it may also be a snapshot
+container. The blob name is used as is: `--prefix` does not apply. A URL on
+another host, with a query (such as a SAS token), user info or a fragment, or
+with a non-canonical blob name (empty, `.`-terminated or space-padded
+segments, `\`) is rejected with `InvalidArgument`.
+
+The plugin applies the same two checks as substrate's objectstore-plugin,
+through substrate's `pkg/assetfetch`:
+
+- It refuses, with `PermissionDenied` and before any download, any blob
+ stored under a snapshot or tag location
+ (`.../atespaces/<atespace>/actors/<uid>/snapshots/<name>/...` or
+ `.../atespaces/<atespace>/tags/<uid>/...`) in any container, so the node
+ identity's read access to snapshots cannot be used to read them as assets.
+- It downloads into `--asset-staging-dir`, which only the plugin container
+ mounts, stops at `max_bytes`, verifies the requested sha256, and only then
+ atomically replaces atelet's existing file with the bytes. atelet verifies
+ the sha256 again.
+
+Downloads in flight hold at most `--asset-staging-capacity` bytes in the
+staging directory together: each reserves its blob's size, and one that does
+not fit waits for the others. A blob larger than the capacity is refused with
+`FailedPrecondition`. The default, `8Gi`, matches atelet's per-asset cap and
+the base manifest's `asset-staging` volume.
+
+The node identity needs `Storage Blob Data Reader` on each asset container
+that is not also a snapshot container.
+
+Without `--asset-containers`, atelet's plugin serves no assets and atelet gets
+`Unimplemented`: it still reads public `gs://` assets, such as the default
+gVisor release, anonymously, and fails any other asset URL. The `config/`
+component alone is therefore a snapshot-only install; see
+[Deployment](#deployment) for adding assets.
+
+## Configuration
+
+| Flag | Environment fallback | Default | Purpose |
+|---|---|---|---|
+| `--account-url` | `AZURE_STORAGE_ACCOUNT_URL` | required | `https://<account>.blob.core.windows.net` |
+| `--containers` | `AZURE_STORAGE_CONTAINERS` | required | Comma-separated blob containers that snapshot URIs may name; a name that breaks Azure's container naming rules fails startup |
+| `--prefix` | `AZURE_STORAGE_PREFIX` | empty | Prefix prepended to every snapshot key |
+| `--socket` | none | required | Unix socket to serve |
+| `--root` | none | `/var/lib/ate` | Node mode's allowed local snapshot and asset tree |
+| `--asset-containers` | `AZURE_STORAGE_ASSET_CONTAINERS` | empty | Node mode: comma-separated blob containers that sandbox asset URLs may name; empty serves no assets (atelet then gets `Unimplemented`) |
+| `--asset-staging-dir` | none | `/var/lib/objectstore-plugin/asset-staging` | Node mode: private directory assets are downloaded into and verified in; must not be below `--root` |
+| `--asset-staging-capacity` | none | `8Gi` | Node mode: the most asset downloads in `--asset-staging-dir` may hold at once, as a Kubernetes quantity |
+
+`healthcheck` mode takes `--socket` and `--timeout` (default `5s`) and exits
+non-zero unless the plugin at `--socket` reports `SERVING` within the timeout.
+
+The account URL must use `https`. The plugin sends requests, and with them its
+storage token, only to the scheme and host of `--account-url`: it refuses a
+request to any other endpoint and does not follow redirects. Snapshot URIs
+name only a container and prefix, never a host, so no request can choose
+where the token goes.
+
+## Authentication
+
+The plugin authenticates to Azure Storage only with Microsoft Entra workload
+identity federation: it exchanges the pod's projected service account token for
+an Entra token. It does not accept storage account keys, connection strings,
+SAS tokens, client secrets or certificates, and never authenticates as the
+node's managed identity. It reads the standard `azidentity` variables:
+
+| Variable | Value |
+|---|---|
+| `AZURE_CLIENT_ID` | Client ID of the user-assigned managed identity whose federated identity credential trusts the cluster's service account token issuer |
+| `AZURE_TENANT_ID` | Microsoft Entra tenant ID |
+| `AZURE_FEDERATED_TOKEN_FILE` | Path of the projected service account token |
+
+The plugin fails at startup, naming the missing variables, when any of them is
+unset or the token file cannot be read. It has no other credential to fall
+back to.
+
+Create federated identity credentials with audience
+`api://AzureADTokenExchange`, the cluster's service account issuer, and these
+subjects:
+
+```text
+system:serviceaccount:ate-system:atelet
+system:serviceaccount:ate-system:ate-api-server
+```
+
+Microsoft Entra ID must be able to fetch the issuer's OIDC discovery document
+and signing keys.
+
+Grant each identity `Storage Blob Data Contributor` scoped to each container in
+`--containers`:
+
+```bash
+CONTAINER_SCOPE="/subscriptions/<subscription>/resourceGroups/<resource-group>/providers/Microsoft.Storage/storageAccounts/<account>/blobServices/default/containers/<container>"
+az role assignment create \
+ --assignee-object-id <principal-object-id> \
+ --assignee-principal-type ServicePrincipal \
+ --role "Storage Blob Data Contributor" \
+ --scope "$CONTAINER_SCOPE"
+```
+
+`ServicePrincipal` is the principal type Azure role assignments use for
+managed identities as well, so it is correct for a user-assigned managed
+identity; no client secret or certificate is involved.
+
+The identity federated to `system:serviceaccount:ate-system:atelet` (the
+plugin in `node` mode) needs blob read/write access. The identity federated to
+`system:serviceaccount:ate-system:ate-api-server` (the plugin in `control` mode)
+needs blob read/write/delete access; the built-in role above covers both.
+
+## Deployment
+
+Clone this repository and build and push the image:
+
+```bash
+KO_DOCKER_REPO=<registry> make build-image
+```
+
+The `config/` component configures workload identity: it projects a service
+account token with audience `api://AzureADTokenExchange` into both sidecars and
+sets their `AZURE_*` variables, without a webhook mutating the whole Pod. Edit
+`config/kustomization.yaml` to set:
+
+- both `example.invalid/replace-with-azure-blob-objectstore-plugin:latest` image
+ fields to the digest reference printed by `make build-image`;
+- both client IDs and the tenant ID;
+- the storage account URL;
+- the containers;
+- the optional storage prefix.
+
+`ate-setup` has no option to add a component, so add this one, by its path
+relative to the overlay, to the overlay that `ate-setup deploy ate-system`
+renders in your substrate checkout: `manifests/ate-install/base` by default,
+or `manifests/ate-install/kind` with `--kind`. For example, with this
+repository cloned next to substrate, in
+`manifests/ate-install/kind/kustomization.yaml`:
+
+```yaml
+components:
+- ../../../../objectstore-azure-blob/config
+```
+
+To serve sandbox assets from blob containers as well, replace the
+`REPLACE_WITH_ASSET_CONTAINERS` placeholder in `config/assets/kustomization.yaml`
+with a comma-separated list of containers, grant the node identity read access
+to them, and list that component after the first:
+
+```yaml
+components:
+- ../../../../objectstore-azure-blob/config
+- ../../../../objectstore-azure-blob/config/assets
+```
+
+A `SandboxConfig` version then names each asset by its blob URL and sha256, for
+example:
+
+```yaml
+assets:
+ amd64:
+ kata-kernel:
+ url: https://<account>.blob.core.windows.net/<container>/kata/vmlinux
+ sha256: <sha256 of the blob>
+```
+
+Then install from the substrate repository root:
+
+```bash
+go run ./cmd/ate-setup deploy ate-system \
+ --kind \
+ --context <context> \
+ --ko-docker-repo <registry> \
+ --ko-default-platforms linux/amd64 \
+ --credential-provider='{"name":"k8s.io"}' \
+ --snapshot-location=azblob://<container>/<snapshot-root>/
+```
+
+`--kind` selects the kind overlay. It does not create a kind cluster, but it
+defaults several settings to a local kind setup, including the context,
+registry, and build platform, so name all three for any other cluster. It
+also defaults the snapshot location to `gs://ate-snapshots/`, which this plugin
+rejects, so set `--snapshot-location` on kind too.
+
+On any other cluster, ate-setup currently installs for GKE: `deploy ate-system`
+refuses to start without `--snapshot-transfer-gsa-name` and
+`--gcp-project-id`, which configure the GCS credential exchange this plugin
+replaces. The plugin reads neither.
+
+Only `deploy ate-system` renders that overlay. `deploy atelet` and
+`deploy apiserver` apply their manifests without it, which puts the base
+`objectstore-plugin` sidecars back, so redeploy with `deploy ate-system`.
+
+The component changes only the sidecars. atelet and ate-api-server have no
+object storage settings of their own. atelet still needs the node's kubelet
+image credential provider from the chosen overlay to pull private actor
+images: `base` uses GKE's credential provider paths, and the kind overlay pulls
+actor images without credentials.
+
+## Snapshot location
+
+ate-api-server stores snapshots under `--snapshot-location`, which must be an
+`azblob://` URI in one of the configured containers. With the
+`PerTemplateSnapshotLocation` preview gate, an ActorTemplate's
+`snapshotConfig.storageLocation` overrides it and must meet the same rule.
+Without the gate, ate-api-server ignores that field. See
+[Snapshot storage](https://github.com/agent-substrate/substrate/blob/main/docs/operator-install.md#snapshot-storage).
+
+## Error behavior
+
+| Condition | gRPC code |
+|---|---|
+| Invalid URI, local path, or file list | `InvalidArgument` |
+| Requested blob absent during fetch | `NotFound` |
+| Configured container absent (cleanup succeeds instead) | `FailedPrecondition` |
+| Empty copy source | `FailedPrecondition` |
+| Azure Storage returns HTTP 401 or 403 | `PermissionDenied` |
+| Azure throttling, timeout, or server failure | `Unavailable` |
+| Connection failure, DNS server failure, or DNS timeout after the SDK's retries, or a download that fails after resuming | `Unavailable` |
+| Storage request that makes no progress for one minute (sending, awaiting the response, or one body read), after the SDK's retries | `Unavailable` |
+| Unknown storage account host name | `Internal` |
+| Microsoft Entra token request throttled, timed out, failed with a server error, or got no response | `Unavailable` |
+| Microsoft Entra rejects the token request | `Internal` |
+| Blob replaced while a download was resuming | `Unavailable` |
+| Context canceled or deadline exceeded | `Canceled` / `DeadlineExceeded` |
+| SHA-256 metadata absent, invalid, or mismatched | `DataLoss` |
+| Other local or Azure failures | `Internal` |
:robot: non-blocking: the code table and the block size / buffer details below are implementation details, documenting them here turns them into a promise and they'll drift (MD5Mismatch already maps to Unavailable and isn't in the table). The code semantics are substrate's plugin contract to define (agent-substrate/substrate#3665).
I'd move these to code comments and keep what operators act on: the roles, the per-file size limit, SnapshotsPresent and the cross-account limit.
@@ -41,3 +41,16 @@ jobs:
run: make verify
- name: test
run: make test
+ run-integration-tests:
I assume we want this required after this merges.
@@ -1,10 +1,344 @@
# Azure Blob object-store plugin
-An out-of-tree [Agent Substrate](https://github.com/agent-substrate/substrate)
-object-store plugin backed by Azure Blob Storage.
+This plugin implements [Agent Substrate](https://github.com/agent-substrate/substrate)'s
+`substrate.objectstore.v1` node and control services with Azure Blob Storage,
+and its `AssetProvider` for sandbox assets. It runs in `node` mode beside
+atelet and in `control` mode beside ate-api-server. The module imports only
+substrate's public `api/` and `pkg/` packages.
-The plugin code is landing in follow-up pull requests. This repository
-currently holds the Go module, its build targets and CI.
+The plugin stores each requested snapshot file as one block blob. Uploads use
+deterministic staged block IDs and atomically replace the committed block list,
+so a retry after a partial upload is safe. Each blob carries a SHA-256 digest
+in metadata. Fetch and copy verify that digest before exposing or committing
+the destination bytes. Azure also verifies each staged block's MD5 in transit.
+
+## Compatibility
+
+The plugin needs a substrate that serves the `substrate.objectstore.v1` proto
+package, introduced by
+[agent-substrate/substrate@48f5744](https://github.com/agent-substrate/substrate/commit/48f5744c1dde5ffa63e926f5b4d037065f109965).
+As of 2026-10-28, no substrate release includes it and the `release-0.6` branch
+does not either. Releases cut from `main` after that commit will; v0.6.x patch
+releases cut from `release-0.6` will not unless the commit is cherry-picked
+there. v0.6.0 and earlier call the old `objectstore.v1` service name, so this
+plugin answers them with `Unimplemented`. `go.mod` pins the substrate version
+the plugin is built and tested against.
+
+## Sidecars
+
+Substrate's install manifests run an `objectstore-plugin` native sidecar next to
+atelet and ate-api-server, and the callers reach it over a Unix socket in a
+pod-local `emptyDir`:
+
+- node socket: `/run/objectstore-plugin/node.sock`
+- control socket: `/run/objectstore-plugin/control.sock`
+- node snapshot root: `/var/lib/ate`
+
+The `config/` component replaces those sidecars' image and arguments with this
+plugin's, removes the base `ATE_STORAGE_BACKEND`, adds the workload identity
+environment and projected token, and points their startup probes at
+`azure-blob-objectstore-plugin healthcheck`, which reports whether the plugin at
+`--socket` is serving gRPC health. It leaves the caller containers and the
+socket volume as the base defines them. The base control sidecar's credential
+exchange settings also stay: the `exchange` port, `ATE_API_ACTOR_JWT_ISSUER`,
+`POD_NAMESPACE`, and the `servicedns`, `podidentity` and `actor-id-jwt-jwks`
+mounts; this plugin serves no exchange and reads none of them. The
+`ATE_API_SNAPSHOT_TRANSFER_SERVICE_ACCOUNT` variable still comes from the
+ConfigMap key ate-setup writes, so a hand-written ConfigMap must still carry
+that key for the pod to start. On the kind overlay, the `AWS_*` variables its
+RustFS patches add also stay on both sidecars; the plugin reads none of them.
+
+## Snapshot URIs
+
+The plugin accepts:
+
+```text
+azblob://<container>/<snapshot-prefix>
+```
+
+`<container>` must be one of `--containers`, and `CopySnapshot` may copy
+between any two of them. `--prefix`, when set, is prepended to every snapshot
+prefix in every container, allowing all substrate data to live below one
+directory. The blob name prefix is the URI's percent-decoded path, so
+`root%2Fsub` and `root/sub` name the same blobs, as they do in substrate's
+objectstore-plugin. A bare container, userinfo, a query or fragment, `\`, and `.`,
+`..` or other path segments made only of dots and spaces are rejected.
+
+## Sandbox assets
+
+In `node` mode with `--asset-containers` set (the `config/assets` component
+sets it), the plugin also serves
+`AssetProvider.FetchAsset`, which atelet calls for every sandbox asset URL
+that is not `gs://` (for example the micro-VM kernel, rootfs,
+`cloud-hypervisor` and `virtiofsd` in a `SandboxConfig`). Asset URLs use the
+blob's native URL in the plugin's account:
+
+```text
+https://<account>.blob.core.windows.net/<container>/<blob>
+```
+
+`<container>` must be one of `--asset-containers`; it may also be a snapshot
+container. The blob name is used as is: `--prefix` does not apply. A URL on
+another host, with a query (such as a SAS token), user info or a fragment, or
+with a non-canonical blob name (empty, `.`-terminated or space-padded
+segments, `\`) is rejected with `InvalidArgument`.
+
+The plugin applies the same two checks as substrate's objectstore-plugin,
+through substrate's `pkg/assetfetch`:
+
+- It refuses, with `PermissionDenied` and before any download, any blob
+ stored under a snapshot or tag location
+ (`.../atespaces/<atespace>/actors/<uid>/snapshots/<name>/...` or
+ `.../atespaces/<atespace>/tags/<uid>/...`) in any container, so the node
+ identity's read access to snapshots cannot be used to read them as assets.
+- It downloads into `--asset-staging-dir`, which only the plugin container
+ mounts, stops at `max_bytes`, verifies the requested sha256, and only then
+ atomically replaces atelet's existing file with the bytes. atelet verifies
+ the sha256 again.
+
+Downloads in flight hold at most `--asset-staging-capacity` bytes in the
+staging directory together: each reserves its blob's size, and one that does
+not fit waits for the others. A blob larger than the capacity is refused with
+`FailedPrecondition`. The default, `8Gi`, matches atelet's per-asset cap and
+the base manifest's `asset-staging` volume.
+
+The node identity needs `Storage Blob Data Reader` on each asset container
+that is not also a snapshot container.
+
+Without `--asset-containers`, atelet's plugin serves no assets and atelet gets
+`Unimplemented`: it still reads public `gs://` assets, such as the default
+gVisor release, anonymously, and fails any other asset URL. The `config/`
+component alone is therefore a snapshot-only install; see
+[Deployment](#deployment) for adding assets.
+
+## Configuration
+
+| Flag | Environment fallback | Default | Purpose |
+|---|---|---|---|
+| `--account-url` | `AZURE_STORAGE_ACCOUNT_URL` | required | `https://<account>.blob.core.windows.net` |
+| `--containers` | `AZURE_STORAGE_CONTAINERS` | required | Comma-separated blob containers that snapshot URIs may name; a name that breaks Azure's container naming rules fails startup |
+| `--prefix` | `AZURE_STORAGE_PREFIX` | empty | Prefix prepended to every snapshot key |
+| `--socket` | none | required | Unix socket to serve |
+| `--root` | none | `/var/lib/ate` | Node mode's allowed local snapshot and asset tree |
+| `--asset-containers` | `AZURE_STORAGE_ASSET_CONTAINERS` | empty | Node mode: comma-separated blob containers that sandbox asset URLs may name; empty serves no assets (atelet then gets `Unimplemented`) |
+| `--asset-staging-dir` | none | `/var/lib/objectstore-plugin/asset-staging` | Node mode: private directory assets are downloaded into and verified in; must not be below `--root` |
+| `--asset-staging-capacity` | none | `8Gi` | Node mode: the most asset downloads in `--asset-staging-dir` may hold at once, as a Kubernetes quantity |
+
+`healthcheck` mode takes `--socket` and `--timeout` (default `5s`) and exits
+non-zero unless the plugin at `--socket` reports `SERVING` within the timeout.
+
+The account URL must use `https`. The plugin sends requests, and with them its
+storage token, only to the scheme and host of `--account-url`: it refuses a
+request to any other endpoint and does not follow redirects. Snapshot URIs
+name only a container and prefix, never a host, so no request can choose
+where the token goes.
+
+## Authentication
+
+The plugin authenticates to Azure Storage only with Microsoft Entra workload
+identity federation: it exchanges the pod's projected service account token for
+an Entra token. It does not accept storage account keys, connection strings,
+SAS tokens, client secrets or certificates, and never authenticates as the
+node's managed identity. It reads the standard `azidentity` variables:
+
+| Variable | Value |
+|---|---|
+| `AZURE_CLIENT_ID` | Client ID of the user-assigned managed identity whose federated identity credential trusts the cluster's service account token issuer |
+| `AZURE_TENANT_ID` | Microsoft Entra tenant ID |
+| `AZURE_FEDERATED_TOKEN_FILE` | Path of the projected service account token |
+
+The plugin fails at startup, naming the missing variables, when any of them is
+unset or the token file cannot be read. It has no other credential to fall
+back to.
+
+Create federated identity credentials with audience
+`api://AzureADTokenExchange`, the cluster's service account issuer, and these
+subjects:
+
+```text
+system:serviceaccount:ate-system:atelet
+system:serviceaccount:ate-system:ate-api-server
+```
+
+Microsoft Entra ID must be able to fetch the issuer's OIDC discovery document
+and signing keys.
+
+Grant each identity `Storage Blob Data Contributor` scoped to each container in
+`--containers`:
+
+```bash
+CONTAINER_SCOPE="/subscriptions/<subscription>/resourceGroups/<resource-group>/providers/Microsoft.Storage/storageAccounts/<account>/blobServices/default/containers/<container>"
+az role assignment create \
+ --assignee-object-id <principal-object-id> \
+ --assignee-principal-type ServicePrincipal \
+ --role "Storage Blob Data Contributor" \
+ --scope "$CONTAINER_SCOPE"
+```
+
+`ServicePrincipal` is the principal type Azure role assignments use for
+managed identities as well, so it is correct for a user-assigned managed
+identity; no client secret or certificate is involved.
+
+The identity federated to `system:serviceaccount:ate-system:atelet` (the
+plugin in `node` mode) needs blob read/write access. The identity federated to
+`system:serviceaccount:ate-system:ate-api-server` (the plugin in `control` mode)
+needs blob read/write/delete access; the built-in role above covers both.
+
+## Deployment
+
+Clone this repository and build and push the image:
+
+```bash
+KO_DOCKER_REPO=<registry> make build-image
+```
+
+The `config/` component configures workload identity: it projects a service
+account token with audience `api://AzureADTokenExchange` into both sidecars and
+sets their `AZURE_*` variables, without a webhook mutating the whole Pod. Edit
+`config/kustomization.yaml` to set:
+
+- both `example.invalid/replace-with-azure-blob-objectstore-plugin:latest` image
+ fields to the digest reference printed by `make build-image`;
+- both client IDs and the tenant ID;
+- the storage account URL;
+- the containers;
+- the optional storage prefix.
+
+`ate-setup` has no option to add a component, so add this one, by its path
+relative to the overlay, to the overlay that `ate-setup deploy ate-system`
+renders in your substrate checkout: `manifests/ate-install/base` by default,
+or `manifests/ate-install/kind` with `--kind`. For example, with this
+repository cloned next to substrate, in
+`manifests/ate-install/kind/kustomization.yaml`:
+
+```yaml
+components:
+- ../../../../objectstore-azure-blob/config
+```
+
+To serve sandbox assets from blob containers as well, replace the
+`REPLACE_WITH_ASSET_CONTAINERS` placeholder in `config/assets/kustomization.yaml`
+with a comma-separated list of containers, grant the node identity read access
+to them, and list that component after the first:
+
+```yaml
+components:
+- ../../../../objectstore-azure-blob/config
+- ../../../../objectstore-azure-blob/config/assets
+```
+
+A `SandboxConfig` version then names each asset by its blob URL and sha256, for
+example:
+
+```yaml
+assets:
+ amd64:
+ kata-kernel:
+ url: https://<account>.blob.core.windows.net/<container>/kata/vmlinux
+ sha256: <sha256 of the blob>
+```
+
+Then install from the substrate repository root:
+
+```bash
+go run ./cmd/ate-setup deploy ate-system \
+ --kind \
+ --context <context> \
+ --ko-docker-repo <registry> \
+ --ko-default-platforms linux/amd64 \
+ --credential-provider='{"name":"k8s.io"}' \
+ --snapshot-location=azblob://<container>/<snapshot-root>/
+```
+
+`--kind` selects the kind overlay. It does not create a kind cluster, but it
+defaults several settings to a local kind setup, including the context,
+registry, and build platform, so name all three for any other cluster. It
+also defaults the snapshot location to `gs://ate-snapshots/`, which this plugin
+rejects, so set `--snapshot-location` on kind too.
+
+On any other cluster, ate-setup currently installs for GKE: `deploy ate-system`
+refuses to start without `--snapshot-transfer-gsa-name` and
+`--gcp-project-id`, which configure the GCS credential exchange this plugin
+replaces. The plugin reads neither.
Worth noting: there's a conversation about replacing the installer, unclear when we can land that.
Again, in this particular case I'm not going to line by line review, this one time, I trust you and we need to unblock getting a baseline implementation in.
Many nits kept for possible follow-up.
We'll need a better model going forward, this is a discussion with thockin currently.
Approved these changes.
aramase
Residual = Change × (1 − Confidence)
BenTheElder
The rest of the series in one PR, now that #2 has merged: it carries the commits from #3, #4 and #5 plus the install docs, unchanged, so each can still be reviewed commit by commit. #3, #4 and #5 will be closed in favour of this one.
internal/provider): substrate'sobjectstore.v1node and control services on the blob store. Fetch, Upload, Cleanup and Copy are confined to--root, the prefix and the configured containers; each file is one block blob with deterministic block IDs and a SHA-256 digest that fetch and copy verify. Unit and block-size tests, Azurite tests over gRPC on a Unix socket,hack/test-azurite.sh,make test-integrationand therun-integration-testsCI job.AssetProviderservice, kept apart from the snapshot provider because it has its own trust checks. It reads asset URIs in the account's native blob URL form, only from the configured asset containers, refuses blobs under a snapshot or tag location before reading anything, downloads into a private staging directory and copies below--rootonly once size and sha256 check out. A staging capacity bounds concurrent downloads.cmd/azure-blob-objectstore-pluginwithnode,controlandhealthcheckmodes, workload identity credentials, flag validation, an import-boundary test and an Azurite end-to-end test;.ko.yamlandmake build-image;config/kustomize components that replace the objectstore-plugin sidecars in a substrate install overlay, plus an optional assets component.Deferred: the
deployand release targets. The components only work inside a substrate install overlay, so a standalonedeploytarget has nothing to apply, and a release target needs a version stamped into the image.Commits: