Uploaded image for project: 'OpenAM'
  1. OpenAM
  2. OPENAM-15974

JSON Audit logs file size becoming zero bytes after log rotation

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not a defect
    • Affects Version/s: 6.5.2, 6.5.2.3
    • Fix Version/s: None
    • Component/s: audit logging
    • Labels:
    • Story Points:
      2
    • Support Ticket IDs:

      Description

      Bug description

      JSON Audit logs file size becoming zero bytes after log rotation

      How to reproduce the issue

       

      Rotation Enabled : True
      
      Maximum File Size : 1000000   <====
      
      File Rotation Prefix
      
      File Rotation Suffix : _yyyy-MM-dd
      
      Rotation Interval : 60     <====
      

       Run a load test against the above setting

       

       i="0"
      
      while [ $i -lt 200000 ]
      do
      
      openam="http://openam.internal.example.com:8080"
      
      user="amadmin"
      password="password"
      
      tokenid=`curl -k -s --request POST --header "Accept-API-Version: resource=2.0, protocol=1.0" --header "X-OpenAM-Username: $user" --header "X-OpenAM-Password: $password" --header "Content-Type: application/json" --data "{}" "$openam/openam/json/authenticate?authIndexType=service&authIndexValue=adminconsoleservice" | python -m json.tool | grep tokenId | cut -f4 -d'"'`
      #echo "tokenid is " $tokenid
      let i=i+1
      done
      

       

       

      Expected behaviour
      The audit log are rotated properly
      
      Current behaviour after 45 iterations of log rotation
      drwxr-x--- 2 iplanet iplanet  4096 Feb 28 10:58 .
      drwxr-x--- 8 iplanet iplanet  176 Feb 28 09:28 ..
      -rw-r----- 1 iplanet iplanet   0 Feb 28 10:58 access.audit.json
      -rw-r----- 1 iplanet iplanet   0 Feb 28 10:56 access.audit.json-2020.02.28.39
      -rw-r----- 1 iplanet iplanet   0 Feb 28 10:57 access.audit.json-2020.02.28.40
      -rw-r----- 1 iplanet iplanet 335778 Feb 28 10:58 activity.audit.json
      -rw-r----- 1 iplanet iplanet 408735 Feb 28 10:57 activity.audit.json-2020.02.28.45
      -rw-r----- 1 iplanet iplanet 963384 Feb 28 10:58 activity.audit.json-2020.02.28.46
      -rw-r----- 1 iplanet iplanet   0 Feb 28 10:57 authentication.audit.json
      -rw-r----- 1 iplanet iplanet   0 Feb 28 10:56 authentication.audit.json-2020.02.28
      -rw-r----- 1 iplanet iplanet   0 Feb 28 10:55 authentication.audit.json-2020.02.28.40
      -rw-r----- 1 iplanet iplanet   0 Feb 28 10:58 config.audit.json
      -rw-r----- 1 iplanet iplanet   0 Feb 28 10:56 config.audit.json-2020.02.28.39
      -rw-r----- 1 iplanet iplanet   0 Feb 28 10:57 config.audit.json-2020.02.28.40
      
      
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              sam.phua Sam Phua
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: