cookpad / cookpad/grpc_kit

Token-based authentication

Open
#39 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
160
Forks
14
Avg merge
6d 11h
Merged PRs (30d)
2

Description

Hi,
trying to replace grpc with grpc_kit to call regular grpc endpoint, I can call using grpc but after changing grpc_kit it has 'EOFError (EOF):' error. I thought that remote server closed connection because of applying credentials.

I coundn't find GRPC::Core::ChannelCredentials or related in grpc_kit, could you please advice ?

old code grpc , it works ;

creds = GRPC::Core::ChannelCredentials.new(nil, nil, nil)
stub = Com::VService::Speech::V1::Speech::Stub.new(SERVER, creds)
metadata = { authorization: "Bearer TokenX" , trackingid: '123'}
stub.get_recognize(req, metadata: metadata)

new with grpc_kit ( if I don't stringify_keys it raises cannot convert symbol to string error )

sock = TCPSocket.new('host.co', 443)
stub = Com::VService::Speech::V1::Speech::Stub.new(sock)
metadata = { authorization: "Bearer TokenX", trackingid: '123'}
stub.get_recognize(req, metadata: metadata.stringify_keys)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the grpc_kit entry points shown in the issue: TCPSocket.new, Com::VService::Speech::V1::Speech::Stub.new, and get_recognize. Compare the working grpc call with the grpc_kit call, including metadata handling, and determine what is needed for token-based authentication. Done means the request reaches the regular gRPC endpoint without EOFError while preserving the authorization and trackingid metadata.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
api, authentication
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.