feat(asm): add 403 Forbidden response to all endpoints#5
Open
dmchaledev wants to merge 1 commit into
Open
Conversation
401 and 403 are distinct: 401 means unauthenticated, 403 means authenticated but lacking permission. In a multi-tenant MSSP environment, a valid token scoped to one tenant will correctly receive 403 when accessing another tenant's assets, scans, or vulnerabilities — not 401. Documents this contract for integrators and enables SDK generators to produce correct error-handling code. https://claude.ai/code/session_01VojGqysVpUpTbNquLSsPF3
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.
$(cat <<'EOF'
Summary
Forbiddenresponse component tocomponents/responses403into every path inasm/openapi.yaml(assets, scans, vulnerabilities, tags)Why this matters
401 Unauthorizedand403 Forbiddenare semantically distinct:For a multi-tenant MSSP platform this distinction is load-bearing. A token scoped to Tenant A is valid — it should not get a
401when it tries to read Tenant B's assets. It gets a403. Without403in the spec, SDK generators produce client code with no branch for this case, integrators assume a 401/404 binary, and MSSP admins spend time debugging "why is my valid key failing?"Test plan
403example body (code: forbidden) is consistent with the existing401and404examples in stylehttps://claude.ai/code/session_01VojGqysVpUpTbNquLSsPF3
EOF
)
Generated by Claude Code