Repository navigation
CRASM-4315: Fix Cross-Organization Domain Access Authorization - #1664
Merged
Merged
Conversation
jsalinasnttdata
temporarily deployed
to
staging
October 20, 2026 13:59 — with
GitHub Actions
Inactive
jsalinasnttdata
temporarily deployed
to
staging
October 21, 2026 21:14 — with
GitHub Actions
Inactive
jsalinasnttdata
temporarily deployed
to
staging
October 22, 2026 20:18 — with
GitHub Actions
Inactive
jsalinasnttdata
temporarily deployed
to
staging
October 23, 2026 22:58 — with
GitHub Actions
Inactive
jsalinasnttdata
temporarily deployed
to
staging
October 26, 2026 13:21 — with
GitHub Actions
Inactive
jsalinasnttdata
marked this pull request as ready for review
October 26, 2026 13:22
jsalinasnttdata
requested review from
ameliav,
cduhn17,
hawkishpolicy,
jayjaybunce,
nickviola,
rapidray12 and
schmelz21
as code owners
October 26, 2026 13:22
jsalinasnttdata
temporarily deployed
to
staging
October 26, 2026 15:37 — with
GitHub Actions
Inactive
ameliav
approved these changes
Oct 26, 2026
ameliav
left a comment
Contributor
There was a problem hiding this comment.
Functionality is working as intended
hawkishpolicy
approved these changes
Oct 27, 2026
hawkishpolicy
left a comment
Contributor
There was a problem hiding this comment.
Tested locally and 403/404 scenarios are working as intended and provide appropriate message based on the situation.
Has test coverage.
LGTM.
This branch was previously deployed
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.
🗣 Description
Updated domain authorization so users can only retrieve domains belonging to organizations they are allowed to access. Standard users are limited to their organization memberships, regional administrators are limited to their region, and global administrators retain full access.
Existing unauthorized domains return HTTP 403, while nonexistent domains return HTTP 404. The frontend routes these responses to approved Access Denied and Not Found pages.
💭 Motivation and context
Closes CRASM-4315
The direct
GET /domain/{domain_id}endpoint previously returned domain, vulnerability, service, and organization data without validating the user’s access to the domain’s organization. This allowed cross-organization access when a user knew another domain’s UUID.Authorization is now applied to the database queryset before related data is loaded or returned. The access logic is centralized and reused by direct domain lookup and domain search.
🧪 Testing
Added regression tests covering:
Frontend tests cover the approved 403 and 404 pages.
The remaining frontend vulnerability-scan failure is caused by existing dependency vulnerabilities unrelated to this PR. No frontend dependency files were changed.
📷 Screenshots (if appropriate)
/403/404✅ Pre-approval checklist
bump_versionscript if this repository is versioned and the changes in this PR warrant a version bump.✅ Pre-merge checklist
✅ Post-merge checklist