This paper introduces security modules for IoT frameworks. Many IoT legacy infrastructures use the TLS/DTLS protocols for communication security. Security modules are tamper resistant microcontrollers implementing open TLS/DTLS applications, with small memory footprint (less than 30KB) and modest RAM sizes (<1KB), and which perform strong mutual authentications based on symmetric or asymmetric cryptographic procedures. When a pair of security modules is used at both communication ends, this architecture is called SAM (Secure Access Module), by analogy with systems involving secure elements communications. We detail the software design of such modules for javacards, and present some performance figures. Three implementations are commented running on different platforms such as, Raspberry Pi, smartphones and Arduino boards.