Internet of Things (IoT) andWireless Sensor Networks (WSN) are composed of devices capable of sensing/actuation, communication and processing. They are valuable technology for the development of applications in several areas, such as environmental, industrial and urban monitoring and processes controlling. Given the challenges of different protocols and technologies used for communication, resource constrained devices nature, high connectivity and security requirements for the applications, the main challenges that need to be addressed include: secure communication between IoT devices, network resource management and the protected implementation of the security mechanisms. In this paper, we present a secure Software-Defined Networking (SDN) based framework that includes: communication... protocols, node task programming middleware, communication and computation resource management features and security services. The communication layer for the constrained devices considers IT-SDN as its basis. Concerning security, we address the main services, the type of algorithms to achieve them, and why their secure implementation is needed. Lastly, we showcase how the Sensing as a Service paradigm could enable WSN usage in more environments.