Skip to content

Banner wording when a change only closes access #471

Open

Description

@SamikaPerera

Follow-up from my review of #405, answering Ankeet's question there about the banner wording.

What the propose pane says today

When a proposed change has a high-severity finding, the propose pane shows a banner. web/static/app.js:1903-1909 picks one of two fixed sentences, based on result.opens_access (:1877). ai/propose.py:523-525 sets opens_access only when every high-severity finding has direction "opening".

So a change whose high-severity findings all CLOSE access, for example one that blocks traffic a policy requirement says must be allowed, gets:

This change has a serious effect that is not simply opening access. Read the simulated impact below before applying it.

The answer text under it, from ai/propose.py:544-548, says the same thing:

Warning: simulating this change has a serious effect that is not simply opening access -- see the impact list for exactly what changed.

Measured on #405's head (08733c9) with the real propose_change() (Batfish and change impact stubbed as in tests/test_propose.py), rendered through the real app.js:

High-severity findings opens_access Banner
all closing (one or two) false "serious effect that is not simply opening access"
closing and changed false the same
changed only false the same
opening and closing false the same
opening only true "This change opens access that is currently blocked"

Why this is vague

"Not simply opening access" says what the change is not, not what it does. For a change that only closes access, it can read as if the change might open something too. As Arsh pointed out on #405, a high-severity closing can only be a breached policy requirement, because filter and reachability closings are rated medium (analysis/change_impact.py:133, used at :269 and :324; a breached policy rule carries its own violation_severity at :478). So when every high finding is closing, the pane could say what is actually happening.

A suggestion, not a decision

For the case where every high-severity finding is closing, something like:

This change blocks traffic your policy says must be allowed. Read the simulated impact below before applying it.

The mixed cases and changed would keep the current sentence. I'd like the team to agree the exact wording before it changes, because this is a product-wording call, not a correctness fix.

Is the banner the only place?

No. The same opening/not-opening split also decides:

  • the banner, web/static/app.js:1903-1909 (mine);
  • the answer sentence, ai/propose.py:538-548 (Ankeet's), shown directly under the banner;
  • in the impact list under them, each change-impact finding's evidence (analysis/change_impact.py:488, Shubham's), which says Direction: {direction} in that module's own words, e.g. "tightening" for a breached requirement. That wording is what A-5 on Propose-a-change reads the staged policy, and the warning names the real direction (#402) #405 is about.

The full-scan answer (ai/propose.py:713-717) and the reports in analysis/report.py have no opening/closing wording.

Where the code is

All of the above is on #405's branch and reaches main when #405 merges. web/static/app.js is mine. If the wording is agreed, I will change the banner after #405 merges. The answer sentence in ai/propose.py would need Ankeet, so the two say the same thing.

Not checked

  • The banner in a browser (only the Node render harness, with the real app.js).
  • A live closing-only proposal against real Batfish. The findings above were stubbed with the test helpers.
  • The Direction: evidence sentence on screen for a real closing finding (read from the code only).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions