skip to main content
10.1145/3477314.3508387acmconferencesArticle/Chapter ViewAbstractPublication PagessacConference Proceedingsconference-collections
poster

cpp-tiny-client: a secure API client generator for IoT devices

Published:06 May 2022Publication History

ABSTRACT

Given the success of IoT platforms, more developers and companies want to include the technology in their portfolio. Code generators for API clients can enhance productivity, but they tend to generate universal purpose code, and on the other hand the networking primitives of IoT devices are platform specific, especially when security mechanisms such as Transport Layer Security are part of the picture. This paper presents cpp-tiny-client, an API client generator developed as a plugin for the OpenAPI Generator project, which can tailor the generated code based on the IoT platform specified by the user. Our work allows to generate correct code for API clients for IoT devices, and thus can empower a developer with more productivity and a faster time-to-market for its own applications. By combining together mainstream technologies only, cpp-tiny-client offers a gentle learning curve. Moreover, experiments show that the generated code has a reasonable footprint, at least with respect to the IoT devices that were used in the validation of the work. The code related to this work is available through the OpenAPI Generator project [31]. The information in this paper is extended in [27].

References

  1. Michele Albano, Erkki Jantunen, Gregor Papa, and Urko Zurutuza. The MANTIS book: cyber physical system based proactive collaborative maintenance. River Publishers, 2019.Google ScholarGoogle ScholarCross RefCross Ref
  2. Arduino. Information about the arduino-mega-2560-rev3 microcontroller. https://store.arduino.cc/arduino-mega-2560-rev3, 2021.Google ScholarGoogle Scholar
  3. Arduino. Information about the arduino-uno-wifi-rev2 microcontroller. https://store.arduino.cc/arduino-uno-wifi-rev2, 2021.Google ScholarGoogle Scholar
  4. ARM. Mbed os|mbed. https://os.mbed.com/mbed-os/, 2021 Last visited January 5, 2022.Google ScholarGoogle Scholar
  5. ARM. Mbed os|mbed. https://os.mbed.com/teams/sandbox/code/mbed-http/, 2021 Last visited January 5, 2022.Google ScholarGoogle Scholar
  6. Dan-Radu Berte. Defining the iot. In Proceedings of the International Conference on Business Excellence, volume 12, pages 118--128, 2018.Google ScholarGoogle ScholarCross RefCross Ref
  7. Silvia Bonfanti, Marco Carissoni, Angelo Gargantini, and Atif Mashkoor. Asm2c++: a tool for code generation from abstract state machines to arduino. In NASA Formal Methods Symposium, pages 295--301, Moffett Field, CA, 2017. Springer.Google ScholarGoogle ScholarCross RefCross Ref
  8. Louis Columbus. 2017 roundup of internet of things forecasts. Forbes, December 2017.Google ScholarGoogle Scholar
  9. Louis Columbus. 2018 roundup of internet of things forecasts and market estimates. Forbes, December 2018.Google ScholarGoogle Scholar
  10. Bruno Costa, Paulo F Pires, Flávia C Delicato, and Paulo Merson. Evaluating a representational state transfer (rest) architecture: What is the impact of rest in my architecture? In 2014 IEEE/IFIP Conference on Software Architecture, pages 105--114. IEEE, 2014.Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. CURL. command line tool for transferring data with urls. https://curl.se/, 2021.Google ScholarGoogle Scholar
  12. Manik Lal Das and Navkar Samdaria. On the security of ssl/tls-enabled applications. Applied Computing and informatics, 10(1--2):68--81, 2014.Google ScholarGoogle Scholar
  13. Espressif. A world-leading aiot platform. https://www.espressif.com/en/company/about-espressif, 2021 Last visited January 5, 2022.Google ScholarGoogle Scholar
  14. Nicolas Harrand, Franck Fleurey, Brice Morin, and Knut Eilif Husa. Thingml: a language and code generation framework for heterogeneous targets. In Proceedings of the ACM/IEEE 19th Int. Conf. on Model Driven Engineering Languages and Systems, pages 125--135, Saint-malo, France, 2016. ACM/IEEE.Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. OpenAPI Initiative. Openapi specification description. https://github.com/OAI/OpenAPI-Specification, 2021.Google ScholarGoogle Scholar
  16. Tellu IoT. The thingml modelling language. https://github.com/TelluIoT/ThingML, 2021 Last visited January 5, 2022.Google ScholarGoogle Scholar
  17. Adeel Javed. Building arduino projects for the internet of things. Experiments with Real-World Applications. United States of America: Apress Media, LLC, pages 15--34, 2016.Google ScholarGoogle Scholar
  18. PlatformIO Labs. What is platformio? https://docs.platformio.org/en/latest/what-is-platformio.html#technologies, 2021.Google ScholarGoogle Scholar
  19. Sergio Laso, Marino Linaje, Jose Garcia-Alonso, Juan M Murillo, and Javier Berrocal. Deployment of apis on android mobile devices and microcontrollers. In 2020 IEEE International Conference on Pervasive Computing and Communications Workshops (PerCom Workshops), pages 1--3. IEEE, 2020.Google ScholarGoogle ScholarCross RefCross Ref
  20. Michael W. Lucas. TLS Mastery. Tilted Windmill Press, April 2021.Google ScholarGoogle Scholar
  21. Henry Muccini and Mohammad Sharaf. Caps: a tool for architecting situational-aware cyber-physical systems. In 2017 IEEE Int. Conf. on Software Architecture Workshops (ICSAW), pages 286--289, Gothenburg, Sweden, 2017. IEEE.Google ScholarGoogle ScholarCross RefCross Ref
  22. Thiago Nepomuceno, Tiago Carneiro, Paulo Henrique Maia, Muhammad Adnan, Thalyson Nepomuceno, and Alexander Martin. Autoiot: a framework based on user-driven mde for generating iot applications. In Proceedings of the 35th Annual ACM Symposium on Applied Computing, pages 719--728, 2020.Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. OpenApi. What is openapi. https://swagger.io/docs/specification/about/, 2021.Google ScholarGoogle Scholar
  24. PlatformIO Labs OÜ. A professional collaborative platform for embedded development · platformio. https://platformio.org/, 2021 Last visited January 5, 2022.Google ScholarGoogle Scholar
  25. Mohammad Sharaf, Mai Abusair, Rami Eleiwi, Yara Shana'a, Ithar Saleh, and Henry Muccini. Modeling and code generation framework for iot. In Int. Conf. on System Analysis and Modeling, pages 99--115, Munich, Germany, 2019. Springer.Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Mohammad Sharaf, Henry Muccini, and Moamin Abughazala. ArIA: arduino code generation based on the caps. In Proceedings of the 12th European Conference on Software Architecture, pages 1--4, Madrid, Spain, 2018. ACM.Google ScholarGoogle Scholar
  27. Anders Aaen Springborg, Martin Kaldahl Andersen, Kaare Holland Hattel, and Michele Albano. Towards a secure api client generator for iot devices. Technical Report arXiv:2201.00270, ArXiV, January 2022.Google ScholarGoogle Scholar
  28. Steinwurf. Json bourne library. https://github.com/steinwurf/bourne, 2021.Google ScholarGoogle Scholar
  29. Espressif Systems. Esp8266httpclient. https://github.com/esp8266/Arduino/tree/master/libraries/ESP8266HTTPClient, 2021.Google ScholarGoogle Scholar
  30. Espressif Systems. Httpclient for esp32. https://github.com/espressif/arduino-esp32/tree/master/libraries/HTTPClient, 2021.Google ScholarGoogle Scholar
  31. OpenApi Tools. Openapi generator. https://openapi-generator.tech/, 2021.Google ScholarGoogle Scholar
  32. OpenApi Tools. Who is using this? https://openapi-generator.tech/users, 2021.Google ScholarGoogle Scholar
  33. Chris Wanstrath. Mustache manual. https://mustache.github.io/mustache.5.html.Google ScholarGoogle Scholar
  34. John Yannakopoulos. Hypertext transfer protocol: A short course. University of Crete. August, 2003.Google ScholarGoogle Scholar

Index Terms

  1. cpp-tiny-client: a secure API client generator for IoT devices

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in
      • Published in

        cover image ACM Conferences
        SAC '22: Proceedings of the 37th ACM/SIGAPP Symposium on Applied Computing
        April 2022
        2099 pages
        ISBN:9781450387132
        DOI:10.1145/3477314

        Copyright © 2022 Owner/Author

        Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for third-party components of this work must be honored. For all other uses, contact the Owner/Author.

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 6 May 2022

        Check for updates

        Qualifiers

        • poster

        Acceptance Rates

        Overall Acceptance Rate1,650of6,669submissions,25%

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader