Skip to main content
AI
  • Get started with AI

    • Red Hat AI

      Accelerate the development and deployment of enterprise AI solutions.

    • AI learning hub

      Explore learning materials and tools, organized by task.

    • AI interactive demos

      Click through scenarios with Red Hat AI, including training LLMs and more.

    • AI/ML learning paths

      Expand your Red Hat OpenShift AI knowledge using these learning resources.

    • AI quickstarts

      Focused AI use cases designed for fast deployment on Red Hat AI platforms.

    • No-cost AI training

      Foundational Red Hat AI training.

  • Featured resources

    • Red Hat OpenShift AI
    • Open source AI for developers
    • AI product application development
    • Open source-powered AI/ML for hybrid cloud
    • AI and Node.js cheat sheet

Red Hat AI Factory with NVIDIA

Red Hat AI Factory with NVIDIA is a co-engineered, enterprise-grade AI solution for building, deploying, and managing AI at scale across hybrid cloud environments.

Learn
  • Self-guided

    • Documentation

      Find answers, get step-by-step guidance, and learn how to use Red Hat products.

    • Learning paths

      Explore curated walkthroughs for common development tasks.

    • Guided learning

      Receive custom learning paths powered by our AI assistant.

    • See all learning
  • Hands-on

    • Developer Sandbox

      Spin up Red Hat's products and technologies without setup or configuration.

    • Interactive labs

      Learn by doing in these hands-on, browser-based experiences.

    • Interactive demos

      Click through product features in these guided tours.

  • Browse by topic

    • AI/ML
    • Automation
    • Java
    • Kubernetes
    • Linux
    • See all topics
  • Training & certifications

    • Courses and exams
    • Certifications
    • Skills assessments
    • Red Hat Academy
    • Learning subscription
    • Explore training
Build
  • Get started

    • Red Hat build of Podman Desktop

      A downloadable, local development hub to experiment with our products and builds.

    • Developer Sandbox

      Spin up Red Hat's products and technologies without setup or configuration.

  • Download products

    • Red Hat Enterprise Linux
    • Red Hat AI
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products
  • Featured

    • Red Hat build of OpenJDK
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat Developer Toolset
  • References

    • E-books
    • Documentation
    • Cheat sheets
    • Architecture center
Community
  • Get involved

    • Events
    • Live AI events
    • Red Hat Summit
    • Red Hat Accelerators
    • Community discussions
  • Follow along

    • Articles & blogs
    • Developer newsletter
    • Videos
    • Github
  • Get help

    • Customer service
    • Customer support
    • Regional contacts
    • Find a partner

Join the Red Hat Developer program

Download Red Hat products and project builds, access support documentation, learning content, and more.

ConsoleDocsSupport Search
New For you

Recommended

We'll recommend resources you may like as you browse. Try these suggestions for now.

  • Product downloads
  • Cheat sheets
  • Red Hat Developer learning portal
  • Developer blog
  • E-books
  • Developer Sandbox
Log in

Get more with a Red Hat Developer account

  • Product downloads
  • Console access
  • Event registration
  • Training & trials
Explore more account benefitsLog in or register

A subscription may be required for some services.

Contact us

How to enable the JBoss EAP 7 management audit log

