How should access work for an internal Slack agent?
By Kevin DawkinsPublished 4 min read
In short: An internal Slack agent that answers from company data should never see more than the person asking. It has to act as that user, not as one all-seeing service account. Enforce that in permissions, not in the prompt, and log every answer.
The failure to avoid
The classic mistake is one bot token with organization-wide read access. Anyone can then ask it about salaries, performance reviews, incidents or deals. It shows up in several forms:
- A "public" search that isn't. A search tool described as public-only also returns private channels and direct messages, exposing the token owner's private history and everyone else in those conversations.
- Shared threads that leak between people. In a multi-person thread, one participant retrieves data that was fetched under another participant's permissions.
- One token for every agent. All internal agents run on a single shared token, so every tool gets the same access, and it gets harder to manage with each new background agent.
- Steady pressure to widen scope. "Why can't the bot read direct messages and private channels?" is a common request. The answer should be no by default.
Identity passthrough
Check the asker's own permissions at the moment they ask.
- Default to the bot's own narrow identity. It sees only the conversations it has been added to.
- Go further only as the user, and only with consent. One pattern that works: the bot asks the user to authorize it before searching beyond its own conversations, then searches with that user's access, limited to public channels.
- Know what passthrough implies. An agent acting as a user inherits everything that user can reach, sensitive incident data included. Passthrough stops privilege escalation. It does not stop a user from pulling their own sensitive data into a place it shouldn't be.
- Read-only is a property of the token, not of the prompt. Many connectors offer no true read-only scope, so both the user's connection and the fallback integration token can write.
Filter before retrieval, not after the answer
Limit what the agent can reach, not what it is told to say. Limits have to hold at the permission level. An instruction in the prompt is not a control.
- Restrict the source tree. For a benefits question bot, share only the benefits pages with the integration and keep other HR content outside that tree.
- Use data classification as a hard filter. The agent cannot see classified data at all.
- Never retrieve broadly and redact afterward. Once data is in the context, the model can paraphrase it.
Channel rules
An answer posted in a shared channel uses only what everyone in that channel can see.
- Scope the bot to the channels it has been invited to.
- Limit write actions to a named group.
- Request minimal scopes. A bot that only posts needs "post messages" and "list channels", with no user token, no history and no search.
- In channels shared with outside organizations, answer from public sources only, or decline. For customer channels, map each shared channel to exactly one customer account and answer only with read-only data for that account.
Audit record
For every answer, log:
- who asked, and in which channel or thread,
- the identity the agent acted as,
- which sources it retrieved, with document IDs and versions,
- the answer as posted.
Make agent actions first-class events in the audit log, alongside human actions. Prompt and response logs are sensitive data in their own right, so encrypt them, scope them per team, and log access to them too.
Wrong and stale answers
- Cite every source with a link. An answer that sounds current but has no citations cannot be checked.
- Show the age of each source, for example "last updated 14 months ago".
- Give every source an owner: a person or team who fixes it when the bot gets it wrong.
- Make feedback one click ("this is wrong") and route it to the source owner, not to the bot team.
Rollout
- Start with one low-risk corpus: runbooks, engineering docs or public policies.
- Put every new connector or scope change through IT or security review, with a ticketed approval, a named requester and a justification.
- Run a security review of the agent's own code before each new surface ships. Leaks between participants in a shared thread are the kind of problem this catches.
- Widen one corpus at a time, checking each against the passthrough, filtering and channel rules above.
- Never widen the bot token to save time. Widen what the user can authorize instead.
Takeaway: launch checklist
- The bot token is scoped to invited channels only, with no organization-wide read.
- Broader search uses the asking user's identity, with explicit consent.
- Source access is restricted at the connector or permission level, not in the prompt.
- Shared-channel answers use only what every member can see, and channels shared with outside organizations use public sources only.
- Write actions are limited to a named group.
- The audit log covers the asker, the acting identity, the sources and the answer.
- Every answer cites its sources and shows their age, and every source has an owner.
- The first corpus is low-risk, and each widening goes through IT or security review.
About Deftpace
Deftpace helps engineering and operations teams put agents to work without lowering the bar. Kevin Dawkins helps operations teams launch internal tools with access, auditing and monitoring designed in from the start. Email hello@deftpace.com.