use of org.jboss.security.audit.config.AuditProviderEntry in project wildfly by wildfly.
the class SecurityDomainAdd method processAudit.
private boolean processAudit(OperationContext context, String securityDomain, ModelNode node, ApplicationPolicy applicationPolicy) throws OperationFailedException {
node = peek(node, AUDIT, CLASSIC, PROVIDER_MODULE);
if (node == null) {
return false;
}
AuditInfo auditInfo = new AuditInfo(securityDomain);
for (Property moduleProperty : node.asPropertyList()) {
ModelNode module = moduleProperty.getValue();
String codeName = MappingProviderModuleDefinition.CODE.resolveModelAttribute(context, module).asString();
Map<String, Object> options = extractOptions(context, module);
AuditProviderEntry entry = new AuditProviderEntry(codeName, options);
auditInfo.add(entry);
ModelNode moduleName = MappingProviderModuleDefinition.MODULE.resolveModelAttribute(context, module);
if (moduleName.isDefined() && !moduleName.asString().isEmpty()) {
auditInfo.addJBossModuleName(moduleName.asString());
} else {
auditInfo.addJBossModuleName(DEFAULT_MODULE);
}
}
applicationPolicy.setAuditInfo(auditInfo);
return true;
}
Aggregations