1. A method comprising: determining one or more parameters of one or more applications and one or more services operating in a network; determining an optimal number of clusters for grouping the one or more applications and the one or more services based on the one or more parameters; grouping the one or more applications and the one or more services into the clusters; and applying one or more security enclaves to each of the clusters.