Uploaded image for project: 'Couchbase Kubernetes'
  1. Couchbase Kubernetes
  2. K8S-2227

Redact unstructured `log` field

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Minor
    • 2.3.0
    • None
    • logging
    • None
    • 1

    Description

      Based on some investigation work for a separate request, we should make sure we also include the unstructured fallback of `log` in the list of fields to redact: https://github.com/couchbase/couchbase-fluent-bit/blob/main/redaction/redaction.lua#L33 

      This could potentially we used to output a full redacted file line by line then with no parsing.

      It's not recommended as a file transfer mechanism really but it can be done, an example based on the current redaction test: https://github.com/couchbase/couchbase-fluent-bit/blob/main/test/test-redaction.conf 

      This will read a file line-by-line with no parsing so default to using a `log` field for the whole line then we redact that field and write it out to a file as-is: https://link.calyptia.com/7gi

       

      [SERVICE]
          flush        1
          grace        2
          log_level    debug
          parsers_file /fluent-bit/etc/parsers.conf
      [INPUT]
          Name tail
          Path /fluent-bit/test/redaction.example
          Read_from_head On
          Tag couchbase.redact.test
      [FILTER]
          Name    lua
          Match   couchbase.redact.*
          script  /fluent-bit/etc/redaction.lua
          call    cb_sub_message
      [OUTPUT]
          name file
          path /tmp
          file test.out 
          format template
          template {log}
          match *
      

       

       

      Attachments

        Activity

          People

            patrick.stephens Patrick Stephens (Inactive)
            patrick.stephens Patrick Stephens (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              PagerDuty