cas_audit.log

Le cas_audit.log n'est pas très utilisable comparé notamment au serviceStats.log qu'avait fait Julien Marchal ( https://github.com/EsupPortail/cas-toolbox-new/pull/3 ).
Voici un paramétrage plus intéressant :

cas.audit.slf4j.use-single-line=true
cas.audit.engine.audit-format=JSON
# uniquement les actions intéressantes :
cas.audit.engine.supported-actions=TICKET_GRANTING_TICKET_CREATED|AUTHENTICATION_FAILED|SERVICE_TICKET_CREATED

en supprimant le PatternLayout dans la conf log4j2.xml, on obtient exploitable :


{"who":"prigaux","what":"TGT-1-********************************************************dI-iHqKNmcUcas-test2","action":"TICKET_GRANTING_TICKET_CREATED","application":"CAS","when":"Mon Dec 20 10:38:06 CET 2021","clientIpAddress":"172.20.11.189","serverIpAddress":"2001:660:3305:0:0:0:0:37"} {"who":"prigaux","what":"ST-1-WNN6FouE61zWb3yIIVL-8o8k-aQcas-test2 for https://idp.univ-paris1.fr/idp/Authn/External?conversation=e1s1","action":"SERVICE_TICKET_CREATED","application":"CAS","when":"Mon Dec 20 10:38:06 CET 2021","clientIpAddress":"172.20.11.189","serverIpAddress":"2001:660:3305:0:0:0:0:37"}


NB : il n'est pas possible de supprimer serverIpAddress même si c'est peu utile (notamment si un seul serveur CAS ou si logs séparés)