JBoss Community

Audit Logging Design Notes

new comment by Kabir Khan View all comments on this document

The IP and interface are captured. The output in the simple file appender is:

 

 

2013-05-17 13:13:02 - {

    "type" : "core",

    "r/o" : true,

    "booting" : false,

    "user" : "$local",

    "domainUUID" : null,

    "access" : "NATIVE",

    "remote-address" : "127.0.0.1/127.0.0.1",

    "success" : true,

    "ops" : [{

        "address" : [{

            "system-property" : "test"

        }],

        "operation" : "read-operation-description",

        "name" : "add",

        "operation-headers" : {"caller-type" : "user"}

    }]

}

2013-05-17 13:13:02 - {

    "type" : "core",

    "r/o" : true,

    "booting" : false,

    "user" : "$local",

    "domainUUID" : null,

    "access" : "NATIVE",

    "remote-address" : "127.0.0.1/127.0.0.1",

    "success" : true,

    "ops" : [{

        "address" : [{

            "system-property" : "test"

        }],

        "operation" : "add",

        "value" : "hello",

        "operation-headers" : {"caller-type" : "user"}

    }]

}

 

 

                   

 

The sample output in syslog is

 

17/05/2013 13:18:50.000 2013-05-17T13: 18:50.107+01:00 Kabirs-MacBook-Pro.local WildFly 4225 - - 2013-05-17 13:18:50 - {

    "type" : "core",

    "r/o" : true,

    "booting" : false,

    "user" : "$local",

    "domainUUID" : null,

    "access" : "NATIVE",

    "remote-address" : "127.0.0.1/127.0.0.1",

    "success" : true,

    "ops" : [{

        "address" : [{

            "system-property" : "test"

        }],

        "operation" : "remove",

        "operation-headers" : {"caller-type" : "user"}

    }]

 

 

                   

 

For future releases I plan to support custom formatters, to allow you to choose the output format, and the formatter will be what provides things like tamper detection mechanisms (hashing, signing, encryption etc). For now I settled on a JSON formatter, but can change that to something different if desired. I like that it gives more structure than tabs etc. and the operations coded as model nodes map nicely to that. Also syslog does not like byte[] formatted data, it seems to have to be strings.