The Internet of Things (IoT) will connect not only computers and mobile devices, but it will also interconnect smart buildings, homes, and cities. The IoT take advantage of the latest communication technologies in order to provide optimal and reliable services to Smart Cities (SC). The backbone of SC are the Critical Infrastructures such as the city's water system. In SC, the water system benefits from the development of automation and communication technologies to create smart environments which are more efficient in the use of the available resources; we call it Smart Water System (SWS). In this paper we present a multilayer architecture to integrate the SWS to the IoT, making it available from everywhere at any time. However, with the introduction of IoT we will be experiencing grand challenges to secure and protect its advanced information services due to the significant increase of the attack surface, complexity, heterogeneity, and number of interconnected resources. We also introduce an IoT Framework for SWSs to build trustworthy and secure applications and services. The framework enables developers to consider security issues at all IoT layers and integrate security algorithms with the functions and services offered in each layer instead of considering security in an ad-hoc and after thought manner. We show how this framework can be used to develop highly secure and trustworthy SWS services and how to apply our Anomaly Behavior Analysis methodology to secure and protect these services against any type of attacks.