Make security more generic