Configuring audit event factories using scripting
Before enabling security auditing, use this task to configure audit event factories using the wsadmin tool. Security auditing provides tracking and archiving of auditable events.
Before you begin
Before configuring security auditing event factories, enable administrative security in your environment.
About this task
In order to enable security auditing in your environment, you must configure an audit event factory. The audit event factory gathers the data that is associated with security events. The security auditing configuration provides a default event factory. Use this topic to customize your security auditing subsystem by creating additional audit event factories.
Use the following steps to configure your security auditing subsystem using the wsadmin tool:
Procedure
- Launch the wsadmin scripting tool using the Jython scripting language. See the Starting the wsadmin scripting client article for more information.
- Configure event filters. You can use the default event
filters or use this step to create additional filters to customize
your security auditing configuration.
Table 1. Event filters in the audit.xml file. The application server provides the following event filters by default in the audit.xml template file: Event Name Outcome of event SECURITY_AUTHN SUCCESS SECURITY_AUTHN DENIED SECURITY_RESOURCE_ACCESS SUCCESS SECURITY_AUTHN REDIRECT You can configure additional audit event types to track and archive various events. Use the following command to list all supported auditable events:print AdminTask.getSupportedAuditEvents()
Use the createAuditFilter command with the -eventType and -outcome parameters to enable one or multiple audit events and outcomes. You can specify multiple event types and multiple outcomes separated by a comma with one command invocation. The following list describes each valid auditable event that you can specify with the -eventType parameter:Table 2. Tipos de Eventos. É possível especificar eventos auditáveis válidos como um tipo de evento ativado ao criar um filtro de eventos: Nome do Evento Descrição SECURITY_AUTHN Audita todos os eventos de autenticação SECURITY_AUTHN_MAPPING Audita eventos que registram o mapeamento de credenciais no qual duas identidades de usuários estão envolvidas SECURITY_AUTHN_TERMINATE Audita eventos de fim de autenticação, como logout baseado em formulário SECURITY_AUTHZ Audita eventos relacionados a verificações de autorização quando o sistema impõe políticas de controle de acesso SECURITY_RUNTIME Audita eventos de tempo de execução, como iniciar e parar servidores de segurança. Esse tipo de evento não se destina a operações administrativas executadas por um administrador de sistemas, como as operações necessárias para se utilizar os outros tipos de eventos SECURITY_MGMT_*. SECURITY_MGMT_AUDIT Audita eventos que gravam operações relacionadas ao subsistema de auditoria, como iniciar, parar e ativar ou desativar a auditoria, alterar a configuração de filtros ou nível de auditoria, arquivar dados de auditoria, eliminar dados de auditoria, etc. SECURITY_RESOURCE_ACCESS Audita eventos que gravam todos os acessos em um recurso. Os exemplos são todos os acessos a um arquivo, todas as solicitações e respostas de HTTP para uma determinada página da Web e todos os acessos a uma tabela de banco de dados crítica SECURITY_SIGNING Os eventos de auditoria que registram a assinatura como operações de assinatura usadas para validar partes de uma Mensagem SOAP para serviços da Web SECURITY_ENCRYPTION Os eventos de auditoria que registram informações de criptografia como criptografia para serviços da Web SECURITY_AUTHN_DELEGATION Audita eventos que registram delegação, incluindo a asserção de identidade, RunAs e asserção baixa. Utilizado quando a identidade do cliente é propagada ou quando a delegação envolve o uso de uma identidade especial. Esse tipo de evento também é utilizado quando se alterna identidades do usuário dentro de uma determinada sessão. SECURITY_AUTHN_CREDS_MODIFY Audita eventos para modificar credenciais para uma determinada identidade do usuário SECURITY_FORM_LOGIN Audita eventos do usuário que está efetuando login e o endereço IP remoto a partir do qual o login é iniciado, junto com o registro de data e hora e o resultado. SECURITY_FORM_LOGOUT Audita eventos do usuário que está efetuando logout e o endereço IP remoto a partir do qual o logout é iniciado, junto com o registro de data e hora e o resultado. Important: The following security audit event types are not used in this release of WebSphere® Application Server:For each audit event type, you must specify an outcome. Valid outcomes include SUCCESS, FAILURE, REDIRECT, ERROR, DENIED, WARNING, and INFO. The following command example creates an audit filter to log users who receive an error when modifying credentials:- SECURITY_MGMT_KEY
- SECURITY_RUNTIME_KEY
- SECURITY_MGMT_PROVISIONING
- SECURITY_MGMT_REGISTRY
- SECURITY_RUNTIME
- SECURITY_AUTHN_CREDS_MODIFY
AdminTask.createAuditFilter('-name uniqueFilterName -eventType SECURITY_RESOURCE_ACCESS,SECURITY_AUTHN_DELEGATION -outcome ERROR,REDIRECT')
- Create an audit event factory. You can use the default
audit event factory or use this step to create a new audit event factory.
Use the createAuditEventFactory command to create an audit event factory in your security configuration. You can use the default implementation of the audit event factory or use a third-party implementation. To configure a third-party implementation, use the optional -customProperties parameter to specify any properties necessary to configure the audit event factory implementation.
Table 3. Required parameters. Specify the following required parameters with the createAuditEventFactory to configure your audit event factory: Parameter Description Data type Required -uniqueName Specifies a unique name that identifies the audit event factory. String Yes -className Specifies the class implementation of the audit event factory interface. String Yes -auditFilters Specifies a reference or a group of references to predefined audit filters, using the following format: "reference, reference, reference" String Yes -provider Specifies a reference to a predefined audit service provider implementation. String Yes -customProperties Specifies a comma (,) separated list of custom property pairs to add to the security object in the following format: attribute=value,attribute=value String No The following sample command creates an enables an audit event factory:AdminTask.createAuditEventFactory('-uniqueName eventFactory1 -className com.ibm.ws.security.audit.AuditEventFactoryImpl -auditFilters "AuditSpecification_1173199825608, AuditSpecification_1173199825609, AuditSpecification_1173199825610, AuditSpecification_1173199825611" -provider newASP')
- Save your configuration changes. Utilize o seguinte exemplo de comando para salvar suas alterações de configuração:
AdminConfig.save()
What to do next
Configure the audit service provider.


http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=txml_7auditeventfactory
Nome do arquivo: txml_7auditeventfactory.html