Repository navigation
fix(cli): map REST Forbidden and Unauthorized errors to access denied - #383
Draft
digitalresistor wants to merge 1 commit into
Draft
digitalresistor wants to merge 1 commit into
digitalresistor wants to merge 1 commit into
Conversation
The facade translated only the gRPC PermissionDenied and Unauthenticated
classes, so a 403 or 401 raised through a REST transport surfaced as a
generic cloud error instead of an access denial.
* Preflight now reports such denials as access denied with the usual
remedy, and the Cloud Storage and REST calls that deploy adds get the
same treatment.
12 of 19 tasks
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
The preflight facade in the
cli/src/stellar_engine/gcp/live.pymodule translated only the gRPCPermissionDeniedandUnauthenticatedclasses into its access denied error. Theapi_corelibrary maps an HTTP 403 toForbiddenand an HTTP 401 toUnauthorized, which are the parents of those classes, so a denial raised through a REST transport surfaced as a generic cloud error without the access denied remedy.ForbiddenandUnauthorizedparent classes, which still cover the gRPC subclasses.Part of #306. No separate issue exists for this defect.
Type of Change
Deployment & Compliance Impact
Checklist
Code Quality & Reusability
modules/orfast/stages-aw/can be leveraged for this change.docs/naming-convention.md.Documentation
README.mdof the modified module or blueprint. No README describes the error classes, so no documentation changes.Security
Testing
Testing Performed
uv run pytestincli/passes with 881 tests, including the new cases that feedForbidden,Unauthorizedandfrom_http_status(401)andfrom_http_status(403)errors through the translation.uv run ruff format --check,uv run ruff checkanduv run pyrightpass incli/.python3 tools/check_boilerplate.py clipasses from the repository root.google-api-corethatfrom_http_status(403)returnsForbiddenand thatPermissionDeniedsubclasses it.