diff --git a/backend/go-app/main.go b/backend/go-app/main.go index 9447c1cb..3c9f86ed 100644 --- a/backend/go-app/main.go +++ b/backend/go-app/main.go @@ -1265,7 +1265,7 @@ func checkAdminLogin(resp http.ResponseWriter, request *http.Request) { } if len(org.SSOConfig.SSOEntrypoint) > 0 { - log.Printf("[DEBUG] Found SAML SSO url") + log.Printf("[DEBUG] Found SAML SSO url: %s", org.SSOConfig.SSOEntrypoint) baseSSOUrl = org.SSOConfig.SSOEntrypoint break } diff --git a/backend/tests/files.sh b/backend/tests/files.sh index 71776148..76ab54cf 100755 --- a/backend/tests/files.sh +++ b/backend/tests/files.sh @@ -3,7 +3,7 @@ #curl http://localhost:5001/api/v1/files/create -H "Authorization: Bearer db0373c6-1083-4dec-a05d-3ba73f02ccd4" -d '{"filename": "file.txt", "org_id": "b199646b-16d2-456d-9fd6-b9972e929466", "workflow_id": "global"}' # #echo -curl http://localhost:5001/api/v1/apps/upload -H "Authorization: Bearer db0373c6-1083-4dec-a05d-3ba73f02ccd4" -F 'shuffle_file=@files.sh' +#curl http://localhost:5001/api/v1/apps/upload -H "Authorization: Bearer db0373c6-1083-4dec-a05d-3ba73f02ccd4" -F 'shuffle_file=@files.sh' # #curl http://localhost:5001/api/v1/files/1915981b-b897-4db1-8a2e-44bc34cead3b/content -H "Authorization: Bearer db0373c6-1083-4dec-a05d-3ba73f02ccd4" #curl http://localhost:5001/api/v1/files/e19cffe4-e2da-47e9-809e-904f5cb03687 -H "Authorization: Bearer db0373c6-1083-4dec-a05d-3ba73f02ccd4" @@ -16,7 +16,7 @@ curl http://localhost:5001/api/v1/apps/upload -H "Authorization: Bearer db0373c6 #r.HandleFunc("/api/v1/files/{fileId}", handleDeleteFile).Methods("DELETE", "OPTIONS") -#curl http://localhost:5001/api/v1/files/create -H "Authorization: Bearer c5b4c827-65ec-47f4-9e8a-234cdba38959" -d '{"filename": "rule2.yar", "org_id": "b4e88fe9-352b-47b4-b280-960181670acf", "workflow_id": "global", "namespace": "yara"}' -#curl http://localhost:5001/api/v1/files/5cb941ad-fa1c-4444-a685-92024b1fa31c/upload -H "Authorization: Bearer c5b4c827-65ec-47f4-9e8a-234cdba38959" -F 'shuffle_file=@upload.sh' +#curl http://localhost:5001/api/v1/files/create -H "Authorization: Bearer 09627dcb-7e2a-4843-819b-417d268ff840" -d '{"filename": "rule2.yar", "org_id": "11f67b76-6051-4425-b0d6-be23daac6d12", "workflow_id": "global", "namespace": "yara"}' +curl http://localhost:5001/api/v1/files/file_366ee8d2-1af6-4270-8639-213af30b4a29/upload -H "Authorization: Bearer 09627dcb-7e2a-4843-819b-417d268ff840" -F 'shuffle_file=@upload.sh' #curl http://localhost:5001/api/v1/files/namespaces/yara -H "Authorization: Bearer c5b4c827-65ec-47f4-9e8a-234cdba38959" --output rules.zip diff --git a/docker-compose.yml b/docker-compose.yml index 973e295b..27d8e095 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,121 +1,121 @@ version: '3' services: - #frontend: - # #build: ./frontend - # image: ghcr.io/frikky/shuffle-frontend:nightly - # container_name: shuffle-frontend - # hostname: shuffle-frontend - # ports: - # - "${FRONTEND_PORT}:80" - # - "${FRONTEND_PORT_HTTPS}:443" - # networks: - # - shuffle - # environment: - # - BACKEND_HOSTNAME=${BACKEND_HOSTNAME} - # restart: unless-stopped - # depends_on: - # - backend - #backend: - # #build: ./backend - # image: ghcr.io/frikky/shuffle-backend:nightly - # container_name: shuffle-backend - # hostname: ${BACKEND_HOSTNAME} - # # Here for debugging: - # ports: - # - "${BACKEND_PORT}:5001" - # networks: - # - shuffle - # volumes: - # - /var/run/docker.sock:/var/run/docker.sock - # - ${SHUFFLE_APP_HOTLOAD_LOCATION}:/shuffle-apps:z - # - ${SHUFFLE_FILE_LOCATION}:/shuffle-files:z - # #- ${SHUFFLE_OPENSEARCH_CERTIFICATE_FILE}:/shuffle-files/es_certificate - # env_file: .env - # environment: - # - SHUFFLE_APP_HOTLOAD_FOLDER=/shuffle-apps - # - SHUFFLE_FILE_LOCATION=/shuffle-files - # restart: unless-stopped - # #depends_on: - # #- opensearch #Not necessary because dependancy is handled within the backend itself instead - # #- database - #orborus: - # image: ghcr.io/frikky/shuffle-orborus:latest - # container_name: shuffle-orborus - # hostname: shuffle-orborus - # networks: - # - shuffle - # volumes: - # - /var/run/docker.sock:/var/run/docker.sock - # environment: - # - SHUFFLE_WORKER_VERSION=latest - # - ENVIRONMENT_NAME=${ENVIRONMENT_NAME} - # - BASE_URL=http://${OUTER_HOSTNAME}:5001 - # - DOCKER_API_VERSION=1.40 - # - SHUFFLE_BASE_IMAGE_NAME=${SHUFFLE_BASE_IMAGE_NAME} - # - SHUFFLE_BASE_IMAGE_REGISTRY=${SHUFFLE_BASE_IMAGE_REGISTRY} - # - SHUFFLE_BASE_IMAGE_TAG_SUFFIX=${SHUFFLE_BASE_IMAGE_TAG_SUFFIX} - # - HTTP_PROXY=${HTTP_PROXY} - # - HTTPS_PROXY=${HTTPS_PROXY} - # - SHUFFLE_PASS_WORKER_PROXY=${SHUFFLE_PASS_WORKER_PROXY} - # - SHUFFLE_PASS_APP_PROXY=${SHUFFLE_PASS_APP_PROXY} - # - SHUFFLE_SWARM_NETWORK_NAME=shuffle_swarm_executions - # - SHUFFLE_SCALE_REPLICAS=1 - # - SHUFFLE_SWARM_CONFIG=runn - # restart: unless-stopped - # security_opt: - # - seccomp:unconfined - #opensearch: - # image: opensearchproject/opensearch:1.2.4 - # hostname: shuffle-opensearch - # container_name: shuffle-opensearch - # environment: - # - bootstrap.memory_lock=true - # - "OPENSEARCH_JAVA_OPTS=-Xms1024m -Xmx1024m" # minimum and maximum Java heap size, recommend setting both to 50% of system RAM - # - cluster.routing.allocation.disk.threshold_enabled=false - # - cluster.name=shuffle-cluster - # - node.name=shuffle-opensearch - # - discovery.seed_hosts=shuffle-opensearch - # - cluster.initial_master_nodes=shuffle-opensearch - # - node.store.allow_mmap=false - # ulimits: - # memlock: - # soft: -1 - # hard: -1 - # nofile: - # soft: 65536 - # hard: 65536 - # volumes: - # - ${DB_LOCATION}:/usr/share/opensearch/data:z - # ports: - # - 9200:9200 - # networks: - # - shuffle - # restart: unless-stopped - docker-socket-proxy: - image: tecnativa/docker-socket-proxy + frontend: + #build: ./frontend + image: ghcr.io/frikky/shuffle-frontend:nightly container_name: shuffle-frontend - privileged: true - environment: - - SERVICES=1 - - TASKS=1 - - NETWORKS=1 - - NODES=1 - - BUILD=1 - - IMAGES=1 - - GRPC=1 - - CONTAINERS=1 - - PLUGINS=1 - - SYSTEM=1 - - VOLUMES=1 - - INFO=1 - - DISTRIBUTION=1 - - POST=1 - - AUTH=1 - - SECRETS=1 - volumes: - - /var/run/docker.sock:/var/run/docker.sock + hostname: shuffle-frontend + ports: + - "${FRONTEND_PORT}:80" + - "${FRONTEND_PORT_HTTPS}:443" networks: - shuffle + environment: + - BACKEND_HOSTNAME=${BACKEND_HOSTNAME} + restart: unless-stopped + depends_on: + - backend + backend: + #build: ./backend + image: ghcr.io/frikky/shuffle-backend:nightly + container_name: shuffle-backend + hostname: ${BACKEND_HOSTNAME} + # Here for debugging: + ports: + - "${BACKEND_PORT}:5001" + networks: + - shuffle + volumes: + - /var/run/docker.sock:/var/run/docker.sock + - ${SHUFFLE_APP_HOTLOAD_LOCATION}:/shuffle-apps:z + - ${SHUFFLE_FILE_LOCATION}:/shuffle-files:z + #- ${SHUFFLE_OPENSEARCH_CERTIFICATE_FILE}:/shuffle-files/es_certificate + env_file: .env + environment: + - SHUFFLE_APP_HOTLOAD_FOLDER=/shuffle-apps + - SHUFFLE_FILE_LOCATION=/shuffle-files + restart: unless-stopped + #depends_on: + #- opensearch #Not necessary because dependancy is handled within the backend itself instead + #- database + orborus: + image: ghcr.io/frikky/shuffle-orborus:latest + container_name: shuffle-orborus + hostname: shuffle-orborus + networks: + - shuffle + volumes: + - /var/run/docker.sock:/var/run/docker.sock + environment: + - SHUFFLE_WORKER_VERSION=latest + - ENVIRONMENT_NAME=${ENVIRONMENT_NAME} + - BASE_URL=http://${OUTER_HOSTNAME}:5001 + - DOCKER_API_VERSION=1.40 + - SHUFFLE_BASE_IMAGE_NAME=${SHUFFLE_BASE_IMAGE_NAME} + - SHUFFLE_BASE_IMAGE_REGISTRY=${SHUFFLE_BASE_IMAGE_REGISTRY} + - SHUFFLE_BASE_IMAGE_TAG_SUFFIX=${SHUFFLE_BASE_IMAGE_TAG_SUFFIX} + - HTTP_PROXY=${HTTP_PROXY} + - HTTPS_PROXY=${HTTPS_PROXY} + - SHUFFLE_PASS_WORKER_PROXY=${SHUFFLE_PASS_WORKER_PROXY} + - SHUFFLE_PASS_APP_PROXY=${SHUFFLE_PASS_APP_PROXY} + - SHUFFLE_SWARM_NETWORK_NAME=shuffle_swarm_executions + - SHUFFLE_SCALE_REPLICAS=1 + - SHUFFLE_SWARM_CONFIG=runn + restart: unless-stopped + security_opt: + - seccomp:unconfined + opensearch: + image: opensearchproject/opensearch:1.3.2 + hostname: shuffle-opensearch + container_name: shuffle-opensearch + environment: + - bootstrap.memory_lock=true + - "OPENSEARCH_JAVA_OPTS=-Xms1024m -Xmx1024m" # minimum and maximum Java heap size, recommend setting both to 50% of system RAM + - cluster.routing.allocation.disk.threshold_enabled=false + - cluster.name=shuffle-cluster + - node.name=shuffle-opensearch + - discovery.seed_hosts=shuffle-opensearch + - cluster.initial_master_nodes=shuffle-opensearch + - node.store.allow_mmap=false + ulimits: + memlock: + soft: -1 + hard: -1 + nofile: + soft: 65536 + hard: 65536 + volumes: + - ${DB_LOCATION}:/usr/share/opensearch/data:z + ports: + - 9200:9200 + networks: + - shuffle + restart: unless-stopped + #docker-socket-proxy: + # image: tecnativa/docker-socket-proxy + # container_name: shuffle-frontend + # privileged: true + # environment: + # - SERVICES=1 + # - TASKS=1 + # - NETWORKS=1 + # - NODES=1 + # - BUILD=1 + # - IMAGES=1 + # - GRPC=1 + # - CONTAINERS=1 + # - PLUGINS=1 + # - SYSTEM=1 + # - VOLUMES=1 + # - INFO=1 + # - DISTRIBUTION=1 + # - POST=1 + # - AUTH=1 + # - SECRETS=1 + # volumes: + # - /var/run/docker.sock:/var/run/docker.sock + # networks: + # - shuffle networks: shuffle: driver: bridge diff --git a/frontend/src/components/OrgHeader.jsx b/frontend/src/components/OrgHeader.jsx index a370af93..922c4118 100644 --- a/frontend/src/components/OrgHeader.jsx +++ b/frontend/src/components/OrgHeader.jsx @@ -690,7 +690,7 @@ const OrgHeader = (props) => { } - {isCloud ? null : + {/*isCloud ? null : */} SAML SSO (v1.1) @@ -769,7 +769,6 @@ const OrgHeader = (props) => { - } {/* {expanded ? diff --git a/frontend/src/views/AngularWorkflow.jsx b/frontend/src/views/AngularWorkflow.jsx index 2a195fe4..45a87c2f 100644 --- a/frontend/src/views/AngularWorkflow.jsx +++ b/frontend/src/views/AngularWorkflow.jsx @@ -1650,7 +1650,7 @@ const AngularWorkflow = (defaultprops) => { } if (responseJson.public) { - alert.info("This workflow is public. Save the workflow to use it in your organization."); + //alert.info("This workflow is public. Save the workflow to use it in your organization."); console.log("RESP: ", responseJson) if (Object.getOwnPropertyNames(creatorProfile).length === 0) { @@ -11004,6 +11004,7 @@ const AngularWorkflow = (defaultprops) => { // + const leftView = workflow.public === true ?
{ This workflow is public and { saveWorkflow() - }}>must be saved to be used in your organization. + }}>must be saved or exported before use. {Object.getOwnPropertyNames(creatorProfile).length !== 0 && creatorProfile.github_avatar !== undefined && creatorProfile.github_avatar !== null ?
@@ -11055,6 +11056,27 @@ const AngularWorkflow = (defaultprops) => {
: null } + + {workflow.blogpost !== undefined && workflow.blogpost !== null && workflow.blogpost.length > 0 ? +
+ + + Related blog & docs + + +
+ : null + } + {appGroup.length > 0 ?
@@ -11071,6 +11093,7 @@ const AngularWorkflow = (defaultprops) => {
: null} + {triggerGroup.length > 0 ?
@@ -11086,6 +11109,7 @@ const AngularWorkflow = (defaultprops) => {
: null} + {/*
Mitre Att&ck:  @@ -11094,6 +11118,8 @@ const AngularWorkflow = (defaultprops) => { TBD
+ */} + {/*
@@ -11104,16 +11130,70 @@ const AngularWorkflow = (defaultprops) => {
*/} + + {workflow.video !== undefined && workflow.video !== null && workflow.video.length > 0 ? +
+ + Video + + { + workflow.video.includes("loom.com/share") && workflow.video.split("/").length > 4 ? +
+