Skip to content

chore(grpc): re-vendor stale protobuf message stubs#8

Open
lakhansamani wants to merge 1 commit into
mainfrom
chore/revendor-grpc-stubs
Open

chore(grpc): re-vendor stale protobuf message stubs#8
lakhansamani wants to merge 1 commit into
mainfrom
chore/revendor-grpc-stubs

Conversation

@lakhansamani

Copy link
Copy Markdown
Contributor

Summary

The vendored gRPC message descriptors under src/authorizer/_grpc/authorizer/v1 (*_pb2.py) were byte-frozen against a stale gen/python that had not been regenerated since the upstream main repo's PR #635. As a result they still declared is_multi_factor_auth_enabled as active field 15 on SignupRequest — the field removed for security upstream in 7138237e — and were missing every proto change since #635.

Runtime impact was low (the hand-written types.py dataclass already omits the field, so no caller could set it), but this is the same silent-drift pattern that has caused API-parity gaps in this SDK before. Fixing it now keeps the vendored wire contract honest.

Changes

  • Re-vendored _grpc/authorizer/v1/*_pb2.py from a fresh buf generate --template buf.gen.clients.yaml --include-imports (main repo PR chore(proto): regenerate stale client-SDK proto stubs + add CI staleness gate authorizer#726), with imports rewritten to the authorizer._grpc.* namespace to match the existing vendoring convention.
  • Only the 7 message-descriptor files changed; the service stubs (*_pb2_grpc.py) and the buf/, google/ trees were already current.
  • Descriptor-level check: SignupRequest no longer has is_multi_factor_auth_enabled (field numbers skip 14 -> 16); UpdateProfileRequest retains it, as intended.

Testing

  • ruff check src tests — clean
  • mypy src — clean (no issues in 12 source files)
  • pytest -q -m "not live" — 112 passed, 63 deselected
  • pytest tests/integration -m live (graphql+rest+grpc) against a locally built authorizer image from upstream main — 63 passed

Depends on / pairs with authorizerdev/authorizer#726 (which fixes the same staleness at the source and adds a CI gate). Not for self-merge — generated + security-relevant, wants a human read.

The _pb2.py message descriptors under _grpc/authorizer/v1 were vendored
from a stale gen/python that had frozen at the main repo's PR #635 and
missed the security removal of is_multi_factor_auth_enabled from the
public SignupRequest (upstream 7138237e), plus every proto change since.

Re-vendored from a fresh
  buf generate --template buf.gen.clients.yaml --include-imports
(authorizerdev/authorizer#726), with imports rewritten to the
authorizer._grpc.* namespace to match the existing vendoring.

- SignupRequest no longer declares is_multi_factor_auth_enabled (field
  15 now reserved; field numbers skip 14->16). UpdateProfileRequest
  keeps it, as intended.
- Only the message descriptors (_pb2.py) changed; the service stubs
  (_pb2_grpc.py) were already current.

Verified: ruff clean, mypy clean, 112 unit tests pass, 63 live
integration tests pass (graphql+rest+grpc) against a locally built
authorizer image from upstream main.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant