---
title: "How we built enterprise search to be secure and private"
description: "Slack's enterprise search, which brings Google Drive and GitHub results into Slack search and AI Answers, uses a federated, real-time design instead of an index."
url: "https://swe.quest/articles/how-we-built-enterprise-search-to-be-secure-and-private-9bbeb6f1e852b588"
canonical: "https://slack.engineering/how-we-built-enterprise-search-to-be-secure-and-private/"
source: "Slack Engineering"
published: "2025-03-07"
difficulty: "easy"
kind: "Case study"
reading_minutes: 5
tags: ["search","identity-auth","rag","privacy","security"]
---

# How we built enterprise search to be secure and private

A post on [Slack Engineering](https://swe.quest/sources/slack.md), published 2025-03-07, 5 min read, Case study. Original: [https://slack.engineering/how-we-built-enterprise-search-to-be-secure-and-private/](https://slack.engineering/how-we-built-enterprise-search-to-be-secure-and-private/)

## Summary

Slack's enterprise search, which brings Google Drive and GitHub results into Slack search and AI Answers, uses a federated, real-time design instead of an index. Queries go to partner search APIs at request time using per-user OAuth tokens, so no external data is stored server-side and results and permissions can't go stale. The system reuses Slack AI's model: LLMs hosted in an escrow VPC on AWS, RAG with the user's ACL rather than training on customer data, and Search Answers discarded after display. Admins and users must each opt in per source, and only read-only OAuth scopes are requested.

Written by swe.quest, not by the author.

**Difficulty:** Easy: no special background needed; explains what something is and why it matters

## Topics

- [Search](https://swe.quest/tags/search.md) (Backend & APIs)
- [Identity & auth](https://swe.quest/tags/identity-auth.md) (Security)
- [RAG & retrieval](https://swe.quest/tags/rag.md) (AI & ML)
- [Privacy](https://swe.quest/tags/privacy.md) (Security)
- [Security](https://swe.quest/tags/security.md) (Security)

## Prerequisites

- OAuth basics ([easy posts on Identity & auth](https://swe.quest/tags/identity-auth.md?difficulty=easy))
- Retrieval-augmented generation

## Keywords

Slack AI, OAuth, Google Drive, GitHub, AWS, Slack

## Related posts

- [How We Built Slack AI To Be Secure and Private](https://swe.quest/articles/how-we-built-slack-ai-to-be-secure-and-private-8e548d6f05ad3aa4.md): Slack Engineering · 2024-04-18 · Easy · 7 min read · Privacy, LLMs, RAG & retrieval, Security, System design
  Slack AI was designed around four principles: customer data never leaves Slack's trust boundary, no LLM training on customer data, the AI only sees what the requesting user can see, and all existing compliance controls still apply.
- [Lessons on UX, security, and scale when building an enterprise-grade Slack agent](https://swe.quest/articles/lessons-on-ux-security-and-scale-when-building-an-enterprise-grade-slack-agent-718cb96cab6bcc78.md): Sourcegraph · 2026-05-04 · Medium · 5 min read · AI agents, Product engineering, Identity & auth, Resilience, Communications
  Sourcegraph's Deep Search Slack agent fits into enterprise workflows through staged status messages (emoji acknowledgement, escalation links for long searches), TL;DR answers with threaded follow-ups, and rich link unfurling via Slack's link\_shared events, SHA256-based entity IDs, chat.unfurl work objects and flexpane details.
- [Creating AI agent solutions for warehouse data access and security](https://swe.quest/articles/creating-ai-agent-solutions-for-warehouse-data-access-and-security-d7254720cb9e9b17.md): Meta Engineering · 2025-08-13 · Medium · 10 min read · Identity & auth, AI agents, Analytics & OLAP, Evaluation, Security
  Meta is reworking access control for its offline data warehouse around a multi-agent system.
- [Staying Evergreen: How we automated secure access and repo hygiene in a shared org](https://swe.quest/articles/staying-evergreen-how-we-automated-secure-access-and-repo-hygiene-in-a-shared-b76aa86640c047a2.md): GitHub Engineering · 2026-10-15 · Medium · 8 min read · Identity & auth, Developer tools, Security, System design
  Evergreen is a Go-based GitHub App that automates quarterly outside-collaborator access reviews and stale-repo archival in a shared org of 1,400+ GitHub employees, customers and partners, built entirely from native primitives: scheduled Actions firing repository\_dispatch, webhooks, issue checklists, custom properties, and per-repo JSON state files in git that double as the audit trail.
- [Agentic Platform: Open-Sourcing the Agentic Identity Broker](https://swe.quest/articles/agentic-platform-open-sourcing-the-agentic-identity-broker-c79247dc6e5d742f.md): Zalando Engineering · 2026-09-24 · Hard · 8 min read · Identity & auth, AI agents, Kubernetes, Open source, System design
  Zalando open-sourced the MIT-licensed Agentic Identity Broker, which lets AI agents act on behalf of users across third-party systems without ever receiving provider tokens.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
