Skip to content

feat: ECS Support - #120

Merged
marcopiraccini merged 6 commits into
mainfrom
ecs-support
Aug 14, 2026
Merged

feat: ECS Support#120
marcopiraccini merged 6 commits into
mainfrom
ecs-support

Conversation

@marcopiraccini

@marcopiraccini marcopiraccini commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Adds ECS support to the service and client. ICC and machinist changes are not included, so nothing runs end to end on ECS yet.

One check for the Kubernetes service account token was answering three questions: can I authenticate, am I multi-tenant, and is ICC managing me. They coincide on Kubernetes but not on ECS, which has no identity yet still runs several ICC-managed applications. ECS deployments therefore collapsed to a single tenant, self-registered handlers at localhost, and stamped their version as local.

Each package gets a platform.ts detecting Kubernetes from the token and ECS from ECS_CONTAINER_METADATA_URI_V4, with isManagedPlatform() for the union. No flags: there is nothing like isK8s or isEcs to set. The client keys the application ID, resolved version, and handler self-registration on isManagedPlatform(); only the Authorization header still keys on Kubernetes.

The service replaces AuthConfig.mode with k8s? and multiTenant. The enum was read in one place where only 'none' mattered, while config.k8s did the real gating, and WF_AUTH_MODE=api-key silently rejected every request. Unauthenticated requests on a managed platform now resolve the tenant from the URL the client already sends; applications are registered by ICC and unknown ones rejected. Unmanaged deployments are unchanged.

Also fixes an unresolved application leaving request.appId at 0, which made an unknown application read as empty rather than a 404.

@marcopiraccini marcopiraccini changed the title ECS support ECS support [WIP] Jul 19, 2026
@marcopiraccini marcopiraccini changed the title ECS support [WIP] feat: detect ECS and separate tenancy from authentication Jul 19, 2026
@marcopiraccini marcopiraccini changed the title feat: detect ECS and separate tenancy from authentication feat: ECS Support Jul 19, 2026
@marcopiraccini marcopiraccini changed the title feat: ECS Support feat: ECS Support [WIP] Jul 21, 2026
Signed-off-by: marcopiraccini <marco.piraccini@gmail.com>
Two applications on one unauthenticated service, asserting a cross-tenant
read returns only the caller's data and that an application ICC never
registered fails closed with a 404 rather than reading as an empty tenant.
Records why tenancy is resolved from the URL, why AuthConfig.mode was
removed, and the outstanding ICC and machinist work: the ECS provider is
missing applyDeployment/applyService and stubs the skew-protection gateway
methods, and ICC's registerWorkflowApp returns early without a service
account token.
Reconciles this branch with the product decision that a user should set
as little as possible: requiring an explicit ID would force every
deployment ICC does not template (observe mode, desk) to hand-set an
identity the deployer already knows. Falls back through PLT_APP_NAME to
the package name, warning on a managed platform which ID was assumed.
Signed-off-by: marcopiraccini <marco.piraccini@gmail.com>
@marcopiraccini
marcopiraccini marked this pull request as ready for review August 12, 2026 14:53
@marcopiraccini
marcopiraccini requested review from ShogunPanda and mcollina and removed request for mcollina August 12, 2026 15:01
@marcopiraccini marcopiraccini changed the title feat: ECS Support [WIP] feat: ECS Support Aug 12, 2026

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ivan-tymoshenko ivan-tymoshenko left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@leorossi leorossi left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Signed-off-by: marcopiraccini <marco.piraccini@gmail.com>
@marcopiraccini
marcopiraccini merged commit b508907 into main Aug 14, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants