Uh oh!
There was an error while loading. Please reload this page.
feat(public-api): add env var and permission group controls to disable public API access - #3317
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
|
2d4dc85 to
7a993f5CompareGreptile SummaryThis PR implements a comprehensive public API access control system with both global and per-user controls. The feature adds Key Changes:
Security Considerations:
Confidence Score: 5/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User Toggles Public API in UI] --> B[api-info-modal.tsx]
B --> C[useUpdatePublicApi Hook]
C --> D[PATCH /api/workflows/id/deploy]
D --> E{Enabling Public API?}
E -->|Yes| F[validatePublicApiAllowed]
E -->|No| K[Update Database]
F --> G{Check DISABLE_PUBLIC_API env}
G -->|Disabled| H[Return 403]
G -->|Enabled| I{Check Permission Group}
I -->|disablePublicApi: true| H
I -->|Allowed| K
K[Update workflow.isPublicApi] --> L[Return Success]
M[Public API Request] --> N[POST /api/workflows/id/execute]
N --> O{Has Auth Credentials?}
O -->|Yes| P[Standard Auth Flow]
O -->|No| Q{Check workflow.isPublicApi}
Q -->|false| R[Return 401]
Q -->|true| S{Check DISABLE_PUBLIC_API env}
S -->|Disabled| R
S -->|Enabled| T{Check Owner Permission Group}
T -->|disablePublicApi: true| R
T -->|Allowed| U[Execute as Workflow Owner]
U --> V[Sanitize State Overrides]
V --> W[Force Deployed State]
W --> X[Execute Workflow]
Last reviewed commit: 9a65397 |
Uh oh!
There was an error while loading. Please reload this page.
Additional Comments (1)
|
7a993f5 to
307de7fCompare307de7f to
6c3481cComparewaleedlatif1
commented
Feb 24, 2026
waleedlatif1
commented
Feb 24, 2026
@cursor review |
Uh oh!
There was an error while loading. Please reload this page.
6c3481c to
090aa07Comparewaleedlatif1
commented
Feb 24, 2026
waleedlatif1
commented
Feb 24, 2026
@cursor review |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
090aa07 to
e30af16Comparewaleedlatif1
commented
Feb 24, 2026
@cursor review |
Uh oh!
There was an error while loading. Please reload this page.
e30af16 to
3261bdfComparewaleedlatif1
commented
Feb 24, 2026
@cursor review |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
3261bdf to
fc87119Comparewaleedlatif1
commented
Feb 24, 2026
@cursor review |
a487c88 to
be3de48Comparewaleedlatif1
commented
Feb 24, 2026
waleedlatif1
commented
Feb 24, 2026
@cursor review |
Uh oh!
There was an error while loading. Please reload this page.
Additional Comments (1)
The Consider sanitizing |
be3de48 to
86b2c68CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…e public API access Add DISABLE_PUBLIC_API / NEXT_PUBLIC_DISABLE_PUBLIC_API environment variables and disablePublicApi permission group config option to allow self-hosted deployments and enterprise admins to globally disable the public API toggle. When disabled: the Access toggle is hidden in the Edit API Info modal, the execute route blocks unauthenticated public access (401), and the public-api PATCH route rejects enabling public API (403). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
86b2c68 to
9a65397Comparewaleedlatif1
commented
Feb 24, 2026
@cursor review |
waleedlatif1
commented
Feb 24, 2026
Uh oh!
There was an error while loading. Please reload this page.
…e public API access (simstudioai#3317) Add DISABLE_PUBLIC_API / NEXT_PUBLIC_DISABLE_PUBLIC_API environment variables and disablePublicApi permission group config option to allow self-hosted deployments and enterprise admins to globally disable the public API toggle. When disabled: the Access toggle is hidden in the Edit API Info modal, the execute route blocks unauthenticated public access (401), and the public-api PATCH route rejects enabling public API (403). Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Summary
DISABLE_PUBLIC_API/NEXT_PUBLIC_DISABLE_PUBLIC_APIenv vars to globally disable public API access for self-hosted deploymentsdisablePublicApipermission group config option for enterprise adminsPATCH /api/workflows/[id]/deployrouteType of Change
Testing
Tested manually
Checklist