TNS
VOXPOP
Will JavaScript type annotations kill TypeScript?
The creators of Svelte and Turbo 8 both dropped TS recently saying that "it's not worth it".
Yes: If JavaScript gets type annotations then there's no reason for TypeScript to exist.
0%
No: TypeScript remains the best language for structuring large enterprise applications.
0%
TBD: The existing user base and its corpensource owner means that TypeScript isn’t likely to reach EOL without a putting up a fight.
0%
I hope they both die. I mean, if you really need strong types in the browser then you could leverage WASM and use a real programming language.
0%
I don’t know and I don’t care.
0%
API Management

Lessons Learned From Hacking The Tesla API

Jun 15th, 2014 9:39am by
Featued image for: Lessons Learned From Hacking The Tesla API

Last week, Tesla announced it would not pursue lawsuits against people using its patents in “good faith.” But the company has not always been so open with its technology. Its Tesla Model S API was never meant to be public but almost from its start, Tesla owners started documenting its API calls on GitHub, eventually building their own on the Apiary platform.

At API Days in San Francisco, Apiary CEO Jakub Nesetrill discussed how the Tesla story shows there really is no such thing as a private API in the context of something like cars. The Tesla example shows the problems that can come from the start with private APIs, Nesetrill said in an interview at the conference. In Tesla’s case, people looking at the API learned it did not lend itself to the HTTP protocol and it had problems with GET methods being uses for API actions with real-life consequences such as unlocking the car and turning the heat on.


Hacking the Tesla API

More troubling, security analysis showed that Tesla had built their own user authentication that did not hold up to strong security practices. The protocol was not well developed.

George Reese detailed what the API can do and how it could be exploited in a post last August. He wrote:

  • It cannot safely operate over any channel but a trusted SSL connection (minor)
  • It requires the sharing of the user’s password with third-parties (major)
  • No mechanism exists for cataloging applications with active tokens (significant)
  • Only an inconsistent blunt-force mechanism exists for revoking access to a compromised application (moderate)
  • The automated expiration of tokens in 3 months encourages applications to improperly store your email and password (significant)

Apiary has documented 70,000 APIs. Most are built by companies new to building APIs . On first try, companies have problems with getting the API design right and that is a concern. Tesla is a leader in the car space  for providing programmable services and did many things right such as remote updates. But often new API developers try to maker it simple and cut corners that could make it difficult for the end user to operate their own machinery.

Bottom line — with cars, don’t try to reinvent the wheel, Nesetrill said . It makes no sense to develop a private API, especially when there are a large motivated group of users who will document it to for their own purposes and create one that better suits their own needs.

Feature image via Flickr Creative Commons

Group Created with Sketch.
THE NEW STACK UPDATE A newsletter digest of the week’s most important stories & analyses.