Skip to content

Implicit S3 bucket signing reaches URL reads from non-reserved scopes #3299

Backlog

Description

@giswqs

Found in review of #2924 (pre-existing on main, not changed by that PR).

cache::prepare_get (crates/tiles/src/cache.rs, called by the general GET) calls s3::prepare, which runs signer_for (crates/tiles/src/s3.rs) for any https address without the rustgis-anonymous: marker. signer_for returns the implicit AWS session connection whose buckets or grants name the bucket and signs the request with its keys. Nothing on that path checks the command scope, so an Assistant or Agent with Network but not Reserved could read https://<bucket>.s3.amazonaws.com/... through any URL-reading command and get an object signed with the user's session keys.

#2924 fixes this for s3.list only (bucket_list_url marks the listing anonymous for non-reserved scopes). The scope decision belongs where the request is made: for example a thread-local "no implicit signing" flag in rustgis-tiles, set by policy/dispatch.rs around commands run under a scope where policy_allows_reserved() is false (as cache::held_to_public is set for held plugins), and carried onto the background threads those commands start.

Acceptance: a test where an Agent (Allow) and a Network-approved Assistant read a URL at an implicit AWS connection's bucket and the request carries no signature, while the User scope still signs.

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