Skip to content

feat: support v1 reflection for grpc server reflection#5653

Merged
bijin-bruno merged 6 commits intousebruno:mainfrom
sanish-bruno:feat/support-grpc-v1-reflection
Nov 13, 2025
Merged

feat: support v1 reflection for grpc server reflection#5653
bijin-bruno merged 6 commits intousebruno:mainfrom
sanish-bruno:feat/support-grpc-v1-reflection

Conversation

@sanish-bruno
Copy link
Collaborator

@sanish-bruno sanish-bruno commented Sep 26, 2025

Description

Jira ticket
fixes: #5650

  • replaced grpc-reflection-js which only has v1alpha reflection with grpc-js-reflection-client which has support for v1 and v1alpha reflection

Contribution Checklist:

  • The pull request only addresses one issue or adds one feature.
  • The pull request does not introduce any breaking changes
  • I have added screenshots or gifs to help explain the change if applicable.
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request.

Note: Keeping the PR small and focused helps make it easier to review and merge. If you have multiple changes you want to make, please consider submitting them as separate pull requests.

Publishing to New Package Managers

Please see here for more information.

@sid-bruno
Copy link
Collaborator

sid-bruno commented Sep 30, 2025

LGTM

For future as we can get more bandwidth, we can look into just using the source proto files from grpc and creating our own reflection client instead of having to wait for one of the above to add in support for something like v2

Reference Links:
Reflection Protobuf: https://github.com/grpc/grpc/tree/master/src/proto/grpc/reflection
Inference to TS: https://github.com/stephenh/ts-proto
Reference Implementation: https://github.com/deeplay-io/nice-grpc/blob/master/packages/nice-grpc-web/src/service-definitions/index.ts

@reggermont
Copy link
Contributor

Hi, as gRPC is still a beta feature, I think this PR can be merged to start getting feedbacks from user

@sanish-bruno sanish-bruno marked this pull request as draft October 3, 2025 21:06
@reggermont
Copy link
Contributor

reggermont commented Oct 14, 2025

Tried the PR but I have a 16 UNAUTHENTICATED: Missing Authorization header error in the logs, despites giving the auth token.

[1] gRPC reflection v1 failed: ReflectionRequestException [Error]: Error: 16 UNAUTHENTICATED: Missing Authorization header

Moreover, Bruno displays the error as an 2 UNKNOWN error:
image

@sanish-bruno sanish-bruno marked this pull request as ready for review October 30, 2025 06:49
@sanish-bruno sanish-bruno force-pushed the feat/support-grpc-v1-reflection branch 2 times, most recently from bd57ecb to 44a30af Compare October 30, 2025 07:00
@sanish-bruno
Copy link
Collaborator Author

Tried the PR but I have a 16 UNAUTHENTICATED: Missing Authorization header error in the logs, despites giving the auth token.

[1] gRPC reflection v1 failed: ReflectionRequestException [Error]: Error: 16 UNAUTHENTICATED: Missing Authorization header

Moreover, Bruno displays the error as an 2 UNKNOWN error: image

Thanks for reporting this, This helped a lot in-terms preventing a possible regression ❤️

@pull-request-size pull-request-size bot added size/L and removed size/M labels Oct 30, 2025
@sanish-bruno
Copy link
Collaborator Author

@reggermont will you able to test whether the authentication error is fixed or after the latest update?

@reggermont
Copy link
Contributor

Hi, thanks for the feedback, really appreciate

I still have an 16 UNAUTHENTICATED error, but this time an Invalid credentials

gRPC reflection v1 failed: ReflectionRequestException [Error]: Error: 16 UNAUTHENTICATED: Invalid credentials
Error in gRPC reflection: ReflectionRequestException [Error]: Error: UNAUTHENTICATED: Invalid credentials
Error loading gRPC methods from reflection: ReflectionRequestException [Error]: Error: 16 UNAUTHENTICATED: Invalid credentials

Tried auths: Inherit and Bearer with the token, same error

Still displays as a 2 UNKNOWN in GUI (see my previous message)

@reggermont
Copy link
Contributor

Reflection now works 🥳 🎊
image

Trigerring a call now returns an 13 INTERNAL error: "authorization" metadata cannot have multiple values

Thanks for the steps forward, this is really good news!

@sanish-bruno
Copy link
Collaborator Author

@reggermont i have pushed few changes, will you be able to check if that fixes the issue. The fix is for the issue reported eariler, where auth header is missing! any insecure connections was missing header related information. That should be fixed with the latest code.
Let me know if you see Triggering a call now returns an 13 INTERNAL error: "authorization" metadata cannot have multiple values this error with the latest code, will look into it!

@reggermont
Copy link
Contributor

Hi Sanish,

I now have the "authorization" metadata cannot have multiple values error on the reflection request

[1] Error loading gRPC methods from reflection: ReflectionRequestException [Error]: Error: 13 INTERNAL: "authorization" metadata cannot have multiple values

This can be because of the combineChannelCredentials which doesn't merge the metadatas. If you pass the authorization header in the channelCredentials and callCredentials, it results on the error

@sanish-bruno
Copy link
Collaborator Author

@reggermont I have pushed the changes, removed the logic of attaching metadata to credentials, now it is part of call options. can you please confirm whether this is working for you?

…n grpc-client implementation

rm: comment

fix: type generation

feat: implement reflection client support for gRPC v1 and v1alpha in grpc-client

refactor: simplify reflection client handling in grpc-client by removing service list retrieval

refactor: enhance reflection client return structure in grpc-client to include service list

fix: lint
@sanish-bruno sanish-bruno force-pushed the feat/support-grpc-v1-reflection branch from e89aa2d to 2ef451c Compare November 13, 2025 13:39
@sanish-bruno
Copy link
Collaborator Author

Hi Sanish,

I now have the "authorization" metadata cannot have multiple values error on the reflection request

[1] Error loading gRPC methods from reflection: ReflectionRequestException [Error]: Error: 13 INTERNAL: "authorization" metadata cannot have multiple values

This can be because of the combineChannelCredentials which doesn't merge the metadatas. If you pass the authorization header in the channelCredentials and callCredentials, it results on the error

@reggermont any updates you may want to share, on the latest code?

@reggermont
Copy link
Contributor

Hi Sanish, everything's working great on my side. What I have tested:

  • Reflection
  • Request with a payload and a multi-step response
  • Inherit auth
image

Thanks a lot for the work, hope it can be merged soon

@bijin-bruno bijin-bruno merged commit 94c33e6 into usebruno:main Nov 13, 2025
7 checks passed
@sanishchirayath1
Copy link

@reggermont 🙏 Thanks, It will be part of next release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Grpc Reflection Support for grpc.reflection.v1

5 participants