Repository navigation
feat(connections): crew-owned oauth for the slack mcp server - #34811
Conversation
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing blocks: the blind reader got the primary "Turn on Kiro Crew sign-in" link right ("switches on some kind of sign-in") and said "not sure" about pressing it, not that they wouldn't. Every added state shows up in a screenshot. Notes
[UX-REVIEWED] 752ac58 Description read[DESCRIPTION-READ] 2a7051fc417f7994023ccf68bb2bb2f2176acbc155cbc8573428fc72a9c6fdc9 That sha256 names everything this verdict read: the PR description, plus the 16 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks: Slack is a new card beside the existing owner-server path, and Crew's sign-in for it stays behind the Notes
What this change shipsInventory (10 items) — 9 justifiedIntent: let a KAS (or other bridged-harness) user sign in to Slack's hosted MCP server, with Kiro Crew holding the token. ADDITION.
[FIRST-PRINCIPLES-REVIEWED] 752ac58 Description read[DESCRIPTION-READ] ce276afca19605ae61689043e972b0cb4624add27cadc1c5279de27f49879439 That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the Slack card is new, the vault-only client is a deliberate trade-off with a follow-up (#35949), and existing hand-added Notes
[DESIGN-REVIEWED] 752ac58 Description read[DESCRIPTION-READ] 1c2a805d27710549fad61e2eff5f69959c54e2ae3fb8c9045a55d44dfb3ab5ee That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Security Scope Review -- ✅ PASSWhich legitimate operations does Verdict basis: adjudicated, zero confirmed regressions. Security scope review -- adjudicated candidates
No candidate flipped from allowed to refused. Scope-Verdict: PASS Reason: The one change to the shell-path security code makes a rule looser, not stricter. It adds Slack's consent page to an allowlist that only the OAuth banner path reads, and no script-confirmed regression was handed back. The new refusals are all on the dashboard side (the Slack mint 409, the TIGHTENING: dashboard Connections sign-in admission ( ADJUDICATED: 16 candidates, 0 confirmed newly-refused PLATFORM COVERAGE: The diff makes no assumption about host paths, separators or interpreters in any shell-tier code. Its only platform-shaped values are URLs and the UNADJUDICATED:
[SCOPE-REVIEWED] 752ac58 |
Code change approver recommendation: A person should decideWhy: the decider thinks the change is probably fine but estimates a 25% chance that this change introduces a defect, above the 12% limit for approving on its own. I recommend approving this PR as it stands; I found nothing that blocks it. What it does. It adds Slack as a pre-registered Connections provider, served only by Crew's own sign-in behind the What I checked against the code:
An automated recommendation, not a review: a maintainer still decides. It approves on its own only when the estimated chance of a defect is at most 12% and the change has at most 400 changed lines. Decider v3c (217fe607) · commit |
9c0b06a to
c37be96
Compare
37a0b31 to
af0bd90
Compare
af0bd90 to
a0ccff1
Compare
|
span=13e3b12a73bb
|
|
span=2b3e4e4faa18
|
|
span=2b3e4e4faa18
|
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Thanks for the updates. This review checked 86d1788 and found one thing that blocks merge.
- Saving a Slack app takes Crew's sign-in away from an owner server at Slack's URL that has any name other than
slack(connections/crew_oauth.py:273).- Trigger: the
crew_oauthpreview is on and chats run on KAS. The owner addedwork-slackat https://mcp.slack.com/mcp through the custom-server form and signed in through Crew, so Crew holds its grant undercustom_key('work-slack', url). The owner then saves a Slack app on the Slack card. - Outcome:
card_yields(slack)turns False, so_is_registry_urlnow returns True for that URL._custom_slugreturns "" andsigns_in_customreturns False. The card does not claim the entry either, becauserouted_slugtakes the card path only for the nameslack. The KAS session gets the entry with no bridge, which is the same silent failure as #34747. On main, Slack is not in the registry, so this server stays bridged. A probe at this head gives acustom-...routed slug before the app is saved and an empty one after. - Coverage: the rename in test/test_crew_oauth_custom_servers.py (from
slackat mcp.slack.com toacme) removed the one test that pinned bridging at Slack's URL. Backwards compatibility names only a server calledslack. The entry also ends up covered by no path, which breaks the RFC's own rule that no entry is covered by neither. - Smallest fix: add cases to test/test_crew_oauth_slack.py that pin the behaviour you choose for a recorded owner server under another name at Slack's URL, both before and after the app is saved. Then either name the loss in a Reader: line under Backwards compatibility, or keep the owner path for a sealed owner record at that exact URL.
- Trigger: the
Also needed before merge: the UX Review BLOCK on this head (the "nothing to configure here" line on the Slack card) has no disposition, so PR Readiness is red. If that line cannot render in production because the real OAuth clients list includes Slack, say so in a disposition and show the evidence.
Follow-up on my earlier review (e4737e2):
- Two stills of the preview-on, no-app card: fixed. The body now shows the card with Set up Slack and the tip, and the OAuth app form open in place.
- Sensitive Change Review template: still stands. The posted template names 948cc7f. Please post it again for 86d1788.
- Allowlist decision (from my comment on 948cc7f): the PR author, who is a listed maintainer, has posted it.
For the security review: security/exfil_oauth.py:256 adds the exact pair ("slack.com", "/oauth/v2_user/authorize") to the consent endpoint allowlist, and a test rejects the neighbouring path. The decision was posted by the PR author. No separate security reviewer has acknowledged it on this PR yet.
Optional:
- The token swap, refresh and revoke still have not run against real Slack. On main, the runbook said a PKCE app should not send a client secret. This head sends it on every swap and refresh. Running manual checklist steps 1 to 10 against a real Slack app, and posting the result, would settle this.
- docs/guides/oauth-app-registration/slack.md:6 still says Connect appears once the Client ID is saved. The same file says the card also needs the Client Secret, the preview on and chats on Kiro Agent.
- connections/owner_servers.py:70:
card_yieldsnarrows the recorded "Cards first" ruling (2026-11-12). The ruling's owner has not confirmed that on this PR.
|
span=05304f431f75
|
|
span=8efb07d8c3f2
|
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Thanks for the updates. This review checked b6d2847 and found one thing that blocks merge.
- An owner server named
Slackat Slack's URL ends up on no sign-in path once a Slack app is saved. Its name differs from the slug only in case. (connections/owner_servers.py:117)- Trigger: the
crew_oauthpreview is on and chats run on KAS. The owner addedSlackat https://mcp.slack.com/mcp through the custom-server form and signed in through Crew, so Crew holds its grant undercustom_key('Slack', url). The owner then saves a Slack app on the Slack card. - Outcome:
is_signable_name('Slack')looks upget_provider(name.lower())and finds Slack. It returns False becausecard_yieldsis now False._card_claimsalso claims the entry, becauseget_provider(name.lower())is not None (connections/crew_oauth.py:302). The card does not take the entry either.routed_slugmatches only the exact name (name in SUPPORTED_SLUGS), andproviderOwningRowneedsserver.name === provider.slug. So the KAS session gets the entry with no bridge, which is the same silent failure as #34747, and the row loses its in-place Sign in. On main this server stays bridged. This is the case my last review'swork-slackitem did not cover: the fix at this head handles only names whose lowercase form is not a slug. The Reader: line says "Aslack(orSlack) server ... Once a Slack app is saved, the row belongs to the card". That is not true forSlack. - Smallest fix, pick one:
- (a) For a card that keeps the user's client, match the exact name in
_card_claims, and let a case variant from the owner's saved record throughis_signable_name. Then addSlackto the parametrization oftest_an_owner_server_under_another_name_at_slacks_url_stays_bridged. - (b) Keep the refusal, correct the Reader: line, name the loss under Backwards compatibility, and add a test that pins
routed_slug == ''after the save.
- (a) For a card that keeps the user's client, match the exact name in
- Trigger: the
Also needed before merge:
- The UX Review BLOCK on this head (the "Turn on Kiro Crew sign-in" label on a link) has a deferral disposition to #37235 but no recorded override, so PR Readiness is red. A maintainer records or rejects that override.
- Sensitive Change Review: please post the template again for b6d2847.
Follow-up on my earlier review (86d1788):
work-slackat Slack's URL lost Crew's bridge: fixed.test_an_owner_server_under_another_name_at_slacks_url_stays_bridgedpins it before and after the save. TheSlackcase above is what remains of the same class.- UX "nothing to configure here" line: rebutted with evidence. The OAuth clients route always lists Slack, so the line cannot render on a real card.
- Sensitive Change Review template: still stands. It names an earlier head.
For the security review: security/exfil_oauth.py adds the exact pair ("slack.com", "/oauth/v2_user/authorize") to the consent endpoint allowlist. The PR author posted the decision. No separate security reviewer has acknowledged it on this PR yet.
Optional:
- When the 12 hour access token has expired, Disconnect sends that expired token to auth.revoke. The card copy's promise that Disconnect revokes the token likely does not hold in that case (connections/crew_oauth.py:1068). Refresh once before revoking, or reword the copy.
- The three route call sites of
_annotate_unconfigured_connectionin dashboard/handlers/mcp_probe.py (lines 615, 794, 949) have no test. Removing all three turns no test red. One route-level test would pin them. - With chats on the Kiro CLI, take a user's own
slackrow that carries its own clientId. Once a Slack app is saved, it shows the Crew sign-in steps instead of the chat guidance (mcp_probe.py:1113), but the body says the Kiro CLI is unaffected. Skip the mark for that row, or name the change in a Reader: line.
|
Thanks for the updates. This review checked f91ca73 and found no defect that blocks merge. This changes behaviour users already rely on, so it needs a design sign-off from a maintainer before it can merge. A maintainer will post the decision here. What changes for existing users:
The PR author posted the decision comment of 2026-11-14 on the allowlist. That is not agreement from a second person. The design and the allowlist widening stay with a maintainer other than the author and with a security reviewer. Follow-up on my earlier review (b6d2847):
The red For the security review:
Optional:
|
|
Edited one sentence in |
|
Thanks for the updates. This review checked 77c176a and found no defect that blocks merge. This changes behaviour users already rely on, so it needs a design sign-off from a maintainer before it can merge. A maintainer will post the decision here. The PR also widens the OAuth consent allowlist and narrows the recorded "Cards first" owner ruling in the RFC. The PR author posted the allowlist decision. No second maintainer, no security reviewer and no owner of that ruling has agreed on this PR yet. Those decisions stay with them. Follow-up on my earlier review (b6d2847):
For the security review:
Optional:
|
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Thanks for the updates. This review checked d619857 and found one thing that blocks merge.
- Two new surfaces on this head have no rendered evidence (website/src/pages/overview/McpTab.tsx:959, website/src/pages/connections/ConnectionsPageCard.tsx:761).
- Trigger: the UX Review on this head says "cannot evaluate: missing" for two things. First, the visible "Open the {{provider}} connection card" link. It renders when
connectionsUi && managedProvider && !signInTargetholds, for example aslackrow at a URL other than the registry URL. On main this string was only an aria-label. Second, the Slack card while its mint is refused (crewMintRefusedissign_in_offornot_owned). TheremintRefusedHelptakes the place of Connect and Reconnect (lines 865, 1051, 1172). - Outcome: none of the 10 stills in the body shows either surface. Still 03 shows only the plain Connected card with Disconnect. The lane's verdict reads PASS only because it had no Trigger and Outcome lines. The evidence gap itself is still open, so these controls would merge without anyone having seen them rendered. Unit tests cover the behaviour, so this is about evidence only.
- Smallest fix: add captures of this head from the same capture harness the other stills use: (a) a
slackMCP row athttps://mcp.slack.com/mcp/showing the visible link; (b) the Slack card in the needs-attention state withsign_in_offand withnot_owned, showing the setup line where Reconnect would be. Then let the UX lane run again on that head.
- Trigger: the UX Review on this head says "cannot evaluate: missing" for two things. First, the visible "Open the {{provider}} connection card" link. It renders when
Also needed before merge:
- Sensitive Change Review: please post the template again for d619857. The check reports that no author comment names this head.
- The allowlist decision on #11895 was posted by the PR author. That decision stays with a maintainer other than the author and with a security reviewer.
Follow-up on my earlier review (b6d2847):
- A
Slackcase variant ended up on no sign-in path: fixed._owners_case_variant(connections/owner_servers.py:124) routes it, and test/test_crew_oauth_slack.py:495 and :525 coverwork-slackandSlack. - The UX Review BLOCK on the "Turn on Kiro Crew sign-in" label: resolved on this head. The lane now lists it as a note, not a block.
- The Sensitive Change Review template: still stands (see above).
For the security review:
- security/exfil_oauth.py:256 adds the exact pair ("slack.com", "/oauth/v2_user/authorize") to the consent endpoint allowlist. It matches host and path exactly, next to the existing pair ("slack.com", "/oauth/v2/authorize").
- Tests pin both sides: the exact path is admitted, and a neighbouring path is still rejected.
- The Slack Client Secret stays in the vault. Tests run the real rebuild, the warm spec write and the cold Connect write on a scratch data home, then scan every file for the made-up secret.
- The token swap, refresh and revoke have not run against real Slack. The manual checklist in the body is still open.
Optional:
- dashboard/handlers/connections.py:586: no test covers the healthy side of the new Slack mint refusal. If
and not crew_ownedis dropped, every Slack Connect answers 409 and no test turns red. One test that calls_mint_slackwith the preview on, KAS and an app saved, and asserts 200 withcrew:slackstarted, would pin it. - website/src/pages/overview/McpTab.tsx:1293 checks
signInTargetbeforeconnectionNeedsApp. An owner-addedslackrow with no clientId and no saved app shows a Sign in that cannot succeed, and the new "needs its OAuth app" line never shows. - connections/owner_servers.py:100: once a Slack app is saved, an owner-added
slackrow loses its row Sign in when the preview is off or chats run on the Kiro CLI. The Reader line says its Sign in goes to the card, which holds only with the preview on and a bridged backend. A body edit that names this reader would close it.
|
Thanks for the updates. This review checked 752ac58 and found no code defect that blocks merge. It still cannot approve, because this PR widens a security allowlist and that decision belongs to people other than the author. The decision: security/exfil_oauth.py:256 adds ("slack.com", "/oauth/v2_user/authorize") to the consent endpoint allowlist. Issue #11895 is parked for a maintainer decision on exactly this relaxation. So far the only approval recorded for it was posted by the PR author. A maintainer other than the author and a security reviewer need to record the decision here. Follow-up on my earlier review (d619857):
For the security review:
Optional:
|
|
Maintainer sign-off from @bolichen97 (not the PR author) on the two decisions this PR leaves to a human, on head 752ac58:
This covers the decisions only. The open items from the KiroCrewCaptain review on d619857 are still for the author: the rendered evidence for the two new surfaces, and re-posting the Sensitive Change Review template for the current head. AI-assisted, sent by Bolin Review bot on behalf of @bolichen97 |
Sensitive change review
|
Problem / Motivation
Goal: A user can sign in to Slack's hosted MCP server from Kiro Crew on KAS and every other bridged harness, with Kiro Crew holding the Slack token. The Slack app's Client ID and Client Secret are entered once under Settings → OAuth Apps; an existing Slack user adds the client secret there once.
Slack's MCP server (
https://mcp.slack.com/mcp) has no dynamic client registration, so the harness must present a pre-registered client. KAS drops a server'soauthblock, so a Slack entry with its ownoauth.clientIdnever signs in on KAS (#34747, #27711). Slack's user-token consent page was also missing from the banner allowlist, so even kiro-cli's sign-in failed closed with "URL contained credential or exfiltration pattern" (#11895).Why it matters
Slack is one of the most asked-for connections, and KAS is the default harness. On main, a KAS user can sign in to Slack only by adding the server by hand through the MCP Servers custom-server form with the
crew_oauthpreview on, where Kiro Crew's owner-server path signs it in. This PR adds the Slack card for users who set up a Slack app on the card itself; a hand-added Slack server keeps the owner-server path, as the RFC's "Cards first" rule and its Slack exception record.Not a goal
dashboard.feature_previews.crew_oauthon by default.What changed (motivation → approach → change)
Slack refuses DCR, so it joins the Connections registry as a pre-registered provider, and Crew's own sign-in (RFC Crew-owned OAuth, already shipped for GitHub, Asana and Google) serves it behind the same preview. The client comes from Settings → OAuth Apps, with its secret, and Crew reads it from the vault.
Slack's client is never written into a file. The eight other pre-registered providers have their client projected into the agent spec so that kiro-cli can sign in. Slack is exempt. So the Slack card connects only where Kiro Crew does the sign-in itself: the
crew_oauthpreview on and chats on a bridged harness. With the preview off (the default) the Slack card does not connect; it shows a link to the setting instead of Connect.mainhas no Slack card, so no user loses anything. A Kiro CLI session signs in to Slack with the client in its ownslackentry, as on main. The card serving Kiro CLI is a later change: #35949.connections/registry.json)confidential: true), redirecthttp://localhost:48106/callback(the port its runbook already reserves;localhostis the only plain-http host Slack accepts), read-only user scopesconnections/crew_oauth.py)client_secret_post) and the PKCE verifier;invalid_refresh_tokenasks for a reconnect; Disconnect callsauth.revokeand readsrevokedfrom the 200 bodypages/connections/registry.ts)slackrowconnectionUnconfigured(dashboard/handlers/mcp_probe.py) and the MCP Servers table leaves that row to its own chat guidance, where the client the user wrote signs in on Kiro CLI (and on any backend while thecrew_oauthpreview is off). The Connections card still owns the row (serverForConnection), so a grant held from before the record was removed still shows Connected with Disconnect; GitHub rows are unchangedsecurity/exfil_oauth.py)("slack.com", "/oauth/v2_user/authorize")connections/oauth_clients.py,default_spec_commit.py,connections/warm.py,dashboard/handlers/connections.py)oauth_clients.keeps_user_client("slack")is true: the operator's Slack Client ID and Client Secret are written into no file. Not intokirocrew.jsonor any other spec in the Kiro agents folder (the rebuild returns aslackentry untouched), not into akirocrew-mint-slack-*.json(the mint route answers 409crew_sign_in_requiredunless Crew's own sign-in serves Slack, so no kiro-cli Connect starts), not into the warm sign-in helper's specs under<data home>/run/connections-warm/(the helper leaves Slack out), and not into anymcp.jsonmcp_config_entries.py,mcp_config_purge.py)slackentry is therefore one the user wrote. The scope copy and the scrub that runs when the OAuth Apps record changes skip Slack (oauth_clients.projected_provider_for_server), so the entry is handled as on main, whereslackis not a provider: nothing is stripped, nothing is rewritten. The strip itself and its eight providers are back to main's codeconnections/status.py,ConnectionsPageCard.tsx)needsCrewSignInand the card shows Needs configuration with Turn on Kiro Crew sign-in, a link to that switch under Settings → Feature previews. Its tip gives the two steps: turn on Kiro Crew sign-in with the button, and in Settings (a link to/settings/agent) set chats to run on Kiro Agent. When the user's ownslackentry keeps its own sign-in (crewSignInNotOwned), the card shows a neutral Managed in MCP Servers badge and one line that links to MCP Servers. The text names no config key. The strings are in all 12 languagesmcp_probe.py,McpTab.tsx)connectionNeedsApp: the entry names no client of its own, or Crew signs in for it and no Slack app is saved. The row then says Slack needs its OAuth app and links to the Slack card under Settings → Connections (Set up Slack), instead of sending the user to chat. A row whose Slack app is saved while Crew's sign-in is not live carriesconnectionNeedsCrewSignInand shows the card's two steps and links instead of Sign in, whose mint would only answer 409. One new string, in all 12 languagesmainmoved the OAuth apps onto the Connections cards (Settings → Connections, Set up opens the app in place). This PR's card, row link, strings and docs follow that layout; the screenshots below predate it, except where a caption says otherwiseprerequisite_slackinwebsite/src/i18n/locales/*.json, 12 locales) and the Slack runbook say the Client Secret is required; the tip, like GitHub's, ends at the consent page, and the PKCE and MCP server setup stays in the runbookThe settings index (
settingsRegistry.gen.ts,settings-registry.generated.json) and the UI index (ui-index.generated.json) are regenerated for the new Slack OAuth Apps card, and.github/black-baseline.txtdropstest_connections_registry.py, which is now black-clean. Docs:docs/system-specs/modules/connections.md, the RFC amendment,docs/feature-map/README.md,src/kiro_crew/docs/connections.md,src/kiro_crew/docs/configuration.md, the Slack runbook and its index.Backwards compatibility
Breaking: Crew's own Slack sign-in needs the app's Client ID and Client Secret under Settings → OAuth Apps. A
slackMCP entry athttps://mcp.slack.com/mcpis now Slack's Connections card, and until that record is saved the card reads Needs configuration; each user who wants Crew's sign-in adds the record once. kiro-cli is unaffected: aslackentry, and any client the user wrote in it, stay as written in every file, so kiro-cli signs in from it as before. The card does not serve kiro-cli: with the preview off, or with chats on Kiro CLI, the card shows a link to the setting instead of Connect (#35949 tracks the card serving Kiro CLI).mainhas no Slack card, so this takes nothing away. Writer sweep on freshorigin/main: nothing in this repository writes a Slack client into an OAuth Apps record; outside it, only the user's own Slack app holds the secret, and this PR reads it from no other source.Reader: website/src/pages/overview/McpTab.tsx:signInTargetFor -- crew page -- once a Slack app is saved under Settings → OAuth Apps, an existing
slackMCP row athttps://mcp.slack.com/mcp(a trailing slash or letter case aside) matches the new registry entry, so its Sign in goes to the Slack Connections card instead of the chat guidance. While no Slack app is saved there, the gateway marks the rowconnectionUnconfigured(typed inwebsite/src/types/index.capabilities.ts; set bymcp_probe._annotate_unconfigured_connection) and the table does not send its sign-in to the card: a row the user wrote by hand inmcp.jsonwith its own client keeps the chat guidance it has on main (a marked row that no chat could sign in for names the missing OAuth app instead,connectionNeedsApp), and the client the user wrote on the entry signs in from chat on Kiro CLI, and on any backend while thecrew_oauthpreview is off. With the preview on and chats on KAS, a session'sslackentry goes to the Slack card whether or not a Slack app is saved (crew_oauth.routed_slug). Aslackserver the owner added through the custom-server form keeps its in-place Sign in button, as on main, while no Slack app is saved and Crew holds no grant underslack. Once a Slack app is saved, the row belongs to the card. With the preview on and chats on KAS, its Sign in goes to the card; with the preview off or chats on Kiro CLI, the row loses its in-place Sign in and shows the Kiro Crew sign-in steps instead (connections/owner_servers.py). An owner-added server at that URL under any other name, a letter-case variant such asSlackincluded, keeps its in-place Sign in and its bridge before and after the save, as on main. GitHub rows are unchanged. This followsconnections_ui(on by default), not thecrew_oauthpreview; withconnections_uifalse the row keeps the chat guidance. Pinned by ConnectionsSlackProvider.test.tsowns a slug-named row at a trailing-slash or letter-case variant of the registry URLandleaves the row alone while no OAuth app is saved, and owns it once one is, McpTab.slackUnconfigured.test.tsx (both states), and test_crew_oauth_slack.pytest_a_slack_row_is_left_to_its_own_sign_in_while_no_oauth_app_is_savedandtest_the_card_claims_the_slack_row_once_its_oauth_app_is_saved.Reader: src/kiro_crew/dashboard/handlers/mcp_probe.py:_annotate_unconfigured_connection -- crew page -- with chats on Kiro CLI and a Slack app saved, a
slackrow the user wrote by hand with its ownoauth.clientIdshows the Kiro Crew sign-in steps (connectionNeedsCrewSignIn) instead of the chat guidance it has on main. kiro-cli still signs in from that row's own client exactly as before; only the row's text changes.Card match: an earlier head of this PR made the card own a row only at the exact registry URL, to agree with
oauth_clients.provider_for_server, which binds the operator's client at the exact URL only. That broke every card for a row at a trailing-slash or letter-case variant (Connect added a second entry and got 409 "name already in use"), soconnectionProviderForServermatches as on main again; this is safe because the card's Connect writes the registry URL onto the row before it starts the sign-in, andprovider_for_serverandcrew_oauth.routed_slugstill take the exact URL only (test_no_client_is_bound_and_no_sign_in_is_routed_at_a_variant_url, and the twoa row at a variant of the registry URLcases in ConnectionsPage.coverage.connect.test.tsx).Owner-added servers (#35692): the sample server in
test/test_crew_oauth_custom_servers.pywas renamed fromslackathttps://mcp.slack.com/mcptoacmeathttps://mcp.acme.example/mcp, becauseslackis now a registry provider and that file needs a server that matches none; no assertion changed. While no Slack app is saved under Settings → OAuth Apps and Crew holds no grant underslack, an owner-addedslackserver athttps://mcp.slack.com/mcpkeeps its Sign in button, its routing and its stored sign-in, as on main. Once a Slack app is saved, or Crew holds a grant underslack, the card owns the entry, and a sign-in stored under the owner's key is not read again (that unused grant is tracked in #35816). The rule is one predicate,owner_servers.card_yields, and it is true only for a provider whose entries keep the user's own client, which today is Slack; an unreadable config or vault means the card owns the entry. Only a server in the sealed owner record at its exact URL takes the owner's path, and the card's client is still bound at the exact registry URL only. The spec keeps the client the owner wrote on that entry, with the preview on or off (test_an_owner_added_slack_server_keeps_its_client_its_sign_in_and_its_path). A server the owner added athttps://mcp.slack.com/mcpunder any other name (saywork-slack) keeps its sign-in and its bridge, as on main, before and after a Slack app is saved: the Slack card claims entries by name only, so taking the URL away would leave that server routed by neither path (crew_oauth._card_claims;test_an_owner_server_under_another_name_at_slacks_url_stays_bridged[no-app|app], andtest_an_unrecorded_entry_under_another_name_at_slacks_url_is_not_bridgedfor an entry with no owner record). RFC amendment for the owner: this narrows the "Cards first" ruling for Slack only, indocs/request-for-change/rfc-crew-owned-oauth.md(the "Cards first" paragraph, amended 2026-11-15). Pinned bytest_an_owner_added_slack_server_keeps_its_own_path_while_the_card_has_no_app,test_the_card_owns_an_owner_added_slack_server_once_it_has_an_app_or_a_grant,test_only_the_owners_recorded_slack_server_is_left_to_its_own_pathandtest_a_card_that_never_keeps_a_users_client_never_yields.Existing behaviour, not changed here: a card's Connect on a row hand-written in the global
mcp.jsonfails with 404, on main too (#35817).No key, path or config value is taken away. A
slackentry the user wrote keeps itsoauth.clientIdandoauth.clientSecretin every file, in all four cases (preview off or on, Slack app saved or not): the rebuild returns the entry untouched, and saving the Slack OAuth Apps record leaves it untouched.Known limit: Disconnect revokes the access token. Slack's user tokens expire after 12 hours, so a Disconnect after that usually reports "not revoked"; the user then removes the app in Slack. This PR leaves that as is.
Tests
test/test_crew_oauth_slack.py(new): consent URL shape and PKCE; a Slack client without its secret is refused and resolves once the secret is set; the sign-in refuses a resolved client with no secret on its own, apart from the resolver; the code swap and the refresh post the secret and the verifier; Slack's{"ok": false}stores nothing; refresh rotates the token; a dead refresh token keeps the pair; Disconnect revokes the access token and readsrevoked; tokens never reach logs or disk outside the vault; the KAS projection carries the bridge, not the client or token; a trailing-slash URL is not Slack's server; the operator's client is written into no file: after a card install with a Slack app saved, the realrebuild_agent_config(preview off and on), the warm helper's spec write and the cold Connect's spec write each leave every file under a scratch data home and Kiro agents folder free of the made-up Client Secret, and every spec andmcp.jsonfree of the Client ID; the same after a scope copy when<data home>/mcp.jsonwas broken by hand, and when itsslackentry was removed by hand; a hand-writtenslackentry keeps its own client through the rebuild in all eight cases (with and without a secret, preview off and on, Slack app saved or not) and the user's file is never edited; an owner-addedslackserver keeps its client, its Sign in and its path while the card has no app; a scope copy keeps the client on the renderedslackentry, while GitHub's copy still drops the three keys; Disconnect stores nothing on a 200 that saysok: false,revoked: falseor is not JSON; the banner gate admits the exact consent path only.test/test_connections_oauth_client_routes.py: saving the Slack OAuth Apps record through the real PUT route leaves the user's ownslackentries in both files byte-for-byte, with and without a secret; the mint route answers 409crew_sign_in_requiredfor Slack with an app saved and the preview off, and starts neither a warm adoption nor a cold mint.test/test_connections_status_client_config.py: with the preview off the Slack row carriesneedsCrewSignInand neitherneedsClientConfignorbackendLacksOauth, with an app saved or not; with the preview on and no app it carriesneedsClientConfig.website/src/test/ConnectionsSlackProvider.test.ts: the Slack card is a pre-registered provider that needs its secret, owns a slug-named row at a trailing-slash or letter-case variant of the registry URL, leaves a row the gateway marksconnectionUnconfiguredto the MCP Servers table's chat guidance, and keeps that row as the card's own.ConnectionsPage.coverage.connect.test.tsxadds the card case: a marked row with a held grant shows Connected with Disconnect.website/src/test/McpTab.slackUnconfigured.test.tsx(new): with no OAuth app saved, aslackrow with its own client renders the chat guidance, no Sign in button and no "Managed by Connections" badge; a row markedconnectionNeedsAppsays Slack needs its OAuth app and links to the Slack card under Settings → Connections, with no link to chat; with an app saved the row renders the badge and Sign in.website/src/test/ConnectionsPage.coverage.test.tsx: a Slack status row withneedsCrewSignInrenders no Connect and no Set up Slack, its Turn on Kiro Crew sign-in link opens the preview's switch, and the tip names both steps with a link to/settings/agent; a row withcrewSignInNotOwnedshows Managed in MCP Servers, not Needs configuration; a row markedconnectionNeedsCrewSignInshows the same links and no Sign in (McpTab.slackUnconfigured.test.tsx,test_crew_oauth_slack.py).test/test_crew_oauth_slack.py: the gateway marks only theslackrow at Slack's URL while no OAuth Apps record resolves (an unconfigured GitHub row is not marked), and clears a stale mark once the record is saved. Removing the Slack-only check, inverting the configured check, or removing the card's check each turns these tests red.crew_oauth._client) turnstest_the_sign_in_refuses_a_resolved_client_that_has_no_secretred; removing the resolver's (oauth_clients.resolve_oauth_client) turns fourtest_connections_oauth_clients.pytests red. For the no-projection rule, each of these turns its test red (one mutation at a time, the file restored after each): dropping the rebuild's Slack return (10 tests), letting the warm helper list Slack, dropping the mint route's refusal, making the scope copy strip a Slack client, treating Slack as projected in the copy and the scrub (3 tests), dropping the card'sneedsCrewSignIn, and dropping the row's routed-by-Crew check. Also: ignoring Slack'srevoked: false, and treating a non-JSON revoke answer as revoked.-n0, 10 at-n 4besidetest_crew_oauth_google_asana.py, and once in reversed order.tsc,eslint,mypy, black, flake8, isort, the comment-history, brand and file-line-cap gates,docs-lint.shandi18n:checkpass.Manual verification
Done on a pod at an earlier head, before #34353 moved the OAuth apps onto the Connections cards (
crew_oauthpreview on, aslackentry athttps://mcp.slack.com/mcpcarrying onlyclientId, no OAuth Apps record): the OAuth Apps record readsconfidential: true,client_id: null,configured: false; the Slack card reads Needs configuration with Configure OAuth app; the OAuth Apps card says the secret is required.Also done on a pod (preview off, chats on KAS, made-up GitHub and Slack apps saved): the warm sign-in helper ran (the audit log shows
connections_warm_mint_spawn, outcomeok, for eight providers), its spec listed those eight without Slack and held GitHub's made-up secret, and no file under the pod home held Slack's made-up Client Secret. Connect on the Slack card answered 409crew_sign_in_requiredand wrote nokirocrew-mint-slack-*.json.The switch that turns on Kiro Crew's own sign-in is
developer.mcp-sign-in-by-kiro-crewsince #36300, and the Slack card's Turn on Kiro Crew sign-in link highlights that id. The tip names the switch by its own label in each language.Not done: the consent, token swap, tool call and revoke against real Slack need a real Slack app. Human checklist:
http://localhost:48106/callbackand save.search:read.public,channels:history,users:read(or the runbook's full read list). Add no bot scopes.Screenshots / video
The Slack card and row, Component render, not the live page: the real
ConnectionsPageandMcpTabfrom this head, mounted by thewebsite/captureharness with stubbed status and server feeds. The OAuth client list is the payload the real/api/connections/oauth-clientsroute returns on a fresh data home, so the card shows its real OAuth app part.Preview off (the default), tip open: no Connect, and Turn on Kiro Crew sign-in, which opens
/settings/developer/feature-previews?highlight=developer.mcp-sign-in-by-kiro-crew. In the tip, Settings is a link to/settings/agent:The MCP Servers row with the Slack app saved but Crew's sign-in not live (
connectionNeedsCrewSignIn): the same two steps and both links, and no Sign in:Connected (a grant Crew holds): Connected and Disconnect:
Preview on, but the user's own
slackentry sends its own credential header or points at another URL (crewSignInNotOwned): no Connect, no OAuth app form, a neutral Managed in MCP Servers badge, and one line that says why, with a link to MCP Servers:An MCP Servers row marked
connectionNeedsCrewSignInkeeps its probe error (and, with tools, its tools list); the setup line sits where Sign in would be:Preview on, chats on KAS, no Slack app saved (Component render, not the live page): the card shows Set up Slack and the
prerequisite_slacktip:Set up Slack opens the OAuth app form in place on the card (Component render, not the live page):
The three stills below are from head d619857 (Component render, not the live page), same harness and mocked feeds.
A
slackMCP row athttps://mcp.slack.com/mcp/(trailing slash): the table shows no Sign in and a visible Open the Slack connection card link instead:The Slack card with a held grant while its mint is refused,
crewMintRefused: sign_in_off: no Connect or Reconnect; Turn on Kiro Crew sign-in stands where Reconnect would be:The same card with
crewMintRefused: not_owned: no Connect or Reconnect; the line saying the user's own Slack entry in MCP Servers signs in by itself stands where Reconnect would be:The three rows below are pod screenshots, every element real, all client values made up, from f1ccccb (the head before the rebase onto the fixed main; same Slack code).
A
slackentry with no client of its own and no Slack app saved: the MCP Servers row names the missing OAuth app and links to the Slack card, instead of sending the person to chat:A hand-written
slackentry with its own client, preview on, chats on KAS, no Slack app saved. Crew signs in for this entry and has no app, so the row says the same; the agent spec keeps the client the user wrote:A
slackserver the owner added from the dashboard, preview on, no Slack app saved: it keeps its own Sign in:Related Issues
Closes #11895
Part of #34747
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement