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

new: Add interactive firewall rule editor plugin #294

Merged
merged 7 commits into from
Nov 29, 2022

Commits on Mar 31, 2022

  1. Proposal: Interactive firewall rule editor

    This relates to #293
    
    After discussing with the firewall team, it seems like automated
    inserting of individual firewall rules isn't a great idea; the rules are
    applied immediately as changes are made, and since these rules are
    applied in order, with the first matching rule being acted on, it's easy
    to accidentally set up an insecure configuration.  To make matters
    worse, there is no good way to identify a single rule from the response;
    labels are not required and don't have to be unique, and no other
    reasonable choice for an identifier is present.  As such, automated
    systems that manage firewall rules should, for that reason, regenerate
    the entire ruleset for each update; for applications that want to modify
    the existing rules, they should follow a fetch-update-publish model.
    
    This PR is an attempt at the latter for the CLI; a plugin that allows
    interactive editing of firewall rules.  This is by no means perfect -
    there are still several TODOs in the code, and it could generally be
    cleaner - but it should serve as an example of what we might want.o
    
    The interface looks this like:
    
    ```
    Firewall: example       Status: enabled
    Inbound Policy: DROP      Outbound Policy: DROP
    
    Inbound Rules:
     ind | label | protocol | action | ports | addresses
    -----+-------+----------+--------+-------+-------------------
     0   |       | TCP      | ACCEPT | 80    | 192.168.12.34/32
     1   |       | TCP      | ACCEPT |       | 12.34.56.0/24
    
    Outbound Rules:
     ind | label | protocol | action | ports | addresses
    -----+-------+----------+--------+-------+---------------
     2   | test  | UDP      | ACCEPT |       | 12.34.56.0/24
    
    Global: Toggle [I]nbound or [O]utbound Policy
    Rules: [A]dd, [R]emove, or [S]wap
    [W]rtie settings or [Q]uit
    Saving..
    Rules updated successfully!
    ```
    
    Feedback appreciated
    Dorthu committed Mar 31, 2022
    Configuration menu
    Copy the full SHA
    91ace48 View commit details
    Browse the repository at this point in the history

Commits on Nov 18, 2022

  1. Merge branch 'master' of github.com:linode/linode-cli into feature/in…

    …teractive-firewall-plugin
    lgarber-akamai committed Nov 18, 2022
    Configuration menu
    Copy the full SHA
    7e94b7c View commit details
    Browse the repository at this point in the history

Commits on Nov 21, 2022

  1. Configuration menu
    Copy the full SHA
    1fb230a View commit details
    Browse the repository at this point in the history
  2. Change column title

    lgarber-akamai committed Nov 21, 2022
    Configuration menu
    Copy the full SHA
    341fe1b View commit details
    Browse the repository at this point in the history
  3. Change plugin name

    lgarber-akamai committed Nov 21, 2022
    Configuration menu
    Copy the full SHA
    0cada6a View commit details
    Browse the repository at this point in the history
  4. Re-add policy editor

    lgarber-akamai committed Nov 21, 2022
    Configuration menu
    Copy the full SHA
    3c9c530 View commit details
    Browse the repository at this point in the history
  5. Fix address split

    lgarber-akamai committed Nov 21, 2022
    Configuration menu
    Copy the full SHA
    2d24a03 View commit details
    Browse the repository at this point in the history