Add grant and revoke to @fuzefront/auth authz client - #694
Merged
Conversation
Implement grant(), revoke(), and listGrants() methods on the AuthzClient interface, mirroring the server's grant/revoke endpoints at /api/v1/security/authz/grants. - grant(req, token): POST with 201 success, 400 MALFORMED, 502 PROVIDER_ERROR - revoke(req, token): DELETE with 204 success, 400 MALFORMED, 502 PROVIDER_ERROR - listGrants(query, token): GET with cursor-paginated result Error codes MALFORMED and PROVIDER_ERROR distinguish caller bugs (400) from upstream transients (502). A grant/revoke is a write; any failure throws and never silently succeeds. Tests cover successful grants with and without resource scope, both revoke forms (by grantId and by subject+tenant+role), error distinction, timeout handling, and listGrants pagination. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session
Contributor
Automated code review (gate-code-review)Credit balance is too low Report-only — this check never blocks merge. |
izzywdev
approved these changes
Aug 26, 2026
izzywdev
left a comment
Owner
There was a problem hiding this comment.
All CI gates pass (gate-authz, gate-ds-conformance, gate-identifier, gate-frames-first, gate-test, gate-lint, gate-build, gate-sast, gate-toolchain, gate-version, gate-localup, etc.). Approving per governance policy.
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
Implement
grant(),revoke(), andlistGrants()methods on theAuthzClientinterface, providing a thin, fail-closed HTTP binding to the Security API's grant/revoke endpoints./api/v1/security/authz/grants(201 success, 400 MALFORMED, 502 PROVIDER_ERROR)/api/v1/security/authz/grants(204 success, 400 MALFORMED)Error codes distinguish caller bugs (400 MALFORMED) from upstream transients (502 PROVIDER_ERROR). A grant/revoke is a write operation; any failure throws and never silently succeeds.
Test plan
Generated by Claude Code
Generated by Claude Code