Skip to content

Creating a new firewall rule with the same name overwrites original #2220

Closed

Description

@benjaminleonard

Tested on both the mock API and colo.

A side effect that we work with the entire firewall rules object rather than individual rules in the API. We should prevent the user from creating a new rule with a duplicate name.

This does strike me as another downside to the current API, requiring extra logic on the client like this.

Activity

  1. added this to the 9 milestone on May 6, 2024
  2. david-crespo commented on Jun 26, 2024

    @david-crespo
    Collaborator

    As my 2 year old TODO comment says, I think we should error or at least require confirmation when you try to create a rule with the same name as an existing one. If we're going to block it entirely, it would be nice to error immediately on blur so the user doesn't have to fill out the whole rule before they find out they need to switch to the edit form. Another important point is that we also need to warn/block/confirm on the edit form if the user edits rule A and changes the name to that of existing rule B.

    // TODO: this silently overwrites existing rules with the current name.
    // we should probably at least warn and confirm, if not reject as invalid
    const otherRules = existingRules
    .filter((r) => r.name !== values.name)
    .map(firewallRuleGetToPut)

  3. removed their assignment
    on Jul 2, 2024
  4. modified the milestones: 9, 10 on Jul 9, 2024
  5. self-assigned this
    on Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions