-
Notifications
You must be signed in to change notification settings - Fork 115
Move API keys to config #176
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
base: dev
Are you sure you want to change the base?
Conversation
|
Hey @RobThree, this has been on my list for some time. The reason they're a little bit "buried" right now is due to them being paid keys I wanted them as hidden as possbile. granted there are huge downsides to this, like the lack of ease of configurability, and I hope to soon figure out how to better obfuscate these paid keys (might just proxy the requests?) but untill then I'm going to leave this PR open. I know this may sound silly, but should a bad actor get these keys and rate limit out the API to a point that I cant fund it further, it will result in everyones orbs going down for both weather and stocks. |
Unless you're gonna proxy (which introduces a huge single point of failure) this is not a good idea. I really don't see the point on why you keep insisting providing (paid or not) API keys for everyone to use (which in many cases may even be against the terms of use, aside the risks we talked about earlier like on bad actor getting everyone rate-limited of blocked). I get that you want to make things easy for people so they don't have to bother, but for those that do want to bother I'd say: why not make it easy for them too? Put the keys in a single place. It's highly unusual to provide (and "share") API keys with your project. In fact, I bet Github has warned you on several occasions about API keys being "leaked" as well. To be perfectly clear: In the end it's all up to you, it's your project, your choice. We might not agree, but whatever you do: it is, and always will be, your choice. |
|
I'm with @RobThree . Hiding things away to "protect" them from bad usage is no protection at all. |
|
Including the API keys is terrible, yes. However, to do this properly:
As it stands, I don't think this is a big improvement either way, and has conflicts now, so I vote to close unless and until we get around to properly solving the problem. |
|
(To be clear, I agree with the change on a code cleanliness and quality basis, but I'm going to accede to the wishes of the person paying for the API) |
No, people should be using their own API keys. Yes, acquiring them is not easy for everyone and, in that regard, I can understand @brett-dot-tech's wish to "just make it work".
That's the whole point; proxy or not: one bad actor and (s)he's gonna blow it for everyone. When everyone uses their own API key, worst case (or best case, depends on your point of view) (s)he blocks him- or herself. What you're referring to is rate-limiting. This has been addressed before (can't seem to find the PR / Issue right now), but @brett-dot-tech made it clear he doesn't want people to have to go out and get their own API keys. Again, I can understand that. His project, his rules. It has been objected by a few people, that's all we can do. This PR is just 'centralizing' all API keys so when people DO want to put in their own, they're in a single place. |
|
Nothing in this PR or in my proposal is stopping you from using @brett-dot-tech's API key(s) 😉 This PR is about 'centralizing' the API keys. Another PR (or issue, can't remember, can't find it currently) was about not sharing API keys at all (which I still stand by, but, again, it's up to @brett-dot-tech and I respect his choice in the matter). (Potentially) Changing to not sharing API keys could, indeed, result in some edge-cases like yours having to pay or something else. Yes, that would suck. On the other hand: there's probably plenty providers that provide German data for free(-ish) and that would maybe provide an incentive for people to implement more providers. Win-win in my book 😉 (But $790 is... holy moly, yes, that would suck...) |
|
You are completely right ! I have not understood, why this twelvedata api key moved from config.h to the stockwidget.cpp. For me personally it would be not a big deal to use my own api key and use only the American market data. For Apple it makes not a huge difference, it would be only a delay. |
(off topic) |
|
Even before I merged a PR renaming the HTTP client :) this PR needs rerolling, or at least conflict fixing. |
It would be trivial. As soon as this project gets some real momentum you can rest assured someone is going to "have fun" spoiling everyone's fun. Security through obscurity never works.
Not sure what you mean? |
I merged another PR #218 which totally broke this PR, but it needed a reroll anyway. |
|
FWIW the API keys are leaked right onto the serial console with default config: |

API keys should be configured in one single place, not be sprinkled and hardcoded in different files throughout the project.