Skip to content

allow authentication on admin api keys via slack userid - #4748

Open
chpy04 wants to merge 6 commits into
feature/mcp-domain-toolsfrom
mcp-slackid-authentication
Open

chpy04 wants to merge 6 commits into
feature/mcp-domain-toolsfrom
mcp-slackid-authentication

Conversation

@chpy04

@chpy04 chpy04 commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Custom MCP Slack bot Authentication that can act as a single user:

  • Adds the x-slackbot-user-id header so the bot can make requests as the org member linked to that Slack id
  • Uses a new org-level bot key from this session, stored as apiTokenHash on Organization
  • Scopes MCP requests to the requested car from the carid in the header
  • Adds the finishline_get_user_slack_id tool, so the bot can <@mention> people instead of writing their names

@chpy04
chpy04 added this pull request to stack #4749 November 21, 2026 18:54
@coderabbitai

coderabbitai Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Central YAML; Path: .coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bc6b4f2b-1666-4d62-a0e1-45bf42ef2345

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chpy04
chpy04 marked this pull request as ready for review November 22, 2026 22:11
@wavehassman
wavehassman self-requested a review November 23, 2026 02:09

@wavehassman wavehassman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now any admin's token can impersonate anyone just by setting the header, and the bot ends up tied to whichever admin made its token. What if the bot got its own org-level token instead, and that's the only thing allowed to send the slack header? We'd still be trusting the bot to send the right slack ID, but at least it's one secret living in the bot instead of every admin's personal token. Logging who's being impersonated would be nice too for traceability

@chpy04

chpy04 commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

Right now any admin's token can impersonate anyone just by setting the header, and the bot ends up tied to whichever admin made its token. What if the bot got its own org-level token instead, and that's the only thing allowed to send the slack header? We'd still be trusting the bot to send the right slack ID, but at least it's one secret living in the bot instead of every admin's personal token. Logging who's being impersonated would be nice too for traceability

Yeah this is an approach I considered. I didn't because I was avoiding a schema change, but you right so I will do this

This branch has not been deployed

No deployments
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.

2 participants