Skip to content

fix: use resolveAuthMethod() in IAM config helpers - #63

Merged
designcode merged 1 commit into
mainfrom
fix/iam-auth-resolution
Apr 2, 2026
Merged

designcode merged 1 commit into
mainfrom
fix/iam-auth-resolution

Conversation

@designcode

@designcode designcode commented Apr 2, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • getIAMConfig() and getOAuthIAMConfig() had their own auth resolution logic that diverged from resolveAuthMethod(), missing AWS profiles and env var credentials. Now both delegate to resolveAuthMethod() as the single source of truth.
  • Moves isFlyOrganization() into auth/fly.ts where isFlyUser() lives, and deduplicates the inline check in organizations/create.ts.

Test plan

  • npm run build passes
  • All 529 tests pass
  • npm run format and npm run lint:fix clean

🤖 Generated with Claude Code


Note

Medium Risk
Changes IAM authentication selection to follow resolveAuthMethod(), which can alter how credentials are chosen (AWS profile/env vs OAuth) for IAM commands and potentially affect access in edge cases. Also refactors Fly.io organization restrictions into a shared helper, with low functional risk.

Overview
Aligns IAM config construction with resolveAuthMethod() so getIAMConfig() consistently supports AWS profiles and environment/configured credentials (matching getStorageConfig() priority) while keeping getOAuthIAMConfig() strictly OAuth-only.

Moves Fly.io organization gating into auth/fly.ts as isFlyOrganization(feature) and updates IAM user-management commands and organizations create to use the shared, feature-specific message instead of duplicated checks.

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

@designcode
designcode force-pushed the fix/iam-auth-resolution branch from fc62eb1 to cb589a5 Compare April 2, 2026 17:20

@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/auth/iam.ts
getIAMConfig() had its own auth resolution logic that diverged from
resolveAuthMethod(), missing AWS profiles and env var credentials.
Now delegates to resolveAuthMethod() as the single source of truth.

getOAuthIAMConfig() keeps using the stored login method since IAM
user/policy operations always require OAuth, even when env vars or
AWS profile override S3 auth.

Also moves isFlyOrganization() into auth/fly.ts where isFlyUser()
lives, and deduplicates the inline check in organizations/create.ts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@designcode
designcode force-pushed the fix/iam-auth-resolution branch from 6d9b28f to bf112a3 Compare April 2, 2026 17:56
@designcode
designcode merged commit f226f33 into main Apr 2, 2026
5 checks passed
@designcode
designcode deleted the fix/iam-auth-resolution branch April 2, 2026 18:17
@github-actions

github-actions Bot commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

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

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.

2 participants