-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Prevent our Mapbox API token being abused #5373
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
Comments
I replaced the token at https://github.com/commons-app/apps-android-commons/blob/main/app/src/main/res/values/strings.xml with a "disposable" token that I can quickly delete if some GitHub-crawling baddy abuses it, without impacting production. @sivaraam When releasing please replace with the former token (I can also send it to you in private anytime), without committing that file. Would you mind adding this (and any other tip you have) to https://github.com/commons-app/commons-app-documentation/blob/master/android/Project-maintenance.md? :-) |
Sounds like a good first step, Nicolas. 👍🏼
Sure. Feel free to send it to me when possible.
Yeah. I'll add the same, Nicolas. I have a few tweaks to the doc which could be found in another branch: https://github.com/commons-app/commons-app-documentation/blob/maintenance-tweaks/android/Project-maintenance.md I'll make sure to add this too and raise a PR. |
Would that affect f-droid builds? |
@mnalis Yes, F-Droid might not have functioning maps if we need to change the GitHub-stored key often (as happened already twice in a month). F-Droid might want to create an API key and keep it somewhere relatively secret. I expect F-Droid-generated map traffic to be well under the limit of the free tier. Hopefully we will switch to a community-provided map solution soon and get rid of these keys. |
Closing this given the release of v5.0.1 in which we replaced Mapbox totally with osmdroid. |
Fantastic, thanks to everyone involved! |
There is a possibility that Vivek's Mapbox API token was used by a bad actor, costing 480 USD.
While it is not possible to prevent bad actors from sniffing network and getting our new token, maybe there are ways to make that less easy and to make the token less usable?
Restrict this token to specific URLs
and set aReferer
header to our requests. Not sure it is supported, but worth trying.The text was updated successfully, but these errors were encountered: