Skip to content

Commit

Permalink
move to plugin (#2407)
Browse files Browse the repository at this point in the history
* feat: change routes to core

* feat: update core

* feat: update core

* feat: update core

* fix: bugs in controls

* fix: cards

* feat: update core

* fix: fix nil pointer exception

* fix: update views and queries structure

* fix: update views and queries structure

* fix: fix migrator

* feat: update database images

* fix: add logs to enqueue describe jobs

* Update LICENSE.md

* Update LICENSE.md

* Update LICENSE.md

* fix: update max concurrent calls for describers

* fix: fix getting job report

* fix: increase compliance quick job timeout time

* fix: get policy ref

* fix: get policy parameters

* Create license/faq.md

* faet: update footer

* fix: footer text

* fix: reduce queued jobs limit

* Update LICENSE.md

* Update LICENSE.md

* Update LICENSE.md

* Update LICENSE.md

* Update LICENSE.md

* fix: fix platform plugin

* fix: use control id in defining query params

* fix: resolve control_id conflict in setting query parameter

* feat: fix bugs related to parameters change

* feat: add control id to query parameters

* fix: control id in set function query parameters

* fix: add description to integration file handling

* fix: reduce queued jobs limit

* fix: add keyRegex to get parameters

* feat: add regex to parameters

* fix: add googleworkspace steampipe plugin

* fix: add default global values to policy parameters

* fix: fix views

* fix: integrations list in framework run history

* fix: add more details to api responses

* fix: add list and get policies

* fix: remove importing query parameters from file

* fix: update core db backup

* fix: fix list query params api

* fix: parse dfault parameters values

* feat: refactor into modular

* feat: refactor for service call instead of direct code call

* fix: docker file

* fix: config

---------

Co-authored-by: Mohamad Choupan <[email protected]>
Co-authored-by: Mohamad Choupan <[email protected]>
Co-authored-by: artaasadi <[email protected]>
Co-authored-by: arta asadi <[email protected]>
Co-authored-by: Anil Chandra <[email protected]>
  • Loading branch information
6 people authored Jan 10, 2025
1 parent 7bdebe8 commit 7946c27
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 11 deletions.
4 changes: 2 additions & 2 deletions jobs/compliance-quick-run-job/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type Config struct {
NATS config.NATS
Compliance config.OpenGovernanceService
Core config.OpenGovernanceService
Onboard config.OpenGovernanceService
Integration config.OpenGovernanceService
EsSink config.OpenGovernanceService
Steampipe config.Postgres
}
Expand All @@ -54,7 +54,7 @@ func NewWorker(
logger *zap.Logger,
ctx context.Context,
) (*Worker, error) {
integrationClient := client.NewIntegrationServiceClient(config.Onboard.BaseURL)
integrationClient := client.NewIntegrationServiceClient(config.Integration.BaseURL)

httpCtx := httpclient.Context{Ctx: ctx, UserRole: authApi.ViewerRole}

Expand Down
4 changes: 2 additions & 2 deletions jobs/compliance-runner-job/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type Config struct {
ElasticSearch config.ElasticSearch
NATS config.NATS
Compliance config.OpenGovernanceService
Onboard config.OpenGovernanceService
Integration config.OpenGovernanceService
Inventory config.OpenGovernanceService
Core config.OpenGovernanceService
EsSink config.OpenGovernanceService
Expand Down Expand Up @@ -61,7 +61,7 @@ func NewWorker(
prometheusPushAddress string,
ctx context.Context,
) (*Worker, error) {
integrationClient := client.NewIntegrationServiceClient(config.Onboard.BaseURL)
integrationClient := client.NewIntegrationServiceClient(config.Integration.BaseURL)

httpCtx := httpclient.Context{Ctx: ctx, UserRole: api.ViewerRole}

Expand Down
4 changes: 2 additions & 2 deletions jobs/query-runner-job/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type Config struct {
ElasticSearch config.ElasticSearch
NATS config.NATS
Compliance config.OpenGovernanceService
Onboard config.OpenGovernanceService
Integration config.OpenGovernanceService
Core config.OpenGovernanceService
EsSink config.OpenGovernanceService
Steampipe config.Postgres
Expand All @@ -54,7 +54,7 @@ func NewWorker(
prometheusPushAddress string,
ctx context.Context,
) (*Worker, error) {
integrationClient := client.NewIntegrationServiceClient(config.Onboard.BaseURL)
integrationClient := client.NewIntegrationServiceClient(config.Integration.BaseURL)

httpCtx := httpclient.Context{Ctx: ctx, UserRole: api.ViewerRole}

Expand Down
5 changes: 2 additions & 3 deletions jobs/query-validator-job/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ type Config struct {
ElasticSearch config.ElasticSearch
NATS config.NATS
Compliance config.OpenGovernanceService
Onboard config.OpenGovernanceService
Integration config.OpenGovernanceService
Inventory config.OpenGovernanceService
Core config.OpenGovernanceService
EsSink config.OpenGovernanceService
Expand All @@ -44,8 +44,7 @@ func NewWorker(
logger *zap.Logger,
ctx context.Context,
) (*Worker, error) {

integrationClient := client.NewIntegrationServiceClient(config.Onboard.BaseURL)
integrationClient := client.NewIntegrationServiceClient(config.Integration.BaseURL)

httpCtx := httpclient.Context{Ctx: ctx, UserRole: authApi.ViewerRole}

Expand Down
2 changes: 1 addition & 1 deletion services/scheduler/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type SchedulerConfig struct {
ComplianceIntervalHours int `yaml:"compliance_interval_hours"`
ServerlessProvider string `yaml:"serverless_provider"`
ElasticSearch config.ElasticSearch
Onboard config.OpenGovernanceService
Integration config.OpenGovernanceService
NATS config.NATS
Vault vault.Config `yaml:"vault" koanf:"vault"`
QueryValidatorEnabled string `yaml:"query_validator_enabled" koanf:"query_validator_enabled"`
Expand Down
2 changes: 1 addition & 1 deletion services/scheduler/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ func InitializeScheduler(
}

s.conf = conf
s.integrationClient = integrationClient.NewIntegrationServiceClient(IntegrationBaseURL)

cfg := postgres.Config{
Host: postgresHost,
Expand Down Expand Up @@ -259,7 +260,6 @@ func InitializeScheduler(

s.coreClient = coreClient.NewCoreServiceClient(CoreBaseURL)
s.complianceClient = client.NewComplianceClient(ComplianceBaseURL)
s.integrationClient = integrationClient.NewIntegrationServiceClient(IntegrationBaseURL)
s.sinkClient = esSinkClient.NewEsSinkServiceClient(s.logger, EsSinkBaseURL)
authGRPCConn, err := grpc.NewClient(AuthGRPCURI, grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{InsecureSkipVerify: true})))
if err != nil {
Expand Down

0 comments on commit 7946c27

Please sign in to comment.