[jboss-jira] [JBoss JIRA] (WFLY-8689) Elytron Audit Logging's rotating-file-audit does not handle unspecified suffix correctly

Jan Tymel (JIRA) issues at jboss.org
Wed May 3 06:55:00 EDT 2017


Jan Tymel created WFLY-8689:
-------------------------------

             Summary: Elytron Audit Logging's rotating-file-audit does not handle unspecified suffix correctly
                 Key: WFLY-8689
                 URL: https://issues.jboss.org/browse/WFLY-8689
             Project: WildFly
          Issue Type: Bug
          Components: Security
            Reporter: Jan Tymel
            Assignee: Darran Lofthouse
            Priority: Critical


{{rotating-file-audit}} throws {{IllegalArgumentException}} if user tries to add a new {{rotating-audit-file}} and does not specify {{suffix}} property.

Steps to reproduce: {{/subsystem=elytron/rotating-file-audit-log=rotating-audit:add(path=rotating-audit.log)}}

Following output is given in jboss-cli
{code}
{
    "outcome" => "failed",
    "failure-description" => {"WFLYCTL0080: Failed services" => {"org.wildfly.security.security-event-listener.rotating-audit" => "Failed to start service
    Caused by: java.lang.IllegalArgumentException: Illegal pattern character 'n'"}},
    "rolled-back" => true
}
{code}

and following one in server log:
{code}
12:45:41,381 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service org.wildfly.security.security-event-listener.rotating-audit: org.jboss.msc.service.StartException in service org.wildfly.security.security-event-listener.rotating-audit: Failed to start service
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1978)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalArgumentException: Illegal pattern character 'n'
	at java.text.SimpleDateFormat.compile(SimpleDateFormat.java:826)
	at java.text.SimpleDateFormat.initialize(SimpleDateFormat.java:634)
	at java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:605)
	at java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:580)
	at org.wildfly.security.audit.RotatingFileAuditEndpoint$Builder.setSuffix(RotatingFileAuditEndpoint.java:289)
	at org.wildfly.extension.elytron.AuditResourceDefinitions$2.lambda$getValueSupplier$2(AuditResourceDefinitions.java:235)
	at org.wildfly.extension.elytron.TrivialService.start(TrivialService.java:53)
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:2032)
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1955)
	... 3 more

12:45:41,382 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 5) WFLYCTL0013: Operation ("add") failed - address: ([
    ("subsystem" => "elytron"),
    ("rotating-file-audit-log" => "rotating-audit")
]) - failure description: {"WFLYCTL0080: Failed services" => {"org.wildfly.security.security-event-listener.rotating-audit" => "Failed to start service
    Caused by: java.lang.IllegalArgumentException: Illegal pattern character 'n'"}}
{code}

Note: there is an easy workaround - if user specifies {{suffix}} property then adding a new {{rotating-audit-file}} works fine, e.g. {{/subsystem=elytron/rotating-file-audit-log=rotating-audit:add(path=rotating-audit.log,suffix=y-M-d)}} passes successfully.



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the jboss-jira mailing list