Add Entra OIDC auth, chat/search UX overhaul, and supporting fixes#45
Merged
Conversation
Auth: - Wire Microsoft/Entra OIDC directly into the OSS app (no ee/ dependency): OIDC router in main.py, AuthType.OIDC allowlisted, public auth routes registered, OPENID_CONFIG_URL + DEFAULT_ADMIN_EMAILS env vars. - Auto-verify OIDC users in oauth_callback; env-driven admin allowlist. - Pin bcrypt==4.0.1 (passlib 1.7.4 incompatible with bcrypt 4.1+). Chat/search UX: - Persona document_sets act as an outer fence (intersect with user filters). - Search-mode framing on the default persona; assistant scope chip; starter prompts; sidebar timestamps; Cmd+K new chat; distinct assistant message styling; 3-step onboarding cards; larger chat input. - Searchable/scrollable knowledge-set picker; removed tag filters. - Hide /search from nav (still reachable by URL); remove redundant top-left assistant selector; highlight applied filters. - next.config.js: drop 308 stream redirects that stripped the session cookie. Docs: AGENTS.md + CONTRIBUTING.md updated for OIDC setup and the new footguns. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- DocumentDisplay: fall back to blurb when match_highlights is a non-empty array of only falsy/whitespace strings. Previously sections stayed empty and sections[0][2] threw "Cannot read properties of undefined (reading '2')", crashing the chat doc sidebar (and search page) when retrieved docs had empty highlights — more likely with large/many-doc contexts. - Slack blocks: strip the language token off opening code fences (```bash -> ```) in build_qa_response_blocks. Slack mrkdwn has no fenced-code info string, so the language rendered as a literal first line of the block. (Slack still cannot syntax-highlight; that's a platform limit.) - SelectedFilterDisplay/ChatInputBar: remove the locked persona "Scope" chips from the chat input bar. Cosmetic only — the assistant still scopes search to its document sets server-side in search/preprocessing. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- env-configmap: AUTH_TYPE=oidc, OPENID_CONFIG_URL (Entra discovery), DEFAULT_ADMIN_EMAILS, and set WEB_DOMAIN/DOMAIN to the external https origin (required for a correct OIDC redirect_uri and Secure session cookie). - api_server deployment: inject OAUTH_CLIENT_ID/OAUTH_CLIENT_SECRET/ USER_AUTH_SECRET from the danswer-secrets secret via secretKeyRef. - secrets.yaml: replace stub values with documented placeholders and a "do not commit real secrets" header; real values applied out-of-band. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Switching the assistant silently created and navigated to a new chat session with no feedback. Show an auto-expiring toast explaining each chat is bound to a single assistant (and to re-upload any attached files). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Settings.default_page now defaults to CHAT instead of SEARCH. Only affects deployments with no stored settings yet; existing deployments keep their persisted value (change via Admin -> Settings). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
get_persona_by_id grants non-admins access to ownerless personas (user_id IS NULL), which includes the shared default assistants. Guard mark_persona_as_deleted so a basic user gets 403 for default/ownerless personas, mirroring the frontend's !default_persona rule. Closes a gap where a basic user could soft-delete a default assistant for everyone via a direct API call. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Track .mcp.json (shared Playwright MCP server) so the browser-driven debugging setup is reproducible. Gitignore .playwright-mcp/ and the ad-hoc screenshot, which are local session output, not source. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Out of scope for the OIDC / UX work; revisit separately. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
swati354
approved these changes
May 28, 2026
Sarath1018
approved these changes
May 28, 2026
rajivml
added a commit
that referenced
this pull request
May 29, 2026
rajiv/add-claude was merged to feature/darwin upstream, so the doc's "on top of rajiv/add-claude (PR #45)" reference is stale. The branch is now rebased onto origin/feature/darwin directly — same diff, just a fresher base. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
rajivml
added a commit
that referenced
this pull request
May 29, 2026
rajiv/add-claude was merged to feature/darwin upstream, so the doc's "on top of rajiv/add-claude (PR #45)" reference is stale. The branch is now rebased onto origin/feature/darwin directly — same diff, just a fresher base. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings the
rajiv/add-claudebranch up tofeature/darwin: Microsoft/Entra OIDC auth wired into the OSS code path (noee/dependency), a chat & search UX overhaul, a chat-page crash fix, a persona-deletion permission gap close, per-channel Slack-bot model config, and Playwright MCP tooling. 9 commits, 50 files, +909 / −582.Auth — Microsoft/Entra OIDC
Wired directly into the OSS app (no
ee/dependency):backend/danswer/main.py;AuthType.OIDCallowlisted inverify_auth_setting; public auth routes registered.OPENID_CONFIG_URL,DEFAULT_ADMIN_EMAILS.oauth_callback; env-driven admin allowlist promotes addresses inDEFAULT_ADMIN_EMAILS.backend/requirements/default.txt: pinbcrypt==4.0.1(passlib 1.7.4 is incompatible with bcrypt 4.1+; do not bump without also fixing passlib).Kubernetes (
darwin-kubernetes/)env-configmap.yaml:AUTH_TYPE=oidc,OPENID_CONFIG_URL(Entra discovery),DEFAULT_ADMIN_EMAILS;WEB_DOMAIN/DOMAINset to the externalhttps://origin (required for a correct OIDCredirect_uriand aSecuresession cookie).api_server-service-deployment.yaml: injectOAUTH_CLIENT_ID,OAUTH_CLIENT_SECRET,USER_AUTH_SECRETfrom thedanswer-secretssecret viasecretKeyRef.secrets.yaml: stub values replaced with documented placeholders + a "do not commit real secrets" header — real values are applied out-of-band.Chat & search UX
document_setsintersect with user-applied filters server-side insearch/preprocessing/preprocessing.py(the input-bar "Scope" chips are gone but the scoping itself is unchanged).FiltersTab.tsxandChatFilters.tsxwere significantly rewritten (−188 / −176 lines) around the new picker. Tag filters were removed./searchhidden from nav (still reachable by URL); removed the redundant top-left assistant selector; highlight applied filters.web/next.config.js: dropped the 308 stream redirects that were stripping the session cookie.Settings.default_page = CHAT). Existing deployments keep their persisted value — change via Admin → Settings.Bug fixes
web/src/components/search/DocumentDisplay.tsx): fall back toblurbwhenmatch_highlightsis a non-empty array of only falsy/whitespace strings. Previouslysections[0][2]threwCannot read properties of undefined (reading '2'), crashing the chat doc sidebar and the search page when retrieved docs had empty highlights — more likely with large or many-doc contexts.build_qa_response_blocks. Slack mrkdwn has no info string, so the language was rendering as a literal first line of the block. (Slack still cannot syntax-highlight; that's a platform limit.)SelectedFilterDisplay,ChatInputBar) — cosmetic only; server-side scoping unchanged.Security / permissions
mark_persona_as_deleted(backend/danswer/db/persona.py) now returns 403 for non-admins ondefault_personaor ownerless (user_id IS NULL) personas, mirroring the frontend's!default_personarule. Closes a gap where a basic user could soft-delete a shared default assistant for everyone via a direct API call (get_persona_by_idgrants non-admins access to ownerless personas).Slack bot
SlackBotConfigCreationForm.tsx,server/manage/slack_bot.py,server/manage/models.py).Tooling
.mcp.json(shared Playwright MCP server) so the browser-driven debugging setup is reproducible across the team..gitignore— ignore.playwright-mcp/session output and the ad-hocmodel-picker-open.pngscreenshot (they are local artifacts, not source).Configuration required for reviewers / operators
Before this can be deployed, the following must be set:
Footguns
Commits
🤖 Generated with Claude Code