November 17, 2023
Francisco De Melo Junior
Related topics:
JavaSecurity
Related products:
Red Hat JBoss Enterprise Application Platform

    This article explains how to enable and use the management audit log in Red Hat JBoss Enterprise Application Platform (JBoss EAP) 7.

    The management audit log is used to register admin functions and it is created in the $JBOSS_HOME/standalone/data/ $JBOSS_HOME/domain/data/ directory. It logs all operations performed using the management console, command-line interface (CLI), or custom application using the Management API, as described in the JBoss EAP 7.4 configuration guide. Consult the JBoss EAP security configuration documentation to learn about the security audit logging logs authentication success and failures.

    Management audit log versus security audit log

    The security audit log (or the Elytron audit log in WildFly) is used for security operations. Elytron's audit log is created in $JBOSS_HOME/standalone/logs.

    The management audit log is used to register admin functions; this log is created in the $JBOSS_HOME/standalone/data/ directory.

    How to set the management log

    The following JBoss CLI commands enable management logging:

    /core-service=management/access=audit/logger=audit-log:write-attribute(name=enabled,value=true)
    /core-service=management/access=audit/logger=audit-log:write-attribute(name=log-boot,value=true)
    /core-service=management/access=audit/logger=audit-log:write-attribute(name=log-read-only,value=true)
    

    For the XML configuration file, you can use the following format (you will find the file audit-log.log in the data directory):

    <audit-log>
                <formatters>
                    <json-formatter name="json-formatter"/>
                </formatters>
                <handlers>
                    <file-handler name="file" formatter="json-formatter" relative-to="jboss.server.data.dir" path="audit-log.log"/>
                </handlers>
                <logger log-boot="true" log-read-only="false" enabled="true">
                    <handlers>
                        <handler name="file"/>
                    </handlers>
                </logger>
            </audit-log>

    The audit logs are inside the management context, essentially inside the core-management subsystem:

        <management> <!--- biggest context -->
            <security-realms>
                <security-realm name="ManagementRealm">
                   ....
                </security-realm>
                <security-realm name="ApplicationRealm">
                ...
            </security-realms>
            <audit-log> <!--- audit log -->
                ...
            </audit-log>

    The configuration above has the following properties: enabled, log-boot, and log-read-only. These audit log operations are defined as follows:

    • enabled: If true, the management operations will be recorded in the log.
    • log-boot: Use true to log the management operations when booting the server, false otherwise.
    • log-read-only: If enabled, all operations will be added to the audit log.

    Use cases and usage

    A user can get the audit logs, view the operation and the corresponding timestamp, and respond accordingly. Here are a few real-world use case examples:

    • Which user deployed and undeployed a specific application, what was the timestamp, and on which host?
    • Someone disabled HTTP/2 (HTTP upgrade) in JBoss EAP by mistake, and now the Enterprise Java Beans (EJB) remote communication is not working—which user was that and what time did it occur?
    • What are the realms and endpoints configured in the server?
    • What time was a certain property/subsystem changed?

    However, audit log isn't typically used for the exact order of deployment (starting) of the subsystems, given that the EAP 7 subsystem start order is not defined, except for specific dependencies; thus, that would not be useful.

    Of course, as you can see, a management audit log can be very useful for several scenarios, but it gets complex because during boot, some initialization operations will happen, like here:

    "operation" : "add",
    "address" : [{"subsystem" : "undertow"},
        {"server" : "default-server"},
        {"host" : "default-host"},
        {"setting" : "http-invoker"}], "security-realm" : "ApplicationRealm"},

    Here is an example of removing one deployment:

       2021-11-04 21:02:03 - {
           "type" : "core",
           "r/o" : false,
           "booting" : false, <----- wasn't done in boot time
           "version" : "7.4.1.GA", <----- version
           "user" : "celine", <----- user, yes, the user is celine
           "domainUUID" : null,
           "access" : "HTTP", <----- http access
           "remote-address" : "/127.0.0.1",<----- url
           "success" : true,  <----- succeed
           "ops" : [{
               "operation" : "remove",
               "address" : [{
                   "deployment" : "jboss-helloworld-singleton.war" <----- deployment
               }],
               "operation-headers" : {
                   "access-mechanism" : "HTTP",
                   "caller-type" : "user"
               }
           }]
       }

    How do we properly parse JSON blocks to capture relevant security events showing date/time, user, and type of change? The capture data is written in the audit logs via the file handler; you can use any tool you think is necessary. The server deployment part of this is to feed the audit.log with information.

    What are some of the keywords that you can search to identify security-related changes? Searching relevant terms directly on the audit.log. Also, the user can create scripts and use log aggregators to make it easy for you to find any terms you think is necessary.

    There are several relevant terms; the user, ops, timestamp, etc., will depend on what your needs. You can parse with any tool you use to view the logs, like a log aggregator, to see any piece of information your team think is relevant.

    The EAP management audit system is highly customizable, and the logs can record events on the EAP side. (Note that developing aggregators or custom scripts is beyond the scope of the support team; this would require engaging consulting services.)

    I've summarized the output details below. They are also are explained in the latest WildFly documentation and referenced in Enabling JBoss EAP Management Audit Log and increasing its level.

    • timestamp: The timestamp that the operation happened.
    • type: This can have the values core, meaning it is a management operation, or jmx, meaning it comes from the JMX subsystem (see the JMX subsystem to configure the JMX subsystem's audit logging).
    • r/o: true if the operation does not change the management model, false otherwise.
    • booting: true if the operation was executed during the bootup process, false if it was executed once the server is up and running.
    • version: The version number of the WildFly/EAP instance.
    • user: The username of the authenticated user. In this case, the operation has been logged via the CLI on the same machine as the running server, so the special $local user is used.
    • domainUUID: An ID to link together all operations as they are propagated from the Domain Controller to IT servers, Host Controllers, and Host Controller servers.
    • remote-address: The address of the client executing this operation.
    • success: true if the operation succeeded, false if it was rolled back.
    • ops: The operations being executed; this is a list of the operations serialized to JSON. At boot, this will be all the operations resulting from parsing the XML. Once booted, the list will typically just contain a single entry.

    JBoss EAP 7 audit logs

    The JBoss EAP 7 audit logs can register admin functions and later verify them. In other words, the audit.log file will register all operations performed with the management console, management CLI, or custom application that uses the Management API.

    Additional resources

    For any other specific inquiries about working with audit logs, please open a case with Red Hat support. Our global team of experts can help you with any issues.

    Related Posts

    • The road to JBoss EAP 8

    • Automate and deploy a JBoss EAP cluster with Ansible

    • A visual guide to deploying JBoss EAP on AWS

    • JBoss EAP 7 Domain deployments - Part 1: Set up a simple EAP Domain

    • Elytron: A New Security Framework in WildFly/JBoss EAP

    • Load balancing Red Hat JBoss Enterprise Application Platform subclusters with mod_cluster

    Recent Posts

    • A day in the life of an NVIDIA H100 on Red Hat OpenShift 5

    • Migrate BuildConfigs to builds for Red Hat OpenShift with one plug-in install

    • Run Red Hat Enterprise Linux CoreOS on NVIDIA BlueField DPUs

    • Agent harness engineering: Separating model capabilities from enforcement

    • What's new for developers in Red Hat Enterprise Linux 10.3 and 9.9

    What’s up next?

    Learn how to deploy applications to multiple application servers via Tomcat, JBoss Enterprise Application Platform, and Wildfly with the IntelliJ IDE extension.

    https://developers.redhat.com/learn/java/deploy-applications-middleware-servers-jboss-eap-wildfly-tomcat-intellij-ide-extension
    Red Hat Developers logo

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Build

    • Developer Sandbox
    • Developer tools
    • Interactive tutorials
    • API catalog

    Quicklinks

    • Learning resources
    • E-books
    • Cheat sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site status dashboard
    • Report a security problem

    Red Hat Developer

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2026 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility
    Ask AI