SecuritiesModel securities = domain.getSecurities();
if (securities != null) {
for (SecurityModel security : securities.getSecurities()) {
if (security != null) {
PropertiesModel properties = security.getProperties();
ServiceSecurity value = new DefaultServiceSecurity()
.setName(security.getName())
.setCallbackHandler(security.getCallbackHandler(getClass().getClassLoader()))
.setProperties(properties != null ? properties.toMap() : null)
.setRolesAllowed(security.getRolesAllowed())
.setRunAs(security.getRunAs())