Skip to content

feat(coder/agent-relay-cursor): remove the shared service-account credential path - #1169

Merged
matifali merged 1 commit into
mainfrom
agent-relay-cursor-remove-shared-credential
Oct 8, 2026
Merged

matifali merged 1 commit into
mainfrom
agent-relay-cursor-remove-shared-credential

Conversation

@coder

@coder coder Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Description

Closes RELAY-43. Companion: coder/agent-relay#94

Agent Relay no longer supports insecure_shared_token (coder/agent-relay#90). Every claim mints a per-claim session token (coder/agent-relay#84), so the api_key path added in #1141 is dead. This removes it:

  • Drops the agent_relay_cursor_credential_kind parameter and its AGENT_RELAY_CURSOR_CREDENTIAL_KIND coder_env. agent_relay_credential moves back to order = 1006.
  • The supervisor always starts the worker with --auth-token "$AGENT_RELAY_CURSOR_TOKEN" and never exports CURSOR_API_KEY, even if a stale AGENT_RELAY_CURSOR_CREDENTIAL_KIND=api_key is in the environment.
  • README: removes the shared service-account key section and the insecure_shared_token table.
  • Tests: the CURSOR_API_KEY container test is replaced by one that sets a stale AGENT_RELAY_CURSOR_CREDENTIAL_KIND=api_key and checks that the worker still gets --auth-token and no CURSOR_API_KEY. The tftest assertions for the parameter and both auth branches are back to the single --auth-token check.

Compatibility: coderd ignores build parameters that a template does not declare, so a relay that still stamps agent_relay_cursor_credential_kind=worker_token (before coder/agent-relay#94) works with this version. Module 0.2.0 to 0.4.0 default the parameter to worker_token, so they keep working with a relay that stops stamping it. Either repo can merge first.

Rebase note for #1145: edits are limited to the credential lines in main.tf, start.sh.tftpl, main.tftest.hcl, main.test.ts, the README "Worker credential" section, and the README version.

Type of Change

  • New module
  • New template
  • Bug fix
  • Feature/enhancement
  • Documentation
  • Other

Module Information

Path: registry/coder/modules/agent-relay-cursor
New version: v0.5.0
Breaking change: [ ] Yes [x] No (the removed api_key path is already rejected by Agent Relay; pre-1.0 minor bump)

Testing & Validation

  • Tests pass (terraform test: 12 passed; bun test registry/coder/modules/agent-relay-cursor: 19 pass)
  • Code formatted (bun x prettier --check, terraform fmt -check -recursive)
  • terraform validate, .github/scripts/version-bump.sh --ci minor origin/main pass

Related Issues

RELAY-43, coder/agent-relay#94, coder/agent-relay#90, #1141


Generated by Coder Agents on behalf of @matifali.

…dential path

Drop the agent_relay_cursor_credential_kind parameter, its
AGENT_RELAY_CURSOR_CREDENTIAL_KIND export, and the CURSOR_API_KEY branch
in the supervisor. Agent Relay no longer supports insecure_shared_token
and always mints a per-claim session token, so the worker credential is
passed only as --auth-token.

Refs RELAY-43
@linear-code

linear-code Bot commented Oct 7, 2026

Copy link
Copy Markdown

RELAY-43

@coder coder Bot assigned matifali Oct 7, 2026
@matifali
matifali requested review from Emyrk and matifali October 7, 2026 13:52
@matifali matifali added the version:minor Add to PRs requiring a minor version upgrade label Oct 8, 2026
@matifali
matifali merged commit 98c6040 into main Oct 8, 2026
5 of 6 checks passed
@matifali
matifali deleted the agent-relay-cursor-remove-shared-credential branch October 8, 2026 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

version:minor Add to PRs requiring a minor version upgrade

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants