Skip to content

simulator: authorize_account returns full master capabilities regardless of the authorizing key #19

Description

@goanpeca

Area: B2Simulator (src/simulator/index.ts, authorize)

The auth response returns a fixed full capability set in apiInfo.storageApi.allowed.capabilities for every credential (except when a previously-created key's exact Basic header matches). A key created with, say, only listFiles still reports the full master set, which drives B2Client.hasCapabilities.

Impact: client-side capability-gating logic is tested against an over-broad cap list.

Expected: always derive the response allowed capabilities (and bucket/prefix restrictions) from the authorizing key.

Acceptance criteria:

  • restricted key reports only its granted capabilities
  • bucket/namePrefix restriction reflected in allowed
  • regression tests

Source: post-0.1.0 audit.

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions