Skip to content

Support mieweb exec <instance> across providers and define which guest user runs the command #32

Backlog

Description

@horner

Requested behavior

Run a command against one instance using the same syntax on MIE Web and Cloudflare. For example, if the container and its proxy are both named billing-api:

mieweb exec billing-api -- node --version
mieweb --target cloudflare exec billing-api -- node --version
  • Accept a provider instance ID or a container name. On MIE Web, also accept a configured HTTP proxy name. Have Manager resolve the instance to its site and container ID so callers can omit --site.
  • Resolve names among containers the caller is authorized to manage. If the guest name and proxy identify the same container, count it once. If a name matches multiple guests or replicas, show how to select one by instance ID, full proxy hostname, or site as applicable. Only execute once the target is unambiguous.
  • Build on the existing Manager/Proxmox exec implementation and Cloudflare’s Wrangler SSH integration. Keep the existing mieweb exec --site 1 --container 42 -- … form working. Related work: CLI exec, Manager exec, container discovery.

Guest identity to discuss with Robert

Today Manager authorizes and audits the signed-in owner or admin, but every command starts as guest root (UID 0). On Cloudflare, Wrangler checks account permissions and an SSH key, then connects as cloudchamber. Cloudflare’s SSH guide does not specify the resulting guest UID. Its separate native exec API supports a Linux user and group, although a nonzero UID still has root-equivalent capabilities under the durable_object scheduling policy. Manager behavior · Cloudflare SSH · Cloudflare exec API

We want callers to know which guest user runs their command and to avoid granting root implicitly. One option on MIE Web is to map the authenticated caller to a guest account and switch to that user before running the command (su or equivalent). Decide how to establish that mapping, what happens if the account is missing, and how owners can explicitly request root for existing administrative workflows. Keep the authenticated caller and the effective guest user distinguishable in the audit record.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions