diff --git a/backend/go-app/main.go b/backend/go-app/main.go index 59a4ce31..7ce1309c 100755 --- a/backend/go-app/main.go +++ b/backend/go-app/main.go @@ -5213,6 +5213,7 @@ func initHandlers() { //r.HandleFunc("/api/v1/orgs/", shuffle.HandleGetOrgs).Methods("GET", "OPTIONS") r.HandleFunc("/api/v1/orgs/{orgId}", shuffle.HandleGetOrg).Methods("GET", "OPTIONS") r.HandleFunc("/api/v1/orgs/{orgId}", shuffle.HandleEditOrg).Methods("POST", "OPTIONS") + r.HandleFunc("/api/v1/orgs/{orgid}/forms", shuffle.HandleGetOrgForms).Methods("GET", "OPTIONS") r.HandleFunc("/api/v1/orgs/{orgId}/create_sub_org", shuffle.HandleCreateSubOrg).Methods("POST", "OPTIONS") r.HandleFunc("/api/v1/orgs/{orgId}/change", shuffle.HandleChangeUserOrg).Methods("POST", "OPTIONS") // Swaps to the org @@ -5270,7 +5271,7 @@ func initHandlers() { // This is weird. r.HandleFunc("/api/v1/detections/{fileId}/{action}", shuffle.HandleToggleRule).Methods("PUT", "OPTIONS") - r.HandleFunc("/api/v1/detections/siem/node_health", shuffle.HandleTenzirHealthUpdate).Methods("POST","OPTIONS") + //r.HandleFunc("/api/v1/detections/siem/node_health", shuffle.HandleTenzirHealthUpdate).Methods("POST","OPTIONS") // Introduced in 0.9.21 to handle notifications for e.g. failed Workflow diff --git a/backend/go-app/walkoff.go b/backend/go-app/walkoff.go index 1fa52bce..7b8008ce 100755 --- a/backend/go-app/walkoff.go +++ b/backend/go-app/walkoff.go @@ -971,7 +971,7 @@ func deleteWorkflow(resp http.ResponseWriter, request *http.Request) { // Find cookies and append them to request.Header to replicate current request as closely as possible for _, childWorkflow := range childWorkflows { - if childWorkflow.Id == workflow.ID { + if childWorkflow.ID == workflow.ID { continue } @@ -2442,7 +2442,7 @@ func scheduleWorkflow(resp http.ResponseWriter, request *http.Request) { return } - workflow.Schedules = append(workflow.Schedules, schedule) + //workflow.Schedules = append(workflow.Schedules, schedule) err = shuffle.SetWorkflow(ctx, *workflow, workflow.ID) if err != nil { log.Printf("Failed setting workflow for schedule: %s", err) @@ -3410,7 +3410,15 @@ func executeSingleAction(resp http.ResponseWriter, request *http.Request) { } ctx := context.Background() - workflowExecution, err := shuffle.PrepareSingleAction(ctx, user, fileId, body) + + runValidationAction := false + query := request.URL.Query() + validation, ok := query["validation"] + if ok && validation[0] == "true" { + runValidationAction = true + } + + workflowExecution, err := shuffle.PrepareSingleAction(ctx, user, fileId, body, runValidationAction) if err != nil { log.Printf("[INFO] Failed workflowrequest POST read: %s", err) resp.WriteHeader(401) diff --git a/docker-compose.yml b/docker-compose.yml index 65a60ce4..64155cc9 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -62,7 +62,6 @@ services: image: opensearchproject/opensearch:2.14.0 hostname: shuffle-opensearch container_name: shuffle-opensearch - env_file: .env environment: - "OPENSEARCH_JAVA_OPTS=-Xms2048m -Xmx2048m" # minimum and maximum Java heap size, recommend setting both to 50% of system RAM - bootstrap.memory_lock=true @@ -73,6 +72,7 @@ services: - node.name=shuffle-opensearch - node.store.allow_mmap=false - discovery.seed_hosts=shuffle-opensearch + - OPENSEARCH_INITIAL_ADMIN_PASSWORD=${SHUFFLE_OPENSEARCH_PASSWORD} ulimits: memlock: soft: -1