Many real-world IoT solutions have to be implemented in a federated environment, which are environments where many different administrative organizations are involved in different parts of the solution. Smarter Cities, Federated Governance, International Trade and Military Coalition Operations are examples of federated environments. As end devices become more capable and intelligent, learning from their environment, and adapting on their own, they expose new types of security vulnerabilities and present an increased attack surface. A distributed AI approach can help mitigate many of the security problems that one may encounter in such federated environments. In this paper, we outline some of the scenarios in which we need to rethink security issues as devices become more intelligent, and discuss how distributed AI techniques can be used to reduce the security exposures in such environments.