feat: admin API client and protocol selection (graphql/rest/grpc)#1
Merged
Conversation
Add AuthorizerAdminClient / AsyncAuthorizerAdminClient over the AuthorizerAdminService surface (users, access, webhooks, email templates, audit, FGA admin) plus a `protocol` kwarg (graphql default, rest, grpc) on the user and admin clients, sync and async. - gRPC uses a separate endpoint (default :9091, `grpc_endpoint=`); deps optional via the `grpc` extra. Auth/admin-secret flow as metadata. - REST decodes proto JSON (int64-as-string) via protobuf json_format. - Flat rc.9 response envelope (PR #635), identical across transports. - Vendor generated gRPC stubs under authorizer/_grpc (self-contained). - respx unit tests + a live integration suite sweeping all protocols (sync + async); CI runs a live job; examples/manual_test.py.
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.
What
AuthorizerAdminClient+AsyncAuthorizerAdminClient) covering the fullAuthorizerAdminServicesurface: admin auth/session/meta, users, access, webhooks, email templates, audit logs, and FGA admin. Auth viax-authorizer-admin-secret.graphql(default),rest,grpc.Why
Server 2.3.0-rc.9 (#635) serves all auth ops over gRPC/REST with a flat response envelope identical to GraphQL, enabling real protocol choice and a typed admin surface.
Notes
:9091,grpc_endpoint=); deps are optional viapip install 'authorizer-py[grpc]'. Bearer/admin-secret sent as metadata.json_format.authorizer/_grpc(self-contained; excluded from ruff/mypy).examples/manual_test.py.