Internet of Things (IoT) as an emerging technology has been transforming the different aspects of our world from simple preprogrammed coffee machine to smart farming. Due to the human nature that strives for more convenience, humans are becoming more dependent on these automated IoT devices and smart environments such as smart phones, wearable devices, smart homes etc. In order to provide better QoS, these devices need to work together and share data internally and with different service and cloud providers. Since these devices are resource constrained, IoT technology heavily depends on the cloud for processing, analytics and storage. Data produced and shared by such devices may contain lots of personal identity information (PII). Usually, the users of these devices are unaware of the sensitivity of information that is being transmitted or do not possess control over the data that is being sent to the service provider, or to the cloud. Although, the cloud services and service providers are supposed to be very secure, and there is a number of security measures implemented to secure end to end communications, IoT lacks the mechanism for securing the data generated by different devices and for proper access control. In this article we are proposing an approach for the security, privacy and access control of users' data using Attribute Based Encryption (ABE). Smart homes are used as a case study.