Closed Youngestdev closed 2 years ago
I see this has been already merged but it looks like the tinydb dependency is not declared in the poetry configuration file
I see this has been already merged but it looks like the tinydb dependency is not declared in the poetry configuration file
I'll add that. Thanks for pointing that out, @francbartoli
@Youngestdev please make the update, so I can pull.
Goal
The TinyDB database is used to add persistence and enable the API to track changes made to the policy stored as a JSON file.
Commits and changes
Route updates
Workings.
A policy is created by sending a request to the API:
The request above creates a policy stored in the database and then published to the repository.
The fields to be changed are updated to update a policy, and another request is sent to the UPDATE route. The rego file is updated and then published to the GitHub repository. See:
A successful response is returned to confirm the operation status:
The repo has been updated as well - Updated file
To retrieve a policy, a request is sent to the
/policy/{name_of_ploicy}
route:If the policy exists, it is returned otherwise,
null
is returned:A request is sent to
/policy/{name}
:A successful response returns the state of the request:
Todo
DELETE
route to remove the policy from the repository.