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

[Feature request] Allow re-compute headers on each grpc call #307

Open
asinghvi-aurora opened this issue Mar 18, 2024 · 2 comments
Open

Comments

@asinghvi-aurora
Copy link

When running grpc requests using bearer authentication I need to provide the bearer token in the header in this manner:

grpcui -H "Authorization: Bearer $(cat /path/to/token)"  ...

In my environment the tokens are short lived for security and are automatically regenerated at /path/to/token. Currently the token expires in 30 minutes and I need restart the grpcui web server every 30 minutes to continue to use it, otherwise requests fail authentication. It would be useful if grpcui could optionally allow some headers to be recomputed on each request, so that the same instance of the server can be used for a while.

@asinghvi-aurora asinghvi-aurora changed the title Allow re-compute headers on each grpc call [Feature request] Allow re-compute headers on each grpc call Mar 18, 2024
@dragonsinth
Copy link
Member

That $(cat /path/to/token) happens in bash, before grpcui is ever invoked...

@asinghvi-aurora
Copy link
Author

Yes that's true, so I guess what I'm asking for here is to be able to run a command before each request where-in I can update a environment variable which I can use with --expand-headers to populate the token. Maybe there is a better way?

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

No branches or pull requests

2 participants