fix(connect): tell users exactly which token permissions each provider needs - #19
Merged
Conversation
…r needs Every credential-paste prompt now names the console path, the verified minimum permission set, and the expected token format, checked against each vendor's official docs: - Datadog: fix console URLs for us3/us5/ap1 sites (no app. prefix there), say the app key needs a Datadog Admin and is best left unscoped - Honeycomb: add the missing Run Queries and Manage SLOs permissions, region-aware console link - Axiom: replace "all permissions" with the exact Advanced/Custom set, direct link to the API tokens page, xaat- format hint - Better Stack: fix the Telemetry link (old one 301s to a product page), point Uptime/Telemetry prompts at the team-based tokens page - Devin: org-scoped service user (enterprise-scoped keys are rejected), Member role or the three org permissions - Cursor: user key not service account key (rejected by connect), correct dashboard path, crsr_/key_ format - Factory: prefer a service account key, no scope options, fk- hint - MCP bearer: new note (was a bare prompt) warning against pasting the "Bearer " prefix and stating what the token must allow - Cloudflare: account-owned token, Super Administrator requirement, don't edit the pre-filled permissions, cfat_ hint - Fly.io: org token vs read-only trade-off, paste including "FlyV1 " - Render: keys are unscoped and account-wide, Developer role minimum, rnd_ hint, link that opens the create panel - Modal: no scope picker, Service User + Viewer on Team/Enterprise - Kubernetes: warn the kubeconfig's current context is uploaded, recommend a ServiceAccount bound to the "view" ClusterRole - PlanetScale: usage error now says where to create the service token and which accesses to grant
|
Warning Polylane could not verify the production impact of this pull request. Checked the two changed files against the resulting tree; Polylane could not find the cloud resources this repository manages, so this review looked at the entire cloud account. Connect this repository to its resources and the next review will focus on exactly what this code deploys to. Polylane analysed |
Conflicts in src/commands/cloud/connect.ts and src/commands/integration/connect.ts: main moved the connect flows into per-provider wizard functions with back navigation; this branch rewrote the credential guidance strings. Kept main's flow structure and ported this branch's instructions, links and the MCP bearer / Kubernetes notes into the new step definitions (Honeycomb's secretStep became lazy so the console link can follow the chosen region). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018rJSaPdnfppLe41Lf3fkoZ
boristane
approved these changes
Aug 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by boris · Slack thread
Before / After
Before: at the token-paste prompt the CLI showed a one-line hint ("create a new token ... with all permissions") and a console link. Several links were wrong (Datadog console URLs are broken for us3/us5/ap1 sites, Better Stack's Telemetry link 301s to a product page), permission lists were missing or incomplete (Honeycomb omitted two permissions the backend provably needs, so a key built from the prompt connects fine and then silently fails every query), and the MCP bearer prompt had no guidance at all.
After: every credential-paste prompt names the exact console path, the doc-verified minimum permission set (or an honest "no scopes exist, here is what the key can do"), and the expected token format, in 3-4 short lines above the hidden input. Datadog links resolve on all six sites in the picker.
How
All copy was verified against each vendor's current official docs (creation path, permission names quoted verbatim, token format) and cross-checked against what the backend clients in
coreplanelabs/nominalactually call. Changes are limited topromptSecretinstruction text/links insrc/commands/integration/connect.tsandsrc/commands/cloud/connect.ts, one smalldatadogConsoleUrl()helper for the site-host fix, anote()before the MCP bearer prompt, and a richer usage-error hint on the PlanetScale flags-only path. No prompt flow, ordering, or backend behavior changed.Per-provider summary
https://app.${site}/...is a broken host for us3/us5/ap1; no scope guidanceapp.prefix only for datadoghq.com / datadoghq.eu / ddog-gov.com; create the app key as a Datadog Admin (connect needsorg_management), leave it unscoped; opaque hex, no prefixRun Queries(main query path silently fails post-connect) andManage SLOs; link not region-awarexaat-prefix; direct API-tokens linksettings/api-tokens/0, same team as your monitors; states no scope options exist and the Uptime token can create monitors/webhookscog_, shown oncekey_prefix unverifiable; no warning that service account keys break connectcrsr_(olderkey_); GitHub App repo note keptfk-, shown oncecfat_, shown oncefly tokens create readonly, sync/metrics only); paste including the leadingFlyV1rnd_; link opens the create panelviewClusterRole with a long-lived token, and names whatviewomitsread_organization,read_database,read_branch)Left unchanged: GitHub, Slack, Sentry, AWS, Vercel, Supabase (browser flows, no credential paste). The Modal token-secret prompt copy was already correct.
Screenshots
What the connect prompt now shows, captured from the real CLI on this branch (post-merge with main's back-navigation flow).
Datadog

Honeycomb

Axiom

Better Stack

Devin

Cursor

Factory

MCP bearer token

Cloudflare

Fly.io

Render

Modal

Kubernetes

PlanetScale (usage-error hint on the flags-only path)

Backend findings (not addressed here, for follow-up in
nominal)org_management(Datadog Admin only).GET /api/v1/orgfailure is a fatal 400 inapi-integrations/.../connect.ts:107-109, butvalidateAppKey()already returns the org name, so the/api/v1/orgcall could likely be dropped, removing the most privileged permission from the requirement.getAppKeyScopes()is fatal too: a key lackinguser_app_keysyields a 500 instead of a graceful degrade (samePromise.all).GET /1/auth, which requires no permission, so a key missingRun Queriesconnects "successfully" and then silently fails every query. Validation should exercise a permission-gated endpoint.connect.ts:459requiresself.userId, which Cursor omits for service-account keys. Could fall back to the key fingerprint like the Factory branch does.cloudflare-token-url.ts:141) contains{ key: "pipelines", type: "send" };sendis not one of Cloudflare's five documented type values. Also worth adding a short redirect (e.g.polylane.com/cf-token) so the CLI can link the ~13KB pre-filled dash URL directly.clouds-fly.tssays "read-only token" but the backend performs image rollback writes;integrations-axiom.tssays "read access" but the client updates monitors and creates/deletes notifiers;clouds-modal.tssays tokens are unscoped, outdated since Modal shipped RBAC/Service Users;integrations-betterstack.tsmay carry the same stale telemetry link the CLI had.🤖 Generated with Claude Code
https://claude.ai/code/session_018rJSaPdnfppLe41Lf3fkoZ
Generated by Claude Code