lyft / clutch

Extensible platform for infrastructure management

Home Page:https://clutch.sh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docs describe invalid filter for Audit functionality

Takadimi opened this issue · comments

Description

It looks like at one point Config filters were set and functional on the clutch.service.audit service itself and were removed? 91bfa4a#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 (b5d8b01) from March 15th, 2021.

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

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