Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config: starts the server, loads and parse the config into the db #73

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ashwiniag
Copy link
Member

@ashwiniag ashwiniag commented Dec 30, 2024

closes: #75

Introduces

  • starts the API server and loads the config which is then parsed and fed into the db at start of the server.
  • maintains two separate connection i.e one for configDB and one for API calls. Once the populating the contents from config to db is done, its connection is closed
  • updates the existing entries instead of recreating when config is reloaded maintaining idempotency.

Thoughts: Why using separate connection?

  • The tool is going to have high traffic on the API server. We would like to have stability and high uptime of API server
  • Configuration updates aren't going to be that often.
  • More control on any specificity features we want to implement on configs like - dynamic reloading of config and parsing.

Post populating via config
Screenshot 2024-12-30 at 2 32 54 PM

and API calls rendering

Screenshot 2024-12-30 at 2 33 43 PM

Note
Right now this call talks to DB directly for initialisation and feeding

ashwiniag and others added 4 commits December 30, 2024 13:50
… reports (#90)

* adds logic to register the agent and poll

* adds field scanner in policies

* adds field scanner in scans tables and updates test cases across

* adds foreign key integrationID to table scans and updates test cases

* adds field scanner in config yaml and supporting logic, adds enum for status fields

* adds field scanner in config yaml and supporting logic, adds enum for status fields

* updates logic to add an image:tag string in scans.image and integrationID in scans.integrationsID rendering its value using policy.image.registery which is equivalent to integrations.name

* fix executing of migration just once at the start of config loads

* restructure code for v0

* updates the get list call logic i.e orders by created_at ASC and adds its test case

* modularizing registries like dockerhub, gcr

* updates scan.Report logic to hold the json result of scanner

* modularizes the scanner tools

* modularizes the scanner tools

* some todo

* updates the get call to query by status

* updates the CRUD to use pointers as  certain fields are optional or conditionally updated

* agent implementation workflow

* assigner: implements task assignment for scans and dummy mock test (#95)

* updates the get call of scan to query by status

* updates the GET call of agents to query by status

* updates the GET call of agents to query by status or scan_id

* adds task assignment logic

* adds task assignment logic

* fix lints

* fix lints
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

config: loading -> parsing -> feed to database
1 participant