PUT /policy_groups/GROUP/policies/NAME does not check if policy is the same
Open
Nobody has claimed this yet.
Status: To be prioritized
Triage: Feature Request
- Dominant language
- Erlang
- Stars
- 303
- Forks
- 211
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 5
Description
If you do the following:
PUT /policy_groups/a/policies/p
{
"name": "p",
"revision_id": "1.0.0",
"cookbook_locks": {},
"run_list": []
}
And then do this:
PUT /policy_groups/b/policies/p
{
"name": "p",
"revision_id": "1.0.0",
"cookbook_locks": {},
"run_list": [ "mycookbook" ]
}
The policy endpoint silently ignores the input to the second PUT. It should 409 and let me know that the policy will not be exactly what I thought it would.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the PUT /policy_groups/GROUP/policies/NAME endpoint and reproduce the two requests from the issue. Confirm that changing the policy group with conflicting policy content returns HTTP 409 and explains that the policy cannot match the requested input.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- erlang
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100