Skip to content

feat(aws): add IAM and STS integrations#4137

Merged
waleedlatif1 merged 4 commits intostagingfrom
waleedlatif1/aws-credential-mgr
Apr 13, 2026
Merged

feat(aws): add IAM and STS integrations#4137
waleedlatif1 merged 4 commits intostagingfrom
waleedlatif1/aws-credential-mgr

Conversation

@waleedlatif1
Copy link
Copy Markdown
Collaborator

Summary

  • Add AWS IAM integration with 18 operations (users, roles, policies, groups, access keys)
  • Add AWS STS integration with 4 operations (assume role, get caller identity, get session token, get access key info)
  • Tools, blocks, API routes, icons, and docs for both services

Type of Change

  • New feature

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Apr 13, 2026 11:33pm

Request Review

@gitguardian
Copy link
Copy Markdown

gitguardian bot commented Apr 13, 2026

️✅ There are no secrets present in this pull request anymore.

If these secrets were true positive and are still valid, we highly recommend you to revoke them.
While these secrets were previously flagged, we no longer have a reference to the
specific commits where they were detected. Once a secret has been leaked into a git
repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@cursor
Copy link
Copy Markdown

cursor bot commented Apr 13, 2026

PR Summary

High Risk
Adds new IAM/STS API routes and tools that accept AWS credentials and can create/modify identities, policies, roles, and access keys, making failures or misuse security-impacting. No automated tests are included, so regressions in request validation or tool wiring may be missed.

Overview
Adds new AWS IAM and STS integrations across docs and the Sim app, including new icons, docs pages, and entries in tool metadata and landing-page integration lists.

Implements authenticated Next.js API endpoints plus shared AWS SDK clients/utilities for IAM (users/roles/policies/groups/access keys) and STS (assume role, caller identity, session token, access key info), and wires them into the tool/block registries so they can be invoked as iam_* and sts_* tools.

Reviewed by Cursor Bugbot for commit 64acaa6. Configure here.

@waleedlatif1 waleedlatif1 force-pushed the waleedlatif1/aws-credential-mgr branch from 63f9a32 to b57464e Compare April 13, 2026 23:12
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 13, 2026

Greptile Summary

Adds AWS IAM (18 operations) and STS (4 operations) integrations following the standard tools/block/icon/route pattern. Prior review feedback on durationSeconds range validation and version format has been addressed; a distinct STSIcon was also added.

Confidence Score: 5/5

Safe to merge — all findings are P2 quality suggestions with no blocking defects.

Prior review concerns (durationSeconds range validation, STS version format, distinct STSIcon) are fully addressed. The two remaining findings are minor: a missing JSON refine on assumeRolePolicyDocument and a missing .int() on maxItems. Neither causes incorrect behavior in the normal flow.

apps/sim/app/api/tools/iam/create-role/route.ts (JSON validation), apps/sim/app/api/tools/iam/list-{users,roles,groups,policies}/route.ts (integer validation for maxItems)

Important Files Changed

Filename Overview
apps/sim/app/api/tools/iam/utils.ts Shared IAM SDK client and all 18 operations; credential handling is clean, client.destroy() is called in finally blocks, and decodeURIComponent fallback in getRole is safe.
apps/sim/app/api/tools/sts/utils.ts STS SDK client and 4 operations; temporary credentials are correctly returned, durationSeconds truthiness check is fine given .min(900) constraint on callers.
apps/sim/app/api/tools/iam/create-role/route.ts assumeRolePolicyDocument is validated only as a non-empty string; invalid JSON bypasses Zod and causes a 500 from AWS instead of a 400.
apps/sim/app/api/tools/sts/assume-role/route.ts Correctly validates durationSeconds with .int().min(900).max(43200) following the fix from the prior review thread.
apps/sim/blocks/blocks/iam.ts IAM block with 18 operations; credential fields use password: true, params() handles string-to-number coercions correctly for maxItems and maxSessionDuration.
apps/sim/blocks/blocks/sts.ts STS block with 4 operations; targetAccessKeyId param name is consistent end-to-end through block, tool, and route.
apps/sim/tools/iam/types.ts Comprehensive typed interfaces for all 18 IAM operations; credential params correctly typed as IAMConnectionConfig.
apps/sim/tools/sts/types.ts Clean STS types including STSBaseResponse; targetAccessKeyId correctly typed in STSGetAccessKeyInfoParams.

Sequence Diagram

sequenceDiagram
    participant UI as Workflow UI
    participant Exec as Executor
    participant Route as API Route
    participant Utils as IAM/STS Utils
    participant AWS as AWS SDK

    UI->>Exec: Run IAM/STS block
    Exec->>Route: POST /api/tools/iam/{operation}
    Note over Route: checkInternalAuth
    Note over Route: Zod schema validation
    Route->>Utils: createIAMClient(credentials)
    Utils-->>Route: IAMClient
    Route->>Utils: operation(client, params)
    Utils->>AWS: SDK Command (e.g. CreateUserCommand)
    AWS-->>Utils: AWS response
    Utils-->>Route: Mapped result object
    Note over Route: client.destroy()
    Route-->>Exec: JSON response
    Exec-->>UI: Tool output (block outputs)
Loading

Reviews (2): Last reviewed commit: "lint" | Re-trigger Greptile

waleedlatif1 and others added 2 commits April 13, 2026 16:25
- Fix CrowdStrike tags to include "security" (unintended removal)
- Standardize STS tool versions to '1.0.0' (matching IAM convention)
- Add range validation to durationSeconds in Zod schemas

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@cursor review

Copy link
Copy Markdown

@cursor cursor bot left a comment

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.

Reviewed by Cursor Bugbot for commit 64acaa6. Configure here.

@waleedlatif1 waleedlatif1 merged commit e23557f into staging Apr 13, 2026
12 checks passed
@waleedlatif1 waleedlatif1 deleted the waleedlatif1/aws-credential-mgr branch April 13, 2026 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant