Skip to content

Available prefixes endpoint use parent prefix permissions on POST #5841

@Dimaqa

Description

@Dimaqa

Environment

  • Python version: 3.6.9
  • NetBox version: 2.10.3

Steps to Reproduce

  1. Create permission allowing to add only reserved prefixes
  2. Create reserved prefix
  3. POST on /ipam/prefixes/{created_prefix_id}/available-prefixes/
  4. Returned prefix will have active status

Also you can do this:

  1. Create permission allowing to add only reserved prefixes
  2. Create active prefix
  3. POST on /ipam/prefixes/{created_prefix_id}/available-prefixes/ with body {"status" : "reserved"}
  4. API will return 404 NOT FOUND error

Expected Behavior

In the first case api should return permission error.
In the second create reserved child prefix.

Observed Behavior

We can get around add permissions using parent prefixes.

Metadata

Metadata

Assignees

Labels

status: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions