Repository navigation
fix(security): second batch of backend security-hardening fixes - #36638
Conversation
… writes - User versions, history and PUT/PATCH/POST/DELETE responses never carry a stored password hash or bot token; another user's email is masked there as it is on reads. - A non-admin PUT keeps the stored admin flag, and a non-admin CSV row cannot change an existing user's admin flag. - Users CSV import and export authorize against users as a whole rather than against a user who shares the team's name. - Self sign-up through the users API applies the registration domains. - With an email-domain allowlist, a provider token must carry an email (in any principal claim) in an allowed domain. - Identity comparisons use sameIdentifier instead of equalsIgnoreCase.
…ines - The RDF graph, JSON-LD and diff no longer carry connections, pipeline source configs, server connections or authentication mechanisms; the ontology and contexts stop advertising them. - The RDF diff, which reads stored versions directly, is admin only, and a user's RDF needs access to the user's email. - Storage manifest configs are typed like dbt ones, so their store credentials are masked on read and encrypted at rest. - A caller who sees an ingestion pipeline's secrets masked must enter them again when the dbt or manifest source they belong to points elsewhere, on PUT and PATCH.
The column grid aggregates over the table and data model search documents, so with search access control on it now ANDs the caller's policy filter into every query it runs, as search does.
- Search lineage, its direction and entity-count variants, the CSV exports (sync and async) and data quality lineage drop the nodes the caller cannot view, the nodes reachable only through them, edges to them, pipelines on edges the caller cannot view, and upstream-lineage entries naming them. - Platform lineage, the whole catalog's lineage at once, is admin only.
…chy search The hierarchy rewrite turns the caller's query into one should clause among name matches, so a term matching by name came back without meeting the caller's search access policies, query_filter or deleted flag. They are now applied around each query it builds; the parents that only draw the tree, including those fetched for hits whose parent missed the page, still meet the policies and the deleted flag.
Provider tokens must carry an email while sign-in domains are restricted, only admins grant or revoke the admin flag, the RDF projection never carries stored secrets, search lineage returns only assets the caller can view, and the connection secrets guard now covers ingestion pipeline sources.
# Conflicts: # openmetadata-service/src/test/java/org/openmetadata/service/security/JwtFilterTest.java
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
|
✅ SSO Login Nightly — PASSED View workflow run · Commit
Totals: 94 passed · 0 failed · 0 flaky · 0 skipped · duration 17m 11s |
🚦 Removed from the merge queue —
|
🚦 Removed from the merge queue —
|
🚦 Removed from the merge queue —
|
#36798 put the Studio workspace inside a wrapper div, so the sub-bar's nav is no longer a direct child of the shell and `:scope > nav` finds nothing. The rdf Playwright lane runs only when RDF paths change, so #36798's merge-queue run skipped this spec; main's scheduled run and every merge group that turns the lane on now fail it. The sub-bar's test id does not depend on where the wrapper puts the nav.
🔄 Playwright impact map auto-refreshedThis PR touched specs or UI source that changed the source→spec routing map. I regenerated What is this file? It is the auto-generated half of Playwright's PR planner. It routes "if source X changes, run specs Y" by walking spec imports and cross-referencing What if I want to regenerate locally instead? Run this before pushing your next change to skip the bot commit: python3 .github/scripts/generate_playwright_impact_map.py
git add .github/playwright/impact-map.generated.json
git commit --amend --no-edit # or a separate commit |
🚦 Removed from the merge queue —
|
A silent re-authentication could lose its pending session to a refresh that was already in flight. The refresh carried no session cookie, the server answered it with an expiring OM_SESSION, and that response could reach the browser just after the login's, deleting the pending-session cookie the login had set. The callback then found no session and sent the user to sign in. A cookie is now cleared only when the request carried one, malformed values included.
Code Review 👍 Approved with suggestions 0 closed / 1 findings🔴 High risk · Changing admin-flag authorization, sign-in allowlists, secret masking, and lineage visibility could grant unauthorized access or expose credentials if enforcement is incorrect. Adds a second batch of backend security-hardening fixes covering user credential handling, email-domain allowlist enforcement at sign-in, stored secret handling, and search visibility, each with regression tests. Approved with one open suggestion: the dbt re-entry test in 💡 Quality: dbt re-entry test never checks which token ends up storedThe last two PATCHes in Check the unmasked stored token after each allowed patch🤖 Prompt for agentsVerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|
🚦 Removed from the merge queue —
|
🚦 Removed from the merge queue —
|



Summary
A second batch of backend security-hardening fixes from an internal review, one commit per area:
Each commit carries its own regression tests. The rules they set are recorded under
docs/decisions/; details are tracked internally.Upgrade note: deployments that set
allowedEmailDomainsneed the identity provider to put the user's email in a principal claim, or map it. Provider tokens without one are now refused at sign-in.Tracking: open-metadata/openmetadata-collate#7797, open-metadata/openmetadata-collate#7795
🤖 Generated with Claude Code
Summary by Gitar
This will update automatically on new commits.