@@ -0,0 +1,1168 @@
+# This Source Code Form is subject to the terms of the Mozilla Public%0A# License, v. 2.0. If a copy of the MPL was not distributed with this%0A# file, You can obtain one at http://mozilla.org/MPL/2.0/.%0A# Copyright (c) 2014 Mozilla Corporation%0A#%0A# Contributors:%0A# Brandon Myers bmyers@mozilla.com%0A%0A%0Aclass message(object):%0A    def __init__(self):%0A        '''register our criteria for being passed a message%0A           as a list of lower case strings or values to match with an event's dictionary of keys or values%0A           set the priority if you have a preference for order of plugins to run. 0 goes first, 100 is assumed/default if not sent%0A        '''%0A        # get auditd data%0A        self.registration = %5B'cloudtrail'%5D%0A        self.priority = 2%0A%0A    def onMessage(self, message, metadata):%0A        # Convert apiVersion with the format '2016_01_02'%0A        # to '2016-01-02'%0A        # This is a result of apiVersion mapping being a dateOptionalTime%0A        # https://bugzilla.mozilla.org/show_bug.cgi?id=1313780%0A        if 'apiVersion' in message.keys():%0A            message%5B'apiVersion'%5D = message%5B'apiVersion'%5D.replace('_', '-')%0A%0A        return (message, metadata)%0A

Add apiVersion mapping fix for cloudtrail