Bug 1632155 - Cannot see basic audit log but just advanced log
Summary: Cannot see basic audit log but just advanced log
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Master
Version: 3.11.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 3.11.z
Assignee: Maciej Szulik
QA Contact: ge liu
URL:
Whiteboard:
Depends On: 1631087
Blocks: 1632154
TreeView+ depends on / blocked
 
Reported: 2018-09-24 08:57 UTC by Maciej Szulik
Modified: 2021-12-10 17:38 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: Default log format for audit was set to json. Consequence: Audit log was always printed using json format. Fix: Allow setting log format as specified in master-config.yaml Result: Audit log contains values per configured log format.
Clone Of: 1631087
Environment:
Last Closed: 2019-01-10 09:04:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:0024 0 None None None 2019-01-10 09:04:07 UTC

Comment 1 Maciej Szulik 2018-09-24 08:59:36 UTC
Fix in https://github.com/openshift/origin/pull/21080

Comment 2 ge liu 2018-10-15 04:56:41 UTC
Fail to verify it with:openshift v3.11.22

Comment 3 Maciej Szulik 2018-10-15 10:22:01 UTC
Geliu I assume your failure is the one from https://bugzilla.redhat.com/show_bug.cgi?id=1631087#c4 so here the same applies, you need to set logFormat explicitly to get different log format.

Comment 4 ge liu 2018-10-15 11:22:27 UTC
Verified with ocp:

openshift v3.11.22

master-config.yaml:
auditConfig:
  auditFilePath: "/etc/origin/master/1audit-ocp.log"
  logFormat: legacy
  enabled: true
  maximumFileRetentionDays: 10
  maximumFileSizeMegabytes: 10
  maximumRetainedFiles: 10


2018-10-15T11:16:23.021652741Z AUDIT: id="f3200303-682c-4432-8bfc-30454f2c2d4f" stage="RequestReceived" ip="172.18.4.154" method="get" user="system:node:ip-172-18-4-154.ec2.internal" groups="\"system:nodes\",\"system:authenticated\"" as="<self>" asgroups="<lookup>" namespace="openshift-template-service-broker" uri="/api/v1/namespaces/openshift-template-service-broker/secrets/apiserver-token-85jvh?resourceVersion=0" response="<deferred>"

Comment 5 openshift-github-bot 2018-10-15 21:59:14 UTC
Commit pushed to master at https://github.com/openshift/origin

https://github.com/openshift/origin/commit/68ebf68ac76e43a5a05490d252810b7682329906
Bug 1632155 - Accept logFormat when passed to audit config

Comment 6 ge liu 2018-10-16 08:15:48 UTC
File a new doc bug to trace the doc issue: 
https://bugzilla.redhat.com/show_bug.cgi?id=1639607

Comment 8 errata-xmlrpc 2019-01-10 09:04:01 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:0024


Note You need to log in before you can comment on or make changes to this bug.