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

Adding header option for making secure request #660

Closed
wants to merge 1 commit into from

Conversation

dftaher
Copy link

@dftaher dftaher commented Nov 13, 2020

Enhancing the custom request url option to include headers for making authorized requests.

@bell-steven
Copy link
Collaborator

Can I ask what your use case is?

@dftaher
Copy link
Author

dftaher commented Nov 15, 2020

We use proxy server to secure the google key, but the URL is exposed to public since it will be accessed by our mobile app. To make sure all requests to the proxy server are coming from the mobile app, we are passing the user JWT in authorization header so we know the request is valid.

@bell-steven
Copy link
Collaborator

Is this web specific?

This sounds like it solves a pretty narrow use case, and may be a little out of scope for this library.

@dftaher
Copy link
Author

dftaher commented Nov 22, 2020

It is not web specific. The plug-in requires unrestricted key to be used in the mobile app, but we needed to secure the google key, we did that by using a proxy server. Using a proxy server doesn’t eliminate the security issue, we still need to protect the requests that is coming in. With the authorization header the plug-in makes secure calls to the proxy server.

If it’s out of scope what do you recommend to make secure calls when using proxy server to protect google key? Open to ideas, please advise.

@jcw-
Copy link

jcw- commented Apr 30, 2021

We are currently at the same place in our evaluation of this library, this seems to be the only feasible approach to protecting our API key, but we would need to add a header with the auth for the proxy.

@bell-steven what is being described in this PR would appear to be the best practice IMO (for those uncomfortable handing out wide-open API keys) we would likely use this approach if landed, as a plan B for being unable to use an Apple/Android restricted API key

@bell-steven
Copy link
Collaborator

Closing in favor of #734

@bell-steven bell-steven closed this Aug 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants