Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for X-TOKEN header for gRPC connection #543

Open
jhawk28 opened this issue Sep 12, 2024 · 5 comments
Open

Add support for X-TOKEN header for gRPC connection #543

jhawk28 opened this issue Sep 12, 2024 · 5 comments

Comments

@jhawk28
Copy link

jhawk28 commented Sep 12, 2024

Services such as QuickNode support an x-token header for grpc authentication. It would be useful to use a QuickNode specific endpoint for the EVM gateway instead of the public endpoint.

@franklywatson
Copy link
Contributor

Have you tried using the --address-header flag for EVM GW startup? eg:

--address-header=X-TOKEN \

| `address-header` | `""` | Header for client IP when server is behind a proxy |

@jhawk28
Copy link
Author

jhawk28 commented Sep 12, 2024

--address-header is something different. If I were to use grpcurl, it would look like this:

./grpcurl \
  -H "x-token: <token>" \
...

@jhawk28
Copy link
Author

jhawk28 commented Sep 12, 2024

something like this needs to be added to

func Start(ctx context.Context, cfg *config.Config) error {
:

	if *token != "" {
		md := metadata.New(map[string]string{"x-token": *token})
		ctx = metadata.NewOutgoingContext(ctx, md)
	}

@m-Peter
Copy link
Collaborator

m-Peter commented Sep 13, 2024

It would be useful to use a QuickNode specific endpoint for the EVM gateway instead of the public endpoint.

Can you elaborate on this? What is the desired outcome/usage of this?

@jhawk28
Copy link
Author

jhawk28 commented Sep 13, 2024

We want to be able to set an auth token on our QuickNode endpoint so that we can use a configuration like this:

--access-node-grpc-host=my-quicknode-endpoint.flow-testnet.quiknode.pro:9000
--access-node-grpc-token=2ff605389410fd74640be87d73b4a62782e0eed5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

3 participants