Skip to content

feat: simplify pre-signing urls - #58

Merged
designcode merged 3 commits into
mainfrom
feat/simplifying-access-key-operations
Mar 30, 2026
Merged

designcode merged 3 commits into
mainfrom
feat/simplifying-access-key-operations

Conversation

@designcode

@designcode designcode commented Mar 30, 2026 •

Copy link
Copy Markdown
Collaborator

Note

Medium Risk
Changes how presign chooses an access key during OAuth login by auto-selecting based on bucket/role/method, which could alter behavior or fail in edge role configurations. Adds new CLI surface area (--select) and updates test execution defaults, but no changes to signing or network APIs beyond key selection.

Overview
Simplifies presign access-key resolution for OAuth logins by defaulting to an automatic selection of an active access key that matches the target bucket and requested operation (get vs put), with clearer errors when no suitable key exists.

Adds an explicit --select flag to opt into interactive key selection (TTY-only), and introduces/exports keyMatchesOperation with new unit tests to validate role/bucket matching (including NamespaceAdmin).

Test tooling is adjusted: npm test now excludes the integration CLI test file by default, and Vitest output is set to verbose.

Written by Cursor Bugbot for commit f6c453f. This will update automatically on new commits. Configure here.

designcode and others added 2 commits March 30, 2026 15:52
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

@cursor cursor Bot 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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment thread src/lib/presign.ts Outdated
…th paths

- Export keyMatchesOperation and use it in both auto-resolve and
  interactive prompt paths for consistent role+method filtering
- Add unit tests for keyMatchesOperation covering get/put methods,
  NamespaceAdmin, wildcard buckets, and edge cases
- Simplify test script to auto-discover test files via vitest config
- Remove -i alias from --select flag

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@designcode
designcode merged commit a0c5966 into main Mar 30, 2026
3 checks passed
@designcode
designcode deleted the feat/simplifying-access-key-operations branch March 30, 2026 16:26
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 2.14.0-beta.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions

github-actions Bot commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 2.15.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants