Building Secure and Private Enterprise Search with LLMs
slack · Tech · 2025 · source Agentic: no · promotional bias: med · source-backed · extracted with prompt 0.5.5 (schema v2)
Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.
Problem
Domain: Secure enterprise search across internal and external knowledge systems
Slack needed to extend AI-powered search from Slack content to external sources such as Google Drive and GitHub without storing external data, bypassing permissions, or weakening Slack AI's existing enterprise security and privacy principles.
Constraints:
- External search results must remain permissioned to the querying user.
- Slack does not store data from external sources in its databases.
- External data and permissions must remain up to date with the source system.
- Admins and users must explicitly grant and be able to revoke external-source access.
- OAuth scopes must follow least privilege and request only what search needs.
- LLM context must stay inside Slack's trust boundary and not be used for training.
Architecture
Slack Enterprise Search extends Slack AI with a federated, real-time retrieval architecture. A user query can include Slack content plus explicitly enabled external systems such as Google Drive and GitHub. Admins opt in each source, users grant OAuth access, and Slack requests only read scopes needed for search. At query time, Slack calls partner public search APIs instead of indexing external data into Slack databases, so results and permissions remain fresh. Permissioned snippets flow into Slack AI's existing RAG path, using the same LLMs in the same AWS escrow VPC. Search Answer summaries are shown to the requesting user and immediately discarded rather than stored.
Diagram confidence: explicit (topology described by the source).
flowchart LR requesting-user[Requesting user] --> enterprise-search-interface[Enterprise search interface] requesting-user --> user-oauth-consent[User OAuth consent] admin-source-control[Admin source control] --> external-source-connector[External source connector] admin-source-control --> user-oauth-consent user-oauth-consent --> external-source-connector enterprise-search-interface --> external-source-connector external-source-connector --> partner-public-search-apis[Partner public search APIs] enterprise-search-interface --> rag-context-assembler[RAG context assembler] slack-content-retrieval[Slack content retrieval] --> rag-context-assembler external-source-connector --> rag-context-assembler rag-context-assembler --> escrow-vpc-llm[Escrow VPC LLM] escrow-vpc-llm --> search-answer-renderer[Search Answer renderer] search-answer-renderer --> requesting-user enterprise-search-interface --> slack-client-cache[Slack client cache]
Components
| Component | Role | Interacts with |
|---|---|---|
Requesting user |
Slack user submitting a search query or asking for AI Answers. | Enterprise search interface, User OAuth consent |
Admin source control |
Organization-level opt-in and revocation control for external sources. | External source connector, User OAuth consent |
User OAuth consent |
User-level grant that authorizes Slack to read external content the user can access. | Requesting user, External source connector |
Enterprise search interface |
Search and AI Answers product surface that combines Slack and external knowledge. | Requesting user, External source connector, RAG context assembler |
External source connector |
Slack app-platform integration that queries partner public search APIs with OAuth-authorized read scopes. | Admin source control, User OAuth consent, Partner public search APIs, Enterprise search interface |
Partner public search APIs |
External systems such as Google Drive and GitHub that return up-to-date permissioned results. | External source connector |
Slack content retrieval |
Slack-native content retrieval governed by Slack AI ACL rules. | RAG context assembler |
RAG context assembler |
Supplies the LLM only runtime content needed for the search answer. | Enterprise search interface, Slack content retrieval, External source connector, Escrow VPC LLM |
Escrow VPC LLM |
Closed-source LLM hosted in Slack's AWS escrow VPC under Slack AI trust-boundary guarantees. | RAG context assembler, Search Answer renderer |
Search Answer renderer |
Displays generated answers to the requesting user and discards summaries immediately. | Escrow VPC LLM, Requesting user |
Slack client cache |
Client-side cache used between reloads for product features such as filtering and previews. | Enterprise search interface |
Data flow
Admins first enable a source for the organization, then individual users grant OAuth access. When a user searches, Enterprise Search uses partner public search APIs at query time rather than a stored external index. OAuth scopes ensure Slack can only read data the user could access in the external system, while Slack AI ACL rules govern internal Slack content. The permissioned results are assembled into a runtime RAG context and sent to the LLM hosted in Slack's AWS escrow VPC. The generated Search Answer is displayed to the requesting user and immediately discarded.
5 supporting quotes
Why this architecture
Slack chose federated real-time retrieval because indexing external systems would create stale copies, synchronized permission problems, and extra data-retention risk. OAuth delegation lets external systems enforce what the user can read, while org-level and user-level consent make the integration explicit. Reusing the existing Slack AI RAG and escrow-VPC LLM infrastructure keeps model serving inside Slack's trust boundary and avoids customer-data training.
4 supporting quotes
Models used: Closed-source LLMs hosted in Slack's AWS escrow VPC
Scale
- Enterprise Search initially integrates Google Drive and GitHub.“We’re starting with Google Drive and GitHub”article, stated
- Slack plans to add more connected apps over the year.“you’ll see many more of your connected apps as the year goes on.”article, stated
- Slack lists four external-search security principles.“We built enterprise search to uphold the same Enterprise-grade security and privacy standards as Slack AI:”article, stated
- External-source access can be revoked at any time by admins or users.“Users and admins must explicitly grant Slack access to external sources and may revoke that access at any time.”article, stated
- Search Answer summaries are not stored in Slack's database.“we don’t store Search Answers in the database (whether or not they contain external content).”article, stated
Alternatives considered (roads not taken)
Index external source data into Slack databases
Rejected because: Slack wanted no stored external copies, fresh external data, and source-system permission freshness.
Use index-based freshness for external content
Rejected because: A stored index can become stale; real-time fetching makes staleness impossible on Slack's side.
Let admin enablement alone grant external data access
Rejected because: Slack adds individual user OAuth consent so external data remains user-controlled.
Request broad OAuth permissions
Rejected because: Enterprise Search only needs read scopes for search, and transparency helps admins and users trust the integration.
Persist generated Search Answer summaries
Rejected because: Slack minimizes data retention by displaying search summaries and immediately discarding them.
Patterns
privacy-preserving-processing (security)
Slack keeps external data out of its databases, uses RAG without model training, and runs LLMs in the existing escrow VPC trust-boundary architecture.
rag-retrieval (retrieval)
Enterprise Search supplies only permissioned runtime content to the LLM rather than training on Slack or external customer data.
tool-use-orchestration (integration)
Slack orchestrates partner public search APIs through its app platform and OAuth, fetching external content at query time.
safety-policy-enforcement (security)
The system enforces both Slack ACLs and external OAuth-delegated permissions so the LLM only sees data the user can access.
guardrails-io-filtering (compliance)
Admin/user opt-in, revocation, read-only scopes, and non-persistence constrain what external data enters or leaves the AI workflow.
Tradeoffs
Federated real-time search
Chose Query partner public APIs at search time over Store external data in Slack databases.
Rationale: Real-time federation keeps data and permissions fresh and avoids external-data retention inside Slack.
Two-level consent
Chose Admin source enablement plus user OAuth grants over Single organization-wide enablement.
Rationale: Layered consent gives organizations and individuals control over which external data Slack can search.
Use RAG over training
Chose Runtime permissioned context over Training LLMs on user data.
Rationale: RAG lets Slack answer with external and Slack context while avoiding user-data retention in model weights.
Least-privilege OAuth
Chose Read scopes only over Broader permissions for richer future integrations.
Rationale: Search can be satisfied with read-only access, and narrower scopes build trust with security-conscious admins and users.
Discard Search Answer summaries
Chose Show answer then immediately discard it over Store generated summaries for history or analytics.
Rationale: Non-persistence simplifies privacy and compliance for generated content that may contain external-source data.
Gotchas (what bit them)
Central indexing of external sources creates stale data and duplicated governance risk.
Root cause: External content and permissions can change outside Slack after a copy is indexed.
Resolution: Use real-time federated partner API calls instead of storing external source data.
External-search LLM context can leak data if permissions are not scoped before retrieval.
Root cause: The LLM sees whatever retrieval provides, so retrieval must be permission-aware.
Resolution: Use OAuth to ensure Slack only receives external data the user could access in the source system.
External-source access can surprise users if consent is implicit.
Root cause: Org-level integration alone does not prove individual users know which data sources are included.
Resolution: Require both admin opt-in and individual user grant, with revocation at any time.
Broad OAuth scopes would erode least-privilege guarantees.
Root cause: Search does not need write or broad administrative access, even if broader access could support richer features.
Resolution: Request only read scopes necessary for search and show scopes to admins and users.
Client-side caching is a pragmatic exception to a pure no-storage story.
Root cause: Filtering and previews need performance, so the Slack client may cache between reloads.
Resolution: Keep the cache client-side and bounded to product features rather than storing external data in Slack databases.
Evaluation
The source does not describe a formal evaluation harness for enterprise search quality. It defines operational correctness through permission freshness, OAuth authorization, least-privilege scopes, no external-data storage, and reuse of Slack AI's secure RAG/escrow-VPC architecture.
Metrics: External data not stored in Slack databases · External permissions up to date with source system · Admin and user revocation available at any time · OAuth scopes limited to read scopes · Search Answer summaries discarded immediately
4 supporting quotes
Outcomes
- Slack Enterprise Search can surface permissioned content from external sources directly inside Slack search.
- The first supported external sources are Google Drive and GitHub.
- The system avoids storing external source data in Slack databases.
- Search Answer summaries are displayed to the requester and immediately discarded.
- External-source access is controlled through admin opt-in, user OAuth grants, and revocation.
The source is architectural and does not report user adoption, latency, reliability, or quality metrics; it does identify Google Drive and GitHub as initial sources and more connected apps as planned.