Skip to content

Sign S3-compatible object storage (Hetzner, R2, B2, MinIO), not only AWS #419

Open

Description

@tenequm

Problem

The gateway already signs AWS requests with SigV4 (apps/gateway/src/gateway/finalizers/aws_sigv4.rs), but only for the compiled-in aws provider whose host rules match .amazonaws.com / .api.aws. A non-AWS S3-compatible endpoint (Hetzner Object Storage, Cloudflare R2, Backblaze B2, MinIO) can't be signed, for two reasons:

  1. Nothing routes a non-AWS host to the SigV4 finalizer.
  2. parse_service_region("nbg1.your-objectstorage.com") returns ("unknown", ...), so the credential scope is wrong and S3 rejects the request.

A generic secret doesn't help: it injects a static header, but S3 auth is a computed per-request signature over the request, not a fixed token.

Concretely: I run an archive/search tool (pond) against a Hetzner bucket and want the bucket keys to live in the OneCLI vault instead of on the sandbox machine, with the gateway signing on the wire so the agent never holds them.

Proposal

Add an aws secret type that carries the IAM keys ({ accessKeyId, secretAccessKey, sessionToken? }) plus { region, service? } (service defaults to s3). The gateway emits the existing internal x-onecli-aws-* headers plus an explicit service, and the SigV4 finalizer signs any host when those headers are present. AWS hosts keep working unchanged, since they still parse service/region from the hostname.

Context

Discussed on the 2026-07-07 call with @johnnyfish and @guyb1, who invited a PR. Related but separate from #417 (credential use beyond HTTP injection). Draft PR ready to open.

Activity

  1. added
    area/appsApp connectors and OAuth connections
    featureNew feature or request
    has-prA community PR exists for this issue
    on Jul 31, 2026
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

    area/appsApp connectors and OAuth connectionsfeatureNew feature or requesthas-prA community PR exists for this issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions