Managing Security, Safety and Privacy in Smart Factories