clutch icon indicating copy to clipboard operation
clutch copied to clipboard

Docs describe invalid filter for Audit functionality

Open Takadimi opened this issue 3 years ago • 2 comments

Description

It looks like at one point Config filters were set and functional on the clutch.service.audit service itself and were removed? https://github.com/lyft/clutch/commit/91bfa4a6381c96e5055cdfe061f09d2b67fcec25#diff-037973d02534a9e92ba9793dbb13e9f9c740d4d0af1bbbd3a237422e4a01fbe5L46

Expected Behavior

Either the docs are updated to reflect that only sink based filters are acceptable, or the code is updated such that filters can be applied again at the top level of the audit service.

Actual Behavior

The only request filters I'm able to leverage currently are on the sinks themselves, like so:

services:
  - name: clutch.service.audit.sink.logger
    typed_config:
      "@type": types.google.com/clutch.config.service.audit.v1.SinkConfig
      filter:
        denylist: true
        rules:
          - field: METHOD
            text: SomeRequest

The docs, however, give an example with this filter set, but in my attempts to leverage it it was never applied.

Screenshot From Docs

image

Version Latest commit (b5d8b0147bd34c3535157e8fd537f77d93a53228) from March 15th, 2021.

Takadimi avatar Mar 15 '21 21:03 Takadimi

Happy to fork and help make whatever update would be most desirable, just figured I'd open the issue first and get feedback. Thanks!

Takadimi avatar Mar 15 '21 21:03 Takadimi

Good catch! Sorry we haven't responded sooner, this issue slipped through the cracks somehow. We would welcome a fix for this in the docs.

I believe it should read:

      sinks:
        - clutch.service.audit.sink.logger

Instead of:

      sinks:
        - clutch.service.audit.sink.slack

Here's one of our internal test configs as an example

  - name: clutch.service.audit.sink.logger
  - name: clutch.service.audit
    typed_config:
      "@type": types.google.com/clutch.config.service.audit.v1.Config
      in_memory: true
      sinks:
        - clutch.service.audit.sink.logger
      filter:
        denylist: true
        rules:
            - field: METHOD
              text: Healthcheck

danielhochman avatar Apr 01 '21 19:04 danielhochman