Skip to content

Incorrect policy instance deleted when multiple identical policies attached to an operation #4057

@NethmiRanasinghe

Description

@NethmiRanasinghe

Description

When the same policy (e.g., Add Header) is attached multiple times to an API operation with different configurations (e.g., different header names), deleting one instance of the policy does not remove the correct one. Instead, a different instance is deleted.

Steps to Reproduce

  1. In the Pizzashack API, navigate to Policies → Operation Level Policies.
  2. Attach two Add Header policies to the response flow of /order operation, with header names header1, header2.
  3. Delete the last attached policy (i.e., the one with header2).
  4. Invoke the /order operation and observe the response headers.

Expected behavior is that the response includes only header1. However, the actual result shows header2 in the response.

Version

4.2.0

Environment Details (with versions)

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions