Repository navigation
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
This was referenced Oct 5, 2026
sk593
added this pull request to stack #13217
October 5, 2026 23:19
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## sk593-authz-modes-foundation #13213 +/- ##
================================================================
+ Coverage 60.46% 60.48% +0.02%
================================================================
Files 776 777 +1
Lines 45715 45747 +32
================================================================
+ Hits 27641 27670 +29
- Misses 18074 18077 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
sk593
force-pushed
the
sk593-authz-error-codes
branch
from
October 6, 2026 20:14
6694a8e to
0d81c5e
Compare
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: sk593 <shruthikumar@microsoft.com>
Add the internal component authorization error codes to the ARM error codes, a code-to-HTTP-status mapping in pkg/authz, and conversion from DeniedError to an ARM error response. Not wired into any request path. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: sk593 <shruthikumar@microsoft.com>
sk593
force-pushed
the
sk593-authz-error-codes
branch
from
October 6, 2026 22:29
0d81c5e to
7cd77e5
Compare
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: sk593 <shruthikumar@microsoft.com>
Require nonblank request action and target when converting denials and propagate conversion errors explicitly. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: sk593 <shruthikumar@microsoft.com>
Radius functional test overviewClick here to see the test run details
Test Status⌛ Building Radius and pushing container images for functional tests... |
This branch has not been 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.
Summary
Layer 2 of 5 in the Stack 0 foundation stack for #13086, stacked on #13212 (
sk593-authz-modes-foundation). Adds authorization error codes, HTTP status mappings, and ARM response conversion. Nothing is wired into a request path.Public denial messages include the requested action and target but omit internal diagnostic reasons.
ErrorResponse()returns(v1.ErrorResponse, error)andResponse()returns(rest.Response, error); both fail explicitly when action or target is blank.Reason for change
Implements the error-code foundation from design #13086. Reuses
InvalidAuthenticationInfoand maps codes to 401/403/409/503, with unknown codes returning 500. An empty denial code defaults toAuthorizationFailed.The handshake codes
PeerCertificateInvalidandCertificateExpiredlive inpkg/authz, not ARM error codes, because failed handshakes have no HTTP response. They are for logs/metrics only; accidental HTTP status lookup returns 500.How to test
Unit-test only; no manual verification needed. Tests were committed before implementation, including regression tests for private reasons and missing request context.
go test ./pkg/authz/... ./pkg/armrpc/api/v1/...— passed.golangci-lint run ./pkg/authz/... ./pkg/armrpc/api/v1/...— passed, 0 issues using repository-pinned v2.14.0 installed in session storage. The global binary was incompatible with the repository's Go version.Tests cover every code-to-status mapping, ARM response serialization, suppression of a private identity and unrelated resource ID contained in diagnostic reasons, and errors for missing or whitespace-only action/target values.
File change summary
pkg/armrpc/api/v1/errorcodes.gopkg/authz/decision.gopkg/authz/errors.gopkg/authz/errors_test.gopkg/authz/doc.go