Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal on better exception handling #1376

Merged
merged 7 commits into from
Jan 8, 2021

Commits on Nov 9, 2020

  1. Proposal on better exception handling

    This proposes adding exceptions as a first class object to falco rules
    files.
    
    It adds a new key "exceptions" to rule objects that allows a rule
    writer to define tuples of field names that comprise an exception, and a
    new top level object "exception" that contains lists of tuples of field
    values that define exceptions to rules.
    
    Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
    mstemm committed Nov 9, 2020
    Configuration menu
    Copy the full SHA
    06ce36a View commit details
    Browse the repository at this point in the history
  2. Address feedback

    - Clean up npm examples so they are valid.
    - Small punctuation changes.
    - Emphasize that the strings related to field values are arbitrary.
    - Emphasize that exceptions only use equality matching.
    - Emphasize that you'll need to upgrade falco to use these new features.
    - Capitalize Falco everywhere.
    - Change language related to backwards compatibility.
    
    Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
    mstemm committed Nov 9, 2020
    Configuration menu
    Copy the full SHA
    aec0761 View commit details
    Browse the repository at this point in the history
  3. Add notion of exception operators

    A rule exception can now have a comps property that allows fields to be
    matched against items using an operator of =. If not defined, equality
    is implied.
    
    Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
    mstemm committed Nov 9, 2020
    Configuration menu
    Copy the full SHA
    b63f085 View commit details
    Browse the repository at this point in the history
  4. Use well-defined object keys

    Instead of oveloading the exception item name as the key of the object,
    just have a flat array of object with a name property.
    
    A bit more verbose, but makes it easier to understand what the schema is.
    
    Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
    mstemm committed Nov 9, 2020
    Configuration menu
    Copy the full SHA
    2f0e9a7 View commit details
    Browse the repository at this point in the history
  5. Add notes on single-field exceptions

    If an exception item has a single value for fields, all the values are
    combined together into a single set to build an expression field
    cmp (val1, val2, ...)
    
    Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
    mstemm committed Nov 9, 2020
    Configuration menu
    Copy the full SHA
    f5d37fb View commit details
    Browse the repository at this point in the history

Commits on Nov 11, 2020

  1. docs(proposals/20200828-structured-exception-handling): highlight syntax

    Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
    leogr committed Nov 11, 2020
    Configuration menu
    Copy the full SHA
    01711cc View commit details
    Browse the repository at this point in the history
  2. docs(proposals/20200828-structured-exception-handling): indentation

    Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
    leogr committed Nov 11, 2020
    Configuration menu
    Copy the full SHA
    8dc1f0a View commit details
    Browse the repository at this point in the history