diff --git a/.gitleaksignore b/.gitleaksignore index 4fdcb3d..e69de29 100644 --- a/.gitleaksignore +++ b/.gitleaksignore @@ -1 +0,0 @@ -/github/workspace/example-competition-server/signoz/config/dashboards/Round Status.json:generic-api-key:1 \ No newline at end of file diff --git a/.prettierignore b/.prettierignore index 188bd46..e69de29 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1 +0,0 @@ -example-competition-server/signoz/config/dashboards/Round Status.json \ No newline at end of file diff --git a/example-competition-server/README.md b/example-competition-server/README.md deleted file mode 100644 index 87a81fd..0000000 --- a/example-competition-server/README.md +++ /dev/null @@ -1,392 +0,0 @@ -# Example Competition Server - -## Changelog - -All notable changes to the competition-test-api docker container will be noted here. - -### v1.4-rc1 - 2025-06-17 - -This supports v1.4 of the competition API, with one exception. The new /v1/request changes are not present here, since we only intend for that to be used in the competition API. /v1/request/delta/ is still available -for use in the competition-test-api - -#### Fixed - -- `git diff` behavior fixed that lead to bad diffs being sent out for certain Tika delta challenges -- Fix improprely set flag that led to `/v1/request/delta/` challenges to be set as unharnessed challenges - -### v1.2-rc5 - 2025-06-03 - -#### Added - -- Added the optional `harnesses_included` flag to the `/webhook/trigger_task/` API. This boolean flag allows you to specify to the server whether you would like it to treat this challenge as a harnessed or unharnessed - flag. If unset, this flag defaults to true. - -### v1.2-rc4 - 2025-05-20 - -#### Fixed - -- Our projects in oss-fuzz now use git-lfs to facilitate building fuzzers. In v1.2-rc3, we did not have git-lfs installed in the competitor-test-server Docker image. This is fixed in this release. - -### v1.2-rc3 - 2025-05-20 - -This release includes the fixes intended for v1.2-rc2, but were mistakenly not included. Please see the "Fixed" section -in the v1.2-rc2 release notes for details. - -### v1.2-rc2 - 2025-05-19 - -**UPDATE**: The fixes for this release were mistakenly not included in this release. Please use v1.2-rc3 for the below fixes - -This release has no major changes. It only adds some bugfixes. This release should work with the Exhbition 2 challenges. - -#### Fixed - -- Fixed bug that prevents setting the correct sanitizer. This is similar to the bug that occurred in Exhibition 2 that caused non-`address` sanitizers to fail -- Fixed race condition that caused issues when triggering the `request/delta` endpoint - -### v1.2-rc1 - 2025-04-23 - -This release makes the competition-test-api compliant with API spec v1.2. This includes the most notable -change. - -#### Added - -- **_BREAKING CHANGE_**: Added the `v1/request/delta` endpoint. An working example of this endpoint is provided in the [Running the server](#running-the-server) section below. Alongside this new endpoint, is the new - `generate` field in the scantron YAML config. - -- Added the `protocol` config option, which tells the competition server what protocol source TARs (i.e. the challenge and fuzz-tooling repositories) are sent over. This field can either be `http` or `https` If unset, - this defaults to `http`. - -- Added the `crs-status` executable to the competition-test-api Docker image. `crs-status` polls the CRS's status endpoint at a fixed time interval. This fixed time interval is set by the `crs_status_poll_time_seconds` - scantron YAML config field. If unset, this config field is set to `60`. An example of running the crs-status executable is provided in the example compose.yaml located [here](./compose.yaml). - -### v1.1-rc7 - 2025-04-03 - -#### Added - -- Added ability to trigger SARIF broadcasts - -#### Fixed - -- Fixed bug that caused freeform submissions to fail - -### v1.1-rc6 - 2025-03-26 - -#### Fixed - -- Fixed incorrect directory naming for fuzz-tooling -- Fixed crash detection for java projects - -### v1.1-rc5 - 2025-03-25 - -#### Fixed - -- Fixed server error caused during a bundle submission - -### v1.1-rc4 - 2025-03-21 - -#### Added - -- **_BREAKING CHANGE_**: Added the `teams.crs.taskme` field in the scantron.yaml. This **MUST** be set to `true` if you want the competition server to send tasks to your CRS. -- Added ability to optionally use SCANTRON_GITHUB_PAT environment variable rather than the `github.pat` field in scantron.yaml - -#### Fixed - -- Fixed lack of a check for the dynamic-stack-buffer-overflow caused by example-libpng's address fuzzer -- Fixed race condition when reproducing more than one POV submission - -### v1.1-rc3 - 2025-03-18 - -#### Added - -- Added now required `api_host_and_port` scantron.yaml field to split the role of `listen_address`. This reverses the change made in v1.1-rc2 where `listen_address` was used to generate source tarball URLs and also used - as the server's bind address. Now, `api_host_and_port` is used by the server when sending source tarballs to the CRSs, and `listen_address` is the address the server binds to. - -### v1.1-rc2 - 2025-03-17 - -#### Fixed - -- Fixed issue where competition server hardcoded `localhost` into the URLs for the source tarballs sent by the server during tasking. Now the `listen_address` field in scantron.yaml is used. - -### v1.1-rc1 - 2025-03-14 - -Initial release candidate. - -## Overview - -This folder allows users to run a full end-to-end competition server, as well as a signoz endpoint for which competitors may submit telemetry to for testing. -This server simulates how the actual server will act in the competition. This means: - -- The example server supports the v1.2 competition server API, including endpoints for patches/POVs/sarif submissions, as well as endpoints for checking the patch/POV statuses. -- As a correlary, the server also supports the v1.2 CRS API, meaning it can send tasks to CRSs -- The `compose.yaml` given in this folder also brings up signoz for telemetry. Competitors may use this to send to telemetry to, much like how they would in a real competition round. - -## Prerequisites - -You must make changes to the following files in order for the server to run properly - -### GitHub Container Registry - -You must login to the GitHub Container Registry to access the example competition server container. - -You will need to have a GitHub personal access token (PAT) scoped to at least `read:packages`. - -To create the PAT, go to your account, `Settings` > `Developer settings` > `Personal access tokens`, and generate a Token (classic) with the scopes needed for your use case. - -For this example, the `read:packages` scope is required. If you'd like, you may also enable the `repo` scope so you can use the same token for the container registry and the competition test server (see the [scantron.yaml](#scantronyaml) -section below). - -Once you have your PAT, set it to an environment variable on your machine like this - -```bash -export CR_PAT=YOUR_TOKEN_HERE -``` - -Finally, you must login to the registry, like so: - -```bash -$ echo $CR_PAT | docker login ghcr.io -u USERNAME --password-stdin -> Login Succeeded -``` - -To check if it succeeded, try running the following: - -```bash -docker pull --platform=linux/amd64 ghcr.io/aixcc-finals/example-crs-architecture/competition-test-api:v1.2-rc3 -``` - -Docker will store your credentials in your OS's native keystore, so you should only have to run `docker login` on subsequent logins into the GitHub Container Repository - -### `scantron.yaml` - -The competition servers configuration is stored in the `scantron.yaml` file. Of note for competitors -would be the following: - -- `api_keys.id`: You don't need to edit this, but this is the key the CRS must use to send submissions to the server -- `crs`: This stores information the competition server uses to access the CRS -- `github.pat`: The server must download fuzz tooling and challenge repositories from GitHub, so you must add a GitHub personal access token with repository read access here in order for the server to work. This token - must have the `repo` scope. You may use the same access token that you used for container registry, just as long as it has both the `repo` scope and the `read:packages` scope enabled. You may also set this value - through the environment variable `SCANTRON_GITHUB_PAT` within the scantron service. -- `api_host_and_port`: This should be set to whatever host and port your CRS is using to send submissions to. -- `protocol`: This tells the competition server what protocol source TARs (i.e. the challenge and fuzz-tooling repositories) are sent over. This field can either be `http` or `https` If unset, this defaults to `http`. -- `teams.crs.taskme`: New as of v1.1-rc4 is the `taskme` flag. You must set this to true if you want the competition server to send tasks to your CRS. -- `generate`: New as of v1.2-rc1 is the `generate` field. These are the parameters used by the competition API when using the `/v1/request/delta` endpoint. This is **_REQUIRED_** for starting the competitor test API. We - recommend that teams use the integration-test challenge repository, as it is nearly the same challenge repository as the one offered by the official competition API. Below is the config we recommend. - - ```yaml - generate: - enabled: true - delta: - repo_url: "https://github.com/aixcc-finals/integration-test.git" - base_ref: "5ac0917575e20464b5aa86434dff2a7626b558b4" - head_ref: "challenges/integration-test-delta-01" - fuzz_tooling_url: "https://github.com/aixcc-finals/oss-fuzz-aixcc.git" - fuzz_tooling_ref: "v1.1.0" - fuzz_tooling_project_name: "integration-test" - ``` - -### `signoz/otel-collector-config.yaml` - -In order to test data submission to signoz, you can edit the Basic Auth username and password here, under `basicauth/server.htpasswd.inline` - -In order to use this signoz from your CRS, use the following environment vars: - -```bash -OTEL_EXPORTER_OTLP_HEADERS="Authorization=Basic " -OTEL_EXPORTER_OTLP_ENDPOINT="http://127.0.0.1:4317" # This will be the Team-specific telemetry server configured by the Organizers. -OTEL_EXPORTER_OTLP_PROTOCOL=grpc -``` - -## Running the server - -You can run the server and signoz by doing `docker compose up` from within the example-competition-server directory. -If you wish to not run signoz, you can remove the `include` statement at the top of the compose.yaml in example-competition-server. NOTE: Signoz may take 2-5 minutes to fully start up. - -Through the Docker compose option, the server is available by default through `http://localhost:1324`. It's also available through `http://scantron:1324` within the `endpoint-network` Docker network. This Docker network -is made available for teams who have their CRS within their own compose setup. An example of a webservice that uses this network is shown in the example-crs-webservice -[compose.yaml](https://github.com/aixcc-finals/example-crs-architecture/blob/main/example-crs-webservice/compose.yaml). - -Alternatively, you may start the server directly with the command below. - -```bash -docker run \ - -v /var/run/docker.sock:/var/run/docker.sock \ # required for Docker-out-of-docker stuff - -v path/to/scantron.yaml:/etc/scantron/scantron.yaml \ # required for server configuration - -v path/to/scantron.db:/app/scantron.db \ # optional, in case you may have a sqlite3 database from a previous run you want to use again - -v /tmp:/tmp \ # required, since it removes a strange bug caused by us doing Docker-out-of-docker - -p 1323:1323 \ - -it \ - --rm \ - --privileged \ # required, for Docker-out-of-docker - --add-host=host.docker.internal:host-gateway \ - ghcr.io/aixcc-finals/example-crs-architecture/competition-test-api:v1.2-rc1 server -``` - -In the normal competition, the server would get a notification from GitHub via GitHub webhooks, and would fire off a task to -the CRS from there. The example server here responds to an HTTP request instead. Here is an example curl command to -trigger a full scan. - -```bash -curl -X 'POST' 'http://localhost:1323/webhook/trigger_task' -H 'Content-Type: application/json' -d '{ - "challenge_repo_url": "git@github.com:aixcc-finals/example-libpng.git", - "challenge_repo_head_ref": "fdacd5a1dcff42175117d674b0fda9f8a005ae88", - "fuzz_tooling_url": "https://github.com/aixcc-finals/oss-fuzz-aixcc.git", - "fuzz_tooling_ref": "d5fbd68fca66e6fa4f05899170d24e572b01853d", - "fuzz_tooling_project_name": "libpng", - "duration": 3600 -}' -``` - -Here is an example for a delta scan: - -```bash -curl -X 'POST' 'http://localhost:1323/webhook/trigger_task' -H 'Content-Type: application/json' -d '{ - "challenge_repo_url": "git@github.com:aixcc-finals/example-libpng.git", - "challenge_repo_base_ref": "0cc367aaeaac3f888f255cee5d394968996f736e", - "challenge_repo_head_ref": "fdacd5a1dcff42175117d674b0fda9f8a005ae88", - "fuzz_tooling_url": "https://github.com/aixcc-finals/oss-fuzz-aixcc.git", - "fuzz_tooling_ref": "d5fbd68fca66e6fa4f05899170d24e572b01853d", - "fuzz_tooling_project_name": "libpng", - "duration": 3600 -}' -``` - -You may optionally specify whether the task is unharnessed using the `harnesses_include` flag, like below. If unset, the test server assumes `harnesses_include=true` - -```bash -curl -X 'POST' 'http://localhost:1323/webhook/trigger_task' -H 'Content-Type: application/json' -d '{ - "challenge_repo_url": "git@github.com:aixcc-finals/integration-test.git", - "challenge_repo_base_ref": "4a714359c60858e3821bd478dc846de1d04dc977", - "challenge_repo_head_ref": "889cdb1b971b9a8a0338a89e50c51c051965bae5", - "fuzz_tooling_url": "https://github.com/aixcc-finals/oss-fuzz-aixcc.git", - "fuzz_tooling_ref": "challenge-state/integration-test-unharnessed-delta-01", - "fuzz_tooling_project_name": "integration-test", - "harnesses_included": false, - "duration": 3600 -}' -``` - -You can also request to send a SARIF broadcast. It two fields. The `task_id` field is the UUID of a previous task that was triggered through `/webhook/trigger_task`. The `sarif` field is in the form of a JSON object -that follows [sarif-schema.json](../docs/api/sarif-schema.json). Below is an example request for example-libpng. - -```bash -curl -X 'POST' 'http://localhost:1323/webhook/sarif' -H 'Content-Type: application/json' -d '{ - "task_id": "", - "sarif": { - "runs": [ - { - "artifacts": [ - { - "location": { - "index": 0, - "uri": "pngrutil.c" - } - } - ], - "automationDetails": { - "id": "/" - }, - "conversion": { - "tool": { - "driver": { - "name": "GitHub Code Scanning" - } - } - }, - "results": [ - { - "correlationGuid": "9d13d264-74f2-48cc-a3b9-d45a8221b3e1", - "level": "error", - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 0, - "uri": "pngrutil.c" - }, - "region": { - "endLine": 1447, - "startColumn": 1, - "startLine": 1421 - } - } - } - ], - "message": { - "text": "Associated risk: CWE-121" - }, - "partialFingerprints": { - "primaryLocationLineHash": "22ac9f8e7c3a3bd8:8" - }, - "properties": { - "github/alertNumber": 2, - "github/alertUrl": "https://api.github.com/repos/aixcc-finals/example-libpng/code-scanning/alerts/2" - }, - "rule": { - "id": "CWE-121", - "index": 0 - }, - "ruleId": "CWE-121" - } - ], - "tool": { - "driver": { - "name": "CodeScan++", - "rules": [ - { - "defaultConfiguration": { - "level": "warning" - }, - "fullDescription": { - "text": "vulnerable to #CWE-121" - }, - "helpUri": "https://example.com/help/png_handle_iCCP", - "id": "CWE-121", - "properties": {}, - "shortDescription": { - "text": "CWE #CWE-121" - } - } - ], - "version": "1.0.0" - } - }, - "versionControlProvenance": [ - { - "branch": "refs/heads/challenges/full-scan", - "repositoryUri": "https://github.com/aixcc-finals/example-libpng", - "revisionId": "fdacd5a1dcff42175117d674b0fda9f8a005ae88" - } - ] - } - ], - "$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json", - "version": "2.1.0" - } -}' -``` - -Note: The Git repository specified in the curl command must have a shell script located at `.aixcc/test.sh`. This script is used to perform functionality tests on patches submitted to the competition API. This script -should have a 0 exit code on success, and a non-zero exit code on failure. - -NEW as of v1.2-rc1 is the `/v1/request/delta` endpoint. Teams may use this endpoint to request a task hardcoded in the scantron YAML config from the server. An example curl is given below. - -```bash -curl -X 'POST' -u "11111111-1111-1111-1111-111111111111:secret" 'http://localhost:1323/v1/request/delta' -``` - -## Viewing Signoz Dashboard - -Once you kick off a task, you will be able to view the competition dashboard. Go to `localhost:3301`. -There you will see a login screen, or a screen to create your account. Once you login you'll be met -with this screen. - -![Signoz Home Screen](./images/initial-login.png) - -Click on the Dashboards menu entry on the left-hand side. - -![Signoz Dashboards](./images/dashboards.png) - -Click on one of the Round Status dashboards (doesn't matter which one). Then, set the `$Round` -and the $Environment`. You should see an image similar to below. - -![Signoz Round Status](./images/round-status.png) diff --git a/example-competition-server/compose.yaml b/example-competition-server/compose.yaml deleted file mode 100644 index 70357d0..0000000 --- a/example-competition-server/compose.yaml +++ /dev/null @@ -1,81 +0,0 @@ -name: "competitor-test-server" - -x-default-logging: &logging - driver: "json-file" - options: - max-size: "5m" - max-file: "2" - tag: "{{.Name}}|{{.ImageName}}|{{.ID}}" - -include: - - ./signoz/compose.yaml - -services: - dind: - image: docker:28-dind - command: - [ - "dockerd", - "-H", - "tcp://0.0.0.0:2375", - "--tls=false", - "--storage-driver=overlay2", - ] - restart: always - privileged: true - networks: - - dind-internal - - dind-internet - expose: - - "2375" - environment: - - DOCKER_TLS_CERTDIR= # Ensure this is correctly formatted (empty value) - - DOCKER_DEFAULT_PLATFORM=linux/amd64 - volumes: - - shared-tmp:/tmp - - scantron: - image: ghcr.io/aixcc-finals/example-crs-architecture/competition-test-api:v1.4-rc1 - platform: linux/amd64 - privileged: true - volumes: - - "./scantron.yaml:/etc/scantron/scantron.yaml" - - shared-tmp:/tmp - depends_on: - - dind - ports: - - "1323:1323" - command: server - networks: - - dind-internal - - external-internet - extra_hosts: - - "host.docker.internal:host-gateway" - environment: - - "DOCKER_HOST=tcp://dind:2375" - - DOCKER_DEFAULT_PLATFORM=linux/amd64 - logging: *logging - - crs-status: - image: ghcr.io/aixcc-finals/example-crs-architecture/competition-test-api:v1.4-rc1 - platform: linux/amd64 - privileged: true - volumes: - - "./scantron.yaml:/etc/scantron/scantron.yaml" - depends_on: - - scantron - command: crs-status - networks: - - external-internet - environment: - - SCANTRON_GITHUB_PAT=$CICD_PAT - -networks: - dind-internal: - internal: true - dind-internet: {} - external-internet: # For services in external compose files to join - name: "endpoint-network" - -volumes: - shared-tmp: diff --git a/example-competition-server/images/dashboards.png b/example-competition-server/images/dashboards.png deleted file mode 100644 index b810223..0000000 Binary files a/example-competition-server/images/dashboards.png and /dev/null differ diff --git a/example-competition-server/images/initial-login.png b/example-competition-server/images/initial-login.png deleted file mode 100644 index cf1ed93..0000000 Binary files a/example-competition-server/images/initial-login.png and /dev/null differ diff --git a/example-competition-server/images/round-status.png b/example-competition-server/images/round-status.png deleted file mode 100644 index 5a8e2c0..0000000 Binary files a/example-competition-server/images/round-status.png and /dev/null differ diff --git a/example-competition-server/scantron.yaml b/example-competition-server/scantron.yaml deleted file mode 100644 index 0d8c920..0000000 --- a/example-competition-server/scantron.yaml +++ /dev/null @@ -1,51 +0,0 @@ ---- -# Example Config File - -teams: - # This is the API key your CRS uses to get access - # to the submission endpoints - - id: 11111111-1111-1111-1111-111111111111 - note: Test Key for Local Auth - api_key: - token: secret - active: true - permissions: - crs: true - competition_management: true - - crs: - # New as of rc4 is this flag. You must set this to "true" if you want the server to - # send tasks to the CRS - taskme: true - # The url of your CRS. If you are running your CRS on localhost, keep the - # url as host.docker.internal - url: http://host.docker.internal:1324 - api_key_id: api_key_id - api_key_token: api_key_token - -logging: - gorm: - level: 0 - trace_queries: true - app: - level: -4 - -round_id: testing - -# Listen address outside the container -listen_address: "[::]:1323" -api_host_and_port: "localhost:1323" -# github Personal Access token. This is used by the server to download the -# appropriate fuzz tooling if not using public repositories. However, we -# recommend using the SCANTRON_GITHUB_PAT environment variable instead. -# github: -# pat: github_pat_foobar -generate: - enabled: true - delta: - repo_url: "https://github.com/aixcc-finals/integration-test.git" - base_ref: "5ac0917575e20464b5aa86434dff2a7626b558b4" - head_ref: "challenges/integration-test-delta-01" - fuzz_tooling_url: "https://github.com/aixcc-finals/oss-fuzz-aixcc.git" - fuzz_tooling_ref: "v1.1.0" - fuzz_tooling_project_name: "integration-test" diff --git a/example-competition-server/signoz/compose.yaml b/example-competition-server/signoz/compose.yaml deleted file mode 100644 index c32365c..0000000 --- a/example-competition-server/signoz/compose.yaml +++ /dev/null @@ -1,235 +0,0 @@ -# This is copied directly from https://github.com/SigNoz/signoz/blob/v0.71.0/deploy/docker/docker-compose.yaml -# Note that maintainer-interfaces uses version 0.71.*, so we copied from the same version here -# -# Since the real production signoz server only uses gRPC, we have changed the compose.yaml and the -# otel-collector-config.yaml to reflect that - -version: "3" -x-common: &common - networks: - - signoz-net - restart: on-failure - logging: - options: - max-size: 50m - max-file: "3" -x-clickhouse-defaults: &clickhouse-defaults - !!merge <<: *common - # addding non LTS version due to this fix https://github.com/ClickHouse/ClickHouse/commit/32caf8716352f45c1b617274c7508c86b7d1afab - image: clickhouse/clickhouse-server:24.1.2-alpine - tty: true - labels: - signoz.io/scrape: "true" - signoz.io/port: "9363" - signoz.io/path: "/metrics" - depends_on: - init-clickhouse: - condition: service_completed_successfully - zookeeper-1: - condition: service_healthy - healthcheck: - test: - - CMD - - wget - - --spider - - -q - - 0.0.0.0:8123/ping - interval: 30s - timeout: 5s - retries: 3 - ulimits: - nproc: 65535 - nofile: - soft: 262144 - hard: 262144 -x-zookeeper-defaults: &zookeeper-defaults - !!merge <<: *common - image: bitnami/zookeeper:3.7.1 - user: root - labels: - signoz.io/scrape: "true" - signoz.io/port: "9141" - signoz.io/path: "/metrics" - healthcheck: - test: - - CMD-SHELL - - curl -s -m 2 http://localhost:8080/commands/ruok | grep error | grep null - interval: 30s - timeout: 5s - retries: 3 -x-db-depend: &db-depend - !!merge <<: *common - depends_on: - clickhouse: - condition: service_healthy - schema-migrator-sync: - condition: service_completed_successfully -services: - init-clickhouse: - !!merge <<: *common - image: clickhouse/clickhouse-server:24.1.2-alpine - container_name: signoz-init-clickhouse - command: - - bash - - -c - - | - version="v0.0.1" - node_os=$$(uname -s | tr '[:upper:]' '[:lower:]') - node_arch=$$(uname -m | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) - echo "Fetching histogram-binary for $${node_os}/$${node_arch}" - cd /tmp - wget -O histogram-quantile.tar.gz "https://github.com/SigNoz/signoz/releases/download/histogram-quantile%2F$${version}/histogram-quantile_$${node_os}_$${node_arch}.tar.gz" - tar -xvzf histogram-quantile.tar.gz - mv histogram-quantile /var/lib/clickhouse/user_scripts/histogramQuantile - volumes: - - ./config/clickhouse/user_scripts:/var/lib/clickhouse/user_scripts/ - zookeeper-1: - !!merge <<: *zookeeper-defaults - container_name: signoz-zookeeper-1 - # ports: - # - "2181:2181" - # - "2888:2888" - # - "3888:3888" - volumes: - - zookeeper-1:/bitnami/zookeeper - environment: - - ZOO_SERVER_ID=1 - - ALLOW_ANONYMOUS_LOGIN=yes - - ZOO_AUTOPURGE_INTERVAL=1 - - ZOO_ENABLE_PROMETHEUS_METRICS=yes - - ZOO_PROMETHEUS_METRICS_PORT_NUMBER=9141 - clickhouse: - !!merge <<: *clickhouse-defaults - container_name: signoz-clickhouse - # ports: - # - "9000:9000" - # - "8123:8123" - # - "9181:9181" - volumes: - - ./config/clickhouse/config.xml:/etc/clickhouse-server/config.xml - - ./config/clickhouse/users.xml:/etc/clickhouse-server/users.xml - - ./config/clickhouse/custom-function.xml:/etc/clickhouse-server/custom-function.xml - - ./config/clickhouse/user_scripts:/var/lib/clickhouse/user_scripts/ - - ./config/clickhouse/cluster.xml:/etc/clickhouse-server/config.d/cluster.xml - - clickhouse:/var/lib/clickhouse/ - # - ./config/clickhouse/storage.xml:/etc/clickhouse-server/config.d/storage.xml - alertmanager: - !!merge <<: *common - image: signoz/alertmanager:${ALERTMANAGER_TAG:-0.23.7} - container_name: signoz-alertmanager - command: - - --queryService.url=http://query-service:8085 - - --storage.path=/data - volumes: - - alertmanager:/data - depends_on: - query-service: - condition: service_healthy - query-service: - !!merge <<: *db-depend - image: signoz/query-service:${DOCKER_TAG:-0.71.0} - container_name: signoz-query-service - command: - - --config=/root/config/prometheus.yml - - --use-logs-new-schema=true - - --use-trace-new-schema=true - # ports: - # - "3301:8080" # signoz port - # - "6060:6060" # pprof port - volumes: - - ./config/signoz/prometheus.yml:/root/config/prometheus.yml - - ./config/dashboards:/root/config/dashboards - - sqlite:/var/lib/signoz/ - environment: - - ClickHouseUrl=tcp://clickhouse:9000 - - ALERTMANAGER_API_PREFIX=http://alertmanager:9093/api/ - - SIGNOZ_SQLSTORE_SQLITE_PATH=/var/lib/signoz/signoz.db - - DASHBOARDS_PATH=/root/config/dashboards - - STORAGE=clickhouse - - GODEBUG=netdns=go - - TELEMETRY_ENABLED=false - - DEPLOYMENT_TYPE=docker-standalone-amd - healthcheck: - test: - - CMD - - wget - - --spider - - -q - - localhost:8080/api/v1/health - interval: 30s - timeout: 5s - retries: 3 - frontend: - !!merge <<: *common - image: signoz/frontend:${DOCKER_TAG:-0.71.0} - container_name: signoz-frontend - depends_on: - - alertmanager - - query-service - ports: - - "3301:3301" - volumes: - - ./config/signoz/nginx-config.conf:/etc/nginx/conf.d/default.conf - otel-collector: - !!merge <<: *db-depend - image: signoz/signoz-otel-collector:${OTELCOL_TAG:-0.111.26} - container_name: signoz-otel-collector - command: - - --config=/etc/otel-collector-config.yaml - - --manager-config=/etc/manager-config.yaml - - --copy-path=/var/tmp/collector-config.yaml - - --feature-gates=-pkg.translator.prometheus.NormalizeName - volumes: - - ./otel-collector-config.yaml:/etc/otel-collector-config.yaml - - ./config/signoz/otel-collector-opamp-config.yaml:/etc/manager-config.yaml - - /var/run/docker.sock:/var/run/docker.sock - environment: - - OTEL_RESOURCE_ATTRIBUTES=host.name=signoz-host,os.type=linux - - LOW_CARDINAL_EXCEPTION_GROUPING=false - ports: - # - "1777:1777" # pprof extension - - "4317:4317" # OTLP gRPC receiver - - "2255:2255" - depends_on: - query-service: - condition: service_healthy - logspout: - <<: *common - image: "gliderlabs/logspout:v3.2.14" - volumes: - - /etc/hostname:/etc/host_hostname:ro - - /var/run/docker.sock:/var/run/docker.sock - command: syslog+tcp://otel-collector:2255 - depends_on: - - otel-collector - schema-migrator-sync: - !!merge <<: *common - image: signoz/signoz-schema-migrator:${OTELCOL_TAG:-0.111.24} - container_name: schema-migrator-sync - command: - - sync - - --dsn=tcp://clickhouse:9000 - - --up= - depends_on: - clickhouse: - condition: service_healthy - schema-migrator-async: - !!merge <<: *db-depend - image: signoz/signoz-schema-migrator:${OTELCOL_TAG:-0.111.24} - container_name: schema-migrator-async - command: - - async - - --dsn=tcp://clickhouse:9000 - - --up= -networks: - signoz-net: - name: signoz-net -volumes: - alertmanager: - name: signoz-alertmanager - clickhouse: - name: signoz-clickhouse - sqlite: - name: signoz-sqlite - zookeeper-1: - name: signoz-zookeeper-1 diff --git a/example-competition-server/signoz/config/clickhouse/cluster.ha.xml b/example-competition-server/signoz/config/clickhouse/cluster.ha.xml deleted file mode 100644 index 5c20881..0000000 --- a/example-competition-server/signoz/config/clickhouse/cluster.ha.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - zookeeper-1 - 2181 - - - zookeeper-2 - 2181 - - - zookeeper-3 - 2181 - - - - - - - - - - - - - - - clickhouse - 9000 - - - - - - - clickhouse-2 - 9000 - - - - - clickhouse-3 - 9000 - - - - - diff --git a/example-competition-server/signoz/config/clickhouse/cluster.xml b/example-competition-server/signoz/config/clickhouse/cluster.xml deleted file mode 100644 index 8b475ff..0000000 --- a/example-competition-server/signoz/config/clickhouse/cluster.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - zookeeper-1 - 2181 - - - - - - - - - - - - - - - - clickhouse - 9000 - - - - - - - - diff --git a/example-competition-server/signoz/config/clickhouse/config.xml b/example-competition-server/signoz/config/clickhouse/config.xml deleted file mode 100644 index 1965ac3..0000000 --- a/example-competition-server/signoz/config/clickhouse/config.xml +++ /dev/null @@ -1,1142 +0,0 @@ - - - - - - information - - json - - /var/log/clickhouse-server/clickhouse-server.log - /var/log/clickhouse-server/clickhouse-server.err.log - - 1000M - 10 - - - - - - - - - - - - - - - - - - 8123 - - - 9000 - - - 9004 - - - 9005 - - - - - - - - - - - - 9009 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 4096 - - - 3 - - - - - false - - - /path/to/ssl_cert_file - /path/to/ssl_key_file - - - false - - - /path/to/ssl_ca_cert_file - - - none - - - 0 - - - -1 - -1 - - - false - - - - - - - - - - - none - true - true - sslv2,sslv3 - true - - - - true - true - sslv2,sslv3 - true - - - - RejectCertificateHandler - - - - - - - - - 100 - - - 0 - - - - 10000 - - - - - - 0.9 - - - 4194304 - - - 0 - - - - - - 8589934592 - - - 5368709120 - - - - 1000 - - - 134217728 - - - 10000 - - - /var/lib/clickhouse/ - - - /var/lib/clickhouse/tmp/ - - - - ` - - - - - - /var/lib/clickhouse/user_files/ - - - - - - - - - - - - - users.xml - - - - /var/lib/clickhouse/access/ - - - - - - - default - - - - - - - - - - - - default - - - - - - - - - true - - - false - - ' | sed -e 's|.*>\(.*\)<.*|\1|') - wget https://github.com/ClickHouse/clickhouse-jdbc-bridge/releases/download/v$PKG_VER/clickhouse-jdbc-bridge_$PKG_VER-1_all.deb - apt install --no-install-recommends -f ./clickhouse-jdbc-bridge_$PKG_VER-1_all.deb - clickhouse-jdbc-bridge & - - * [CentOS/RHEL] - export MVN_URL=https://repo1.maven.org/maven2/ru/yandex/clickhouse/clickhouse-jdbc-bridge - export PKG_VER=$(curl -sL $MVN_URL/maven-metadata.xml | grep '' | sed -e 's|.*>\(.*\)<.*|\1|') - wget https://github.com/ClickHouse/clickhouse-jdbc-bridge/releases/download/v$PKG_VER/clickhouse-jdbc-bridge-$PKG_VER-1.noarch.rpm - yum localinstall -y clickhouse-jdbc-bridge-$PKG_VER-1.noarch.rpm - clickhouse-jdbc-bridge & - - Please refer to https://github.com/ClickHouse/clickhouse-jdbc-bridge#usage for more information. - ]]> - - - - - - - - - - - - - - - 01 - example01-01-1 - - - - - - 3600 - - - - 3600 - - - 60 - - - - - - - - - - /metrics - 9363 - - true - true - true - true - - - - - - system - query_log
- - toYYYYMM(event_date) - - - - - - 7500 -
- - - - system - trace_log
- - toYYYYMM(event_date) - 7500 -
- - - - system - query_thread_log
- toYYYYMM(event_date) - 7500 -
- - - - system - query_views_log
- toYYYYMM(event_date) - 7500 -
- - - - system - part_log
- toYYYYMM(event_date) - 7500 -
- - - - - - system - metric_log
- 7500 - 1000 -
- - - - system - asynchronous_metric_log
- - 7000 -
- - - - - - engine MergeTree - partition by toYYYYMM(finish_date) - order by (finish_date, finish_time_us, trace_id) - - system - opentelemetry_span_log
- 7500 -
- - - - - system - crash_log
- - - 1000 -
- - - - - - - system - processors_profile_log
- - toYYYYMM(event_date) - 7500 -
- - - - - - - - - *_dictionary.xml - - - *function.xml - /var/lib/clickhouse/user_scripts/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /clickhouse/task_queue/ddl - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - click_cost - any - - 0 - 3600 - - - 86400 - 60 - - - - max - - 0 - 60 - - - 3600 - 300 - - - 86400 - 3600 - - - - - - /var/lib/clickhouse/format_schemas/ - - - - - hide encrypt/decrypt arguments - ((?:aes_)?(?:encrypt|decrypt)(?:_mysql)?)\s*\(\s*(?:'(?:\\'|.)+'|.*?)\s*\) - - \1(???) - - - - - - - - - - false - - false - - - https://6f33034cfe684dd7a3ab9875e57b1c8d@o388870.ingest.sentry.io/5226277 - - - - - - - - - - - 268435456 - true - -
diff --git a/example-competition-server/signoz/config/clickhouse/custom-function.xml b/example-competition-server/signoz/config/clickhouse/custom-function.xml deleted file mode 100644 index b2b3f91..0000000 --- a/example-competition-server/signoz/config/clickhouse/custom-function.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - executable - histogramQuantile - Float64 - - Array(Float64) - buckets - - - Array(Float64) - counts - - - Float64 - quantile - - CSV - ./histogramQuantile - - diff --git a/example-competition-server/signoz/config/clickhouse/storage.xml b/example-competition-server/signoz/config/clickhouse/storage.xml deleted file mode 100644 index 54ec497..0000000 --- a/example-competition-server/signoz/config/clickhouse/storage.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - 10485760 - - - s3 - - https://BUCKET-NAME.s3-REGION-NAME.amazonaws.com/data/ - ACCESS-KEY-ID - SECRET-ACCESS-KEY - - - - - - - - - - - default - - - s3 - 0 - - - - - - diff --git a/example-competition-server/signoz/config/clickhouse/user_scripts/.gitkeep b/example-competition-server/signoz/config/clickhouse/user_scripts/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/example-competition-server/signoz/config/clickhouse/user_scripts/histogramQuantile b/example-competition-server/signoz/config/clickhouse/user_scripts/histogramQuantile deleted file mode 100755 index b0684ad..0000000 Binary files a/example-competition-server/signoz/config/clickhouse/user_scripts/histogramQuantile and /dev/null differ diff --git a/example-competition-server/signoz/config/clickhouse/users.xml b/example-competition-server/signoz/config/clickhouse/users.xml deleted file mode 100644 index f185620..0000000 --- a/example-competition-server/signoz/config/clickhouse/users.xml +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - 10000000000 - - - random - - - - - 1 - - - - - - - - - - - - - ::/0 - - - - default - - - default - - - - - - - - - - - - - - 3600 - - - 0 - 0 - 0 - 0 - 0 - - - - diff --git a/example-competition-server/signoz/config/dashboards/.gitkeep b/example-competition-server/signoz/config/dashboards/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/example-competition-server/signoz/config/dashboards/Round Status.json b/example-competition-server/signoz/config/dashboards/Round Status.json deleted file mode 100644 index 99b3d74..0000000 --- a/example-competition-server/signoz/config/dashboards/Round Status.json +++ /dev/null @@ -1 +0,0 @@ -{"description":"","image":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE0Ljk0OTQgMTMuOTQyQzE2LjIzMTggMTIuNDI1OCAxNy4zMjY4IDkuNzAyMiAxNi4xOTU2IDYuNTc0ODdDMTUuNjQ0MyA1LjA1MjQ1IDE1LjAyMTkgNC4yMDI0OSAxNC4yOTY5IDMuNjYyNTJDMTMuODU1NyAzLjMzMzc5IDEyLjA5MzMgMi41MDYzMyA5Ljc1OTY1IDIuODY3NTZDOC4wNTM0OSAzLjEzMjU1IDUuNzc0ODcgNC4yMDg3NCA0LjI5MzY5IDUuOTU5OUMyLjg1NzUyIDcuNjYxMDYgMS43NDg4MyA5LjAwNDc0IDEuNjk3NTggMTAuMzA5N0MxLjYzMTMzIDExLjk4ODMgMi44OTYyNyAxMy40MzA4IDMuMDUwMDEgMTMuNjY0NUMzLjMyMzc0IDE0LjA3OTUgNS4xOTExNSAxNi40NTE4IDguNjk5NzEgMTYuNTczMUMxMS43OTcgMTYuNjc5MyAxMy44MTQ0IDE1LjI4NDQgMTQuOTQ5NCAxMy45NDJaIiBmaWxsPSIjNDAzRDNFIi8+CjxwYXRoIGQ9Ik00LjU1MzYzIDIuNzM3NDdDMi45Mzc0NiAzLjg5MTE2IDEuMTIxMzEgNi4yNTEwMyAxLjQ0NzU0IDkuNTYwODZDMS42MDYyOCAxMS4xNzIgMi4wMDI1MSAxMi4xNDk1IDIuNTcxMjMgMTIuODUwN0MyLjkxNzQ2IDEzLjI3ODIgNC40MTk4OCAxNC41NDkzIDYuNzczNTEgMTQuNzM2OEM5LjE0NTg4IDE0LjkyNTYgMTAuOTQ5NSAxNC4zOTQ0IDEyLjgzMzIgMTMuMDg0NEMxNi42NjE3IDEwLjQyMDggMTYuMDk4IDYuMzkzNTMgMTUuOTM0MyA1LjkyNDhDMTUuNzcwNSA1LjQ1NjA3IDE0LjU0NDQgMi42OTYyMiAxMS4xNzMzIDEuNzE1MDJDOC4xOTg0NCAwLjg1MDA2OCA1Ljk4MzU1IDEuNzE1MDIgNC41NTM2MyAyLjczNzQ3WiIgZmlsbD0iIzVFNjM2NyIvPgo8cGF0aCBkPSJNNy4zOTM1MyAyLjk2MTA5QzUuNjE3MzcgMi44OTczNCAzLjkxOTk2IDQuMjg4NTIgMy43NTYyMiA2LjAwNTkzQzMuNTkyNDggNy43MjIwOSA0LjY1NDkyIDkuMDI5NTIgNi4zMDk4MyA5LjI5NTc2QzcuOTY0NzUgOS41NjA3NCA5Ljg3ODM5IDguNTU1OCAxMC4yNjM0IDYuNDUwOTFDMTAuNjYwOSA0LjI4MjI3IDkuMDg5NjkgMy4wMjIzNCA3LjM5MzUzIDIuOTYxMDlaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBkPSJNNy45NDIxNyA1LjkwMTE1QzcuOTQyMTcgNS45MDExNSA4LjM2OTY1IDUuODEyNCA4LjQ1NDY1IDUuMTgyNDRDOC41MzgzOSA0LjU2MjQ3IDguMjMwOTEgNC4wMzM3NSA3LjUxMzQ1IDMuODQzNzZDNi43MzM0OSAzLjYzNzUyIDYuMjA0NzcgNC4wNjYyNSA2LjA2NzI3IDQuNTE3NDdDNS44NzYwMyA1LjE0NDk0IDYuMTU4NTIgNS40NDM2NyA2LjE1ODUyIDUuNDQzNjdDNi4xNTg1MiA1LjQ0MzY3IDUuMzkzNTYgNS42Mjc0MSA1LjMzMjMxIDYuNTI5ODdDNS4yNzQ4MSA3LjM4MTA3IDUuODU2MDMgNy44Mzg1NSA2LjQzOTc1IDcuOTc4NTRDNy4xNjA5NiA4LjE1MjI4IDcuOTc4NDIgNy45NTQ3OSA4LjE3ODQxIDcuMDM0ODRDOC4zNDQ2NSA2LjI3NzM4IDcuOTQyMTcgNS45MDExNSA3Ljk0MjE3IDUuOTAxMTVaIiBmaWxsPSIjMzAzMDMwIi8+CjxwYXRoIGQ9Ik02LjczOTgzIDQuNzUzNjJDNi42NzEwOSA1LjAxMjM1IDYuODA4NTggNS4yNjIzNCA3LjA3ODU3IDUuMzMxMDlDNy4zNjk4IDUuNDA0ODMgNy42MzQ3OSA1LjMwODU5IDcuNzA2MDMgNS4wMTExQzcuNzY4NTMgNC43NDczNyA3LjY0MzU0IDQuNTE0ODggNy4zMzYwNSA0LjQzOTg4QzcuMDgzNTcgNC4zNzczOSA2LjgxNDgzIDQuNDcxMTMgNi43Mzk4MyA0Ljc1MzYyWiIgZmlsbD0id2hpdGUiLz4KPHBhdGggZD0iTTYuOTU5NzggNi4wMzk3NEM2LjYzMjMgNS45Mzg0OSA2LjE5OTgyIDYuMDY0NzMgNi4xMzEwNyA2LjUwNDcxQzYuMDYyMzMgNi45NDQ2OSA2LjMyNjA2IDcuMTY5NjggNi42NzEwNCA3LjIzMjE3QzcuMDE2MDMgNy4yOTQ2NyA3LjM0MjI2IDcuMTEzNDMgNy40MDYwMSA2Ljc2MDk1QzcuNDY4NSA2LjQwOTcyIDcuMjg2MDEgNi4xMzk3MyA2Ljk1OTc4IDYuMDM5NzRaIiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K","layout":[{"h":5,"i":"19bb3f88-c675-4f90-a039-939dbc283342","moved":false,"static":false,"w":6,"x":0,"y":0},{"h":5,"i":"0e4d0ad0-9e80-4280-85c0-610f0d3400ac","moved":false,"static":false,"w":6,"x":6,"y":0},{"h":6,"i":"71c0e7f1-0887-413b-b4b8-6633f9122488","moved":false,"static":false,"w":6,"x":0,"y":5},{"h":6,"i":"530c83a0-e8fd-4a48-abd4-cd9b8081fdbe","moved":false,"static":false,"w":6,"x":6,"y":5},{"h":6,"i":"5ae4dd68-c32c-4b81-8d8f-18d7e673428d","moved":false,"static":false,"w":6,"x":0,"y":11},{"h":6,"i":"f63b69d9-9870-440f-a6e2-d13e7c2d3675","moved":false,"static":false,"w":6,"x":6,"y":11}],"panelMap":{},"tags":[],"title":"Round Status","uploadedGrafana":false,"variables":{"c9914d4d-d7f1-44a3-b0fa-b21c28a37498":{"allSelected":false,"customValue":"testing","description":"","id":"c9914d4d-d7f1-44a3-b0fa-b21c28a37498","modificationUUID":"765d10bb-b659-431d-807d-60e789eef077","multiSelect":false,"name":"Round","order":0,"queryValue":"","showALLOption":false,"sort":"DISABLED","textboxValue":"","type":"CUSTOM"},"d99193d2-085a-4168-b445-8c1721f44f25":{"allSelected":false,"customValue":"competitor-test-server-scantron-1","description":"","id":"d99193d2-085a-4168-b445-8c1721f44f25","key":"d99193d2-085a-4168-b445-8c1721f44f25","modificationUUID":"93792e5a-a08a-4e66-a28b-45fbc7c3690f","multiSelect":false,"name":"Environment","order":0,"queryValue":"SELECT DISTINCT attributes_string['container_name'] FROM signoz_logs.distributed_logs_v2 WHERE mapContainsKeyLike(attributes_string, 'container_name')","showALLOption":false,"sort":"DISABLED","textboxValue":"","type":"CUSTOM"}},"version":"v4","widgets":[{"bucketCount":30,"bucketWidth":0,"columnUnits":{},"description":"","fillSpans":false,"id":"71c0e7f1-0887-413b-b4b8-6633f9122488","isStacked":false,"mergeAllActiveQueries":false,"nullZeroValues":"zero","opacity":"1","panelTypes":"bar","query":{"builder":{"queryData":[{"aggregateAttribute":{"dataType":"","id":"------false","isColumn":false,"isJSON":false,"key":"","type":""},"aggregateOperator":"count","dataSource":"logs","disabled":false,"expression":"A","filters":{"items":[{"id":"eb86a796","key":{"dataType":"","isColumn":false,"isJSON":false,"key":"body.log_context","type":""},"op":"=","value":"audit"},{"id":"21f504f9","key":{"dataType":"string","id":"container_name--string--tag--false","isColumn":false,"isJSON":false,"key":"container_name","type":"tag"},"op":"=","value":"$Environment"},{"id":"ec260054","key":{"dataType":"","isColumn":false,"isJSON":false,"key":"body.round_id","type":""},"op":"=","value":"$Round"},{"id":"02f0bfbb","key":{"dataType":"","isColumn":false,"isJSON":false,"key":"body.event_type","type":""},"op":"in","value":["pov_submission","patch_submission","sarif_assessment","bundle_submission","sarif_submission"]}],"op":"AND"},"functions":[],"groupBy":[{"dataType":"string","id":"event_type--string--tag--false","isColumn":false,"isJSON":false,"key":"event_type","type":"tag"}],"having":[],"legend":"","limit":null,"orderBy":[],"queryName":"A","reduceTo":"avg","spaceAggregation":"sum","stepInterval":60,"timeAggregation":"rate"}],"queryFormulas":[]},"clickhouse_sql":[{"disabled":false,"legend":"","name":"A","query":""}],"id":"c85b499e-a6d6-4079-965d-c01d518851b9","promql":[{"disabled":false,"legend":"","name":"A","query":""}],"queryType":"builder"},"selectedLogFields":[{"dataType":"string","name":"body","type":""},{"dataType":"string","name":"timestamp","type":""}],"selectedTracesFields":[{"dataType":"string","id":"serviceName--string--tag--true","isColumn":true,"isJSON":false,"key":"serviceName","type":"tag"},{"dataType":"string","id":"name--string--tag--true","isColumn":true,"isJSON":false,"key":"name","type":"tag"},{"dataType":"float64","id":"durationNano--float64--tag--true","isColumn":true,"isJSON":false,"key":"durationNano","type":"tag"},{"dataType":"string","id":"httpMethod--string--tag--true","isColumn":true,"isJSON":false,"key":"httpMethod","type":"tag"},{"dataType":"string","id":"responseStatusCode--string--tag--true","isColumn":true,"isJSON":false,"key":"responseStatusCode","type":"tag"}],"softMax":0,"softMin":0,"stackedBarChart":true,"thresholds":[],"timePreferance":"GLOBAL_TIME","title":"Submissions","yAxisUnit":"none"},{"bucketCount":30,"bucketWidth":0,"columnUnits":{},"description":"","fillSpans":false,"id":"0e4d0ad0-9e80-4280-85c0-610f0d3400ac","isStacked":false,"mergeAllActiveQueries":false,"nullZeroValues":"zero","opacity":"1","panelTypes":"pie","query":{"builder":{"queryData":[{"aggregateAttribute":{"dataType":"","id":"------false","isColumn":false,"isJSON":false,"key":"","type":""},"aggregateOperator":"count","dataSource":"logs","disabled":false,"expression":"A","filters":{"items":[{"id":"c31e76ae","key":{"dataType":"","isColumn":false,"isJSON":false,"key":"body.log_context","type":""},"op":"=","value":"audit"},{"id":"5f182749","key":{"dataType":"string","id":"container_name--string--tag--false","isColumn":false,"isJSON":false,"key":"container_name","type":"tag"},"op":"=","value":"$Environment"},{"id":"3ce3b1ff","key":{"dataType":"","isColumn":false,"isJSON":false,"key":"body.round_id","type":""},"op":"=","value":"$Round"},{"id":"d2b04c4d","key":{"dataType":"","isColumn":false,"isJSON":false,"key":"body.event_type","type":""},"op":"!=","value":"crs_status_check"}],"op":"AND"},"functions":[],"groupBy":[{"dataType":"string","id":"event_type--string--tag--false","isColumn":false,"isJSON":false,"key":"event_type","type":"tag"}],"having":[],"legend":"","limit":null,"orderBy":[],"pageSize":10,"queryName":"A","reduceTo":"avg","spaceAggregation":"sum","stepInterval":60,"timeAggregation":"rate"}],"queryFormulas":[]},"clickhouse_sql":[{"disabled":false,"legend":"","name":"A","query":""}],"id":"69d5cd3a-1618-441c-9a24-8232c0a1d3c2","promql":[{"disabled":false,"legend":"","name":"A","query":""}],"queryType":"builder"},"selectedLogFields":[{"dataType":"string","name":"body","type":""},{"dataType":"string","name":"timestamp","type":""}],"selectedTracesFields":[{"dataType":"string","id":"serviceName--string--tag--true","isColumn":true,"isJSON":false,"key":"serviceName","type":"tag"},{"dataType":"string","id":"name--string--tag--true","isColumn":true,"isJSON":false,"key":"name","type":"tag"},{"dataType":"float64","id":"durationNano--float64--tag--true","isColumn":true,"isJSON":false,"key":"durationNano","type":"tag"},{"dataType":"string","id":"httpMethod--string--tag--true","isColumn":true,"isJSON":false,"key":"httpMethod","type":"tag"},{"dataType":"string","id":"responseStatusCode--string--tag--true","isColumn":true,"isJSON":false,"key":"responseStatusCode","type":"tag"}],"softMax":0,"softMin":0,"stackedBarChart":false,"thresholds":[],"timePreferance":"GLOBAL_TIME","title":"Events","yAxisUnit":"none"},{"bucketCount":30,"bucketWidth":0,"columnUnits":{},"description":"","fillSpans":false,"id":"530c83a0-e8fd-4a48-abd4-cd9b8081fdbe","isStacked":false,"mergeAllActiveQueries":false,"nullZeroValues":"zero","opacity":"1","panelTypes":"list","query":{"builder":{"queryData":[{"aggregateAttribute":{"dataType":"","id":"------false","isColumn":false,"isJSON":false,"key":"","type":""},"aggregateOperator":"noop","dataSource":"logs","disabled":false,"expression":"A","filters":{"items":[{"id":"43c72e0b","key":{"dataType":"","isColumn":false,"isJSON":false,"key":"body.log_context","type":""},"op":"=","value":"audit"},{"id":"8508898b","key":{"dataType":"string","id":"container_name--string--tag--false","isColumn":false,"isJSON":false,"key":"container_name","type":"tag"},"op":"=","value":"$Environment"},{"id":"4db33edf","key":{"dataType":"","isColumn":false,"isJSON":false,"key":"body.round_id","type":""},"op":"=","value":"$Round"}],"op":"AND"},"functions":[],"groupBy":[],"having":[],"legend":"","limit":null,"offset":0,"orderBy":[{"columnName":"timestamp","order":"desc"}],"pageSize":10,"queryName":"A","reduceTo":"avg","spaceAggregation":"sum","stepInterval":60,"timeAggregation":"rate"}],"queryFormulas":[]},"clickhouse_sql":[{"disabled":false,"legend":"","name":"A","query":""}],"id":"860ae901-c458-4a36-8560-2af73ff7dcdd","promql":[{"disabled":false,"legend":"","name":"A","query":""}],"queryType":"builder"},"selectedLogFields":[{"dataType":"string","name":"timestamp","type":""},{"dataType":"string","name":"event_type","type":""},{"dataType":"string","name":"team_id","type":""},{"dataType":"string","name":"round_id","type":""}],"selectedTracesFields":[{"dataType":"string","id":"serviceName--string--tag--true","isColumn":true,"isJSON":false,"key":"serviceName","type":"tag"},{"dataType":"string","id":"name--string--tag--true","isColumn":true,"isJSON":false,"key":"name","type":"tag"},{"dataType":"float64","id":"durationNano--float64--tag--true","isColumn":true,"isJSON":false,"key":"durationNano","type":"tag"},{"dataType":"string","id":"httpMethod--string--tag--true","isColumn":true,"isJSON":false,"key":"httpMethod","type":"tag"},{"dataType":"string","id":"responseStatusCode--string--tag--true","isColumn":true,"isJSON":false,"key":"responseStatusCode","type":"tag"}],"softMax":0,"softMin":0,"stackedBarChart":false,"thresholds":[],"timePreferance":"GLOBAL_TIME","title":"","yAxisUnit":"none"},{"bucketCount":30,"bucketWidth":0,"columnUnits":{},"description":"","fillSpans":false,"id":"5ae4dd68-c32c-4b81-8d8f-18d7e673428d","isStacked":false,"mergeAllActiveQueries":false,"nullZeroValues":"zero","opacity":"1","panelTypes":"graph","query":{"builder":{"queryData":[{"aggregateAttribute":{"dataType":"","id":"------false","isColumn":false,"isJSON":false,"key":"","type":""},"aggregateOperator":"count","dataSource":"logs","disabled":false,"expression":"A","filters":{"items":[{"id":"574781d4","key":{"dataType":"string","id":"container_name--string--tag--false","isColumn":false,"isJSON":false,"key":"container_name","type":"tag"},"op":"=","value":"$Environment"},{"id":"ca35e9d1","key":{"dataType":"","isColumn":false,"isJSON":false,"key":"body.level","type":""},"op":"=","value":"ERROR"}],"op":"AND"},"functions":[],"groupBy":[],"having":[],"legend":"","limit":null,"orderBy":[],"pageSize":10,"queryName":"A","reduceTo":"avg","spaceAggregation":"sum","stepInterval":60,"timeAggregation":"rate"}],"queryFormulas":[]},"clickhouse_sql":[{"disabled":false,"legend":"","name":"A","query":""}],"id":"1c3b6830-872b-49ec-86ac-c98dcbf8469a","promql":[{"disabled":false,"legend":"","name":"A","query":""}],"queryType":"builder"},"selectedLogFields":[{"dataType":"string","name":"body","type":""},{"dataType":"string","name":"timestamp","type":""}],"selectedTracesFields":[{"dataType":"string","id":"serviceName--string--tag--true","isColumn":true,"isJSON":false,"key":"serviceName","type":"tag"},{"dataType":"string","id":"name--string--tag--true","isColumn":true,"isJSON":false,"key":"name","type":"tag"},{"dataType":"float64","id":"durationNano--float64--tag--true","isColumn":true,"isJSON":false,"key":"durationNano","type":"tag"},{"dataType":"string","id":"httpMethod--string--tag--true","isColumn":true,"isJSON":false,"key":"httpMethod","type":"tag"},{"dataType":"string","id":"responseStatusCode--string--tag--true","isColumn":true,"isJSON":false,"key":"responseStatusCode","type":"tag"}],"softMax":0,"softMin":0,"stackedBarChart":false,"thresholds":[],"timePreferance":"GLOBAL_TIME","title":"Log Errors","yAxisUnit":"none"},{"bucketCount":30,"bucketWidth":0,"columnUnits":{},"description":"","fillSpans":false,"id":"f63b69d9-9870-440f-a6e2-d13e7c2d3675","isStacked":false,"mergeAllActiveQueries":false,"nullZeroValues":"zero","opacity":"1","panelTypes":"list","query":{"builder":{"queryData":[{"aggregateAttribute":{"dataType":"","id":"------false","isColumn":false,"isJSON":false,"key":"","type":""},"aggregateOperator":"noop","dataSource":"logs","disabled":false,"expression":"A","filters":{"items":[{"id":"e1de1480","key":{"dataType":"string","id":"container_name--string--tag--false","isColumn":false,"isJSON":false,"key":"container_name","type":"tag"},"op":"=","value":"$Environment"},{"id":"3a1acece","key":{"dataType":"","isColumn":false,"isJSON":false,"key":"body.level","type":""},"op":"=","value":"ERROR"}],"op":"AND"},"functions":[],"groupBy":[],"having":[],"legend":"","limit":null,"offset":0,"orderBy":[{"columnName":"timestamp","order":"desc"}],"pageSize":10,"queryName":"A","reduceTo":"avg","spaceAggregation":"sum","stepInterval":60,"timeAggregation":"rate"}],"queryFormulas":[]},"clickhouse_sql":[{"disabled":false,"legend":"","name":"A","query":""}],"id":"2e50c69e-e56f-43ec-a495-2d59ea2a9c77","promql":[{"disabled":false,"legend":"","name":"A","query":""}],"queryType":"builder"},"selectedLogFields":[{"dataType":"string","name":"body","type":""},{"dataType":"string","name":"timestamp","type":""}],"selectedTracesFields":[{"dataType":"string","id":"serviceName--string--tag--true","isColumn":true,"isJSON":false,"key":"serviceName","type":"tag"},{"dataType":"string","id":"name--string--tag--true","isColumn":true,"isJSON":false,"key":"name","type":"tag"},{"dataType":"float64","id":"durationNano--float64--tag--true","isColumn":true,"isJSON":false,"key":"durationNano","type":"tag"},{"dataType":"string","id":"httpMethod--string--tag--true","isColumn":true,"isJSON":false,"key":"httpMethod","type":"tag"},{"dataType":"string","id":"responseStatusCode--string--tag--true","isColumn":true,"isJSON":false,"key":"responseStatusCode","type":"tag"}],"softMax":0,"softMin":0,"stackedBarChart":false,"thresholds":[],"timePreferance":"GLOBAL_TIME","title":"Log Errors","yAxisUnit":"none"},{"bucketCount":30,"bucketWidth":0,"columnUnits":{},"description":"","fillSpans":false,"id":"19bb3f88-c675-4f90-a039-939dbc283342","isStacked":false,"mergeAllActiveQueries":false,"nullZeroValues":"zero","opacity":"1","panelTypes":"bar","query":{"builder":{"queryData":[{"aggregateAttribute":{"dataType":"","id":"------false","isColumn":false,"isJSON":false,"key":"","type":""},"aggregateOperator":"count","dataSource":"logs","disabled":false,"expression":"A","filters":{"items":[{"id":"7e42949a","key":{"dataType":"","isColumn":false,"isJSON":false,"key":"body.log_context","type":""},"op":"=","value":"audit"},{"id":"230687dd","key":{"dataType":"string","id":"container_name--string--tag--false","isColumn":false,"isJSON":false,"key":"container_name","type":"tag"},"op":"=","value":"$Environment"},{"id":"b79a6c53","key":{"dataType":"","isColumn":false,"isJSON":false,"key":"body.round_id","type":""},"op":"=","value":"$Round"},{"id":"badcfefb","key":{"dataType":"","isColumn":false,"isJSON":false,"key":"body.event_type","type":""},"op":"like","value":"new_%"}],"op":"AND"},"functions":[],"groupBy":[{"dataType":"string","id":"event_type--string--tag--false","isColumn":false,"isJSON":false,"key":"event_type","type":"tag"}],"having":[],"legend":"","limit":null,"orderBy":[],"queryName":"A","reduceTo":"avg","spaceAggregation":"sum","stepInterval":60,"timeAggregation":"rate"}],"queryFormulas":[]},"clickhouse_sql":[{"disabled":false,"legend":"","name":"A","query":""}],"id":"f5b8d5b4-7a7f-4a05-a7eb-c34bd3a6df35","promql":[{"disabled":false,"legend":"","name":"A","query":""}],"queryType":"builder"},"selectedLogFields":[{"dataType":"string","name":"body","type":""},{"dataType":"string","name":"timestamp","type":""}],"selectedTracesFields":[{"dataType":"string","id":"serviceName--string--tag--true","isColumn":true,"isJSON":false,"key":"serviceName","type":"tag"},{"dataType":"string","id":"name--string--tag--true","isColumn":true,"isJSON":false,"key":"name","type":"tag"},{"dataType":"float64","id":"durationNano--float64--tag--true","isColumn":true,"isJSON":false,"key":"durationNano","type":"tag"},{"dataType":"string","id":"httpMethod--string--tag--true","isColumn":true,"isJSON":false,"key":"httpMethod","type":"tag"},{"dataType":"string","id":"responseStatusCode--string--tag--true","isColumn":true,"isJSON":false,"key":"responseStatusCode","type":"tag"}],"softMax":0,"softMin":0,"stackedBarChart":false,"thresholds":[],"timePreferance":"GLOBAL_TIME","title":"New Tasks","yAxisUnit":"none"}]} \ No newline at end of file diff --git a/example-competition-server/signoz/config/signoz/nginx-config.conf b/example-competition-server/signoz/config/signoz/nginx-config.conf deleted file mode 100644 index 6826589..0000000 --- a/example-competition-server/signoz/config/signoz/nginx-config.conf +++ /dev/null @@ -1,64 +0,0 @@ -map $http_upgrade $connection_upgrade { - default upgrade; - '' close; -} - -server { - listen 3301; - server_name _; - - gzip on; - gzip_static on; - gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; - gzip_proxied any; - gzip_vary on; - gzip_comp_level 6; - gzip_buffers 16 8k; - gzip_http_version 1.1; - - # to handle uri issue 414 from nginx - client_max_body_size 24M; - large_client_header_buffers 8 128k; - - location / { - if ( $uri = '/index.html' ) { - add_header Cache-Control no-store always; - } - root /usr/share/nginx/html; - index index.html index.htm; - try_files $uri $uri/ /index.html; - } - - location ~ ^/api/(v1|v3)/logs/(tail|livetail){ - proxy_pass http://query-service:8080; - proxy_http_version 1.1; - - # connection will be closed if no data is read for 600s between successive read operations - proxy_read_timeout 600s; - - # dont buffer the data send it directly to client. - proxy_buffering off; - proxy_cache off; - } - - location /api { - proxy_pass http://query-service:8080/api; - # connection will be closed if no data is read for 600s between successive read operations - proxy_read_timeout 600s; - } - - location /ws { - proxy_pass http://query-service:8080/ws; - proxy_http_version 1.1; - proxy_set_header Upgrade "websocket"; - proxy_set_header Connection "upgrade"; - proxy_read_timeout 86400; - } - - # redirect server error pages to the static page /50x.html - # - error_page 500 502 503 504 /50x.html; - location = /50x.html { - root /usr/share/nginx/html; - } -} \ No newline at end of file diff --git a/example-competition-server/signoz/config/signoz/otel-collector-opamp-config.yaml b/example-competition-server/signoz/config/signoz/otel-collector-opamp-config.yaml deleted file mode 100644 index e408b55..0000000 --- a/example-competition-server/signoz/config/signoz/otel-collector-opamp-config.yaml +++ /dev/null @@ -1 +0,0 @@ -server_endpoint: ws://query-service:4320/v1/opamp diff --git a/example-competition-server/signoz/config/signoz/prometheus.yml b/example-competition-server/signoz/config/signoz/prometheus.yml deleted file mode 100644 index cd774a2..0000000 --- a/example-competition-server/signoz/config/signoz/prometheus.yml +++ /dev/null @@ -1,26 +0,0 @@ -# my global config -global: - scrape_interval: 5s # Set the scrape interval to every 15 seconds. Default is every 1 minute. - evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute. - # scrape_timeout is set to the global default (10s). - -# Alertmanager configuration -alerting: - alertmanagers: - - static_configs: - - targets: - - alertmanager:9093 - -# Load rules once and periodically evaluate them according to the global 'evaluation_interval'. -rule_files: - [] - # - "first_rules.yml" - # - "second_rules.yml" - # - 'alerts.yml' - -# A scrape configuration containing exactly one endpoint to scrape: -# Here it's Prometheus itself. -scrape_configs: [] - -remote_read: - - url: tcp://clickhouse:9000/signoz_metrics diff --git a/example-competition-server/signoz/otel-collector-config.yaml b/example-competition-server/signoz/otel-collector-config.yaml deleted file mode 100644 index 0897b07..0000000 --- a/example-competition-server/signoz/otel-collector-config.yaml +++ /dev/null @@ -1,147 +0,0 @@ -receivers: - otlp: - protocols: - grpc: - auth: - authenticator: basicauth/server - endpoint: 0.0.0.0:4317 - tcplog/docker: - listen_address: "0.0.0.0:2255" - operators: - - type: regex_parser - regex: '^<([0-9]+)>[0-9]+ (?P[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]+)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?) (?P\S+) (?P\S+) [0-9]+ - -( (?P.*))?' - timestamp: - parse_from: attributes.timestamp - layout: "%Y-%m-%dT%H:%M:%S.%LZ" - - type: move - from: attributes["body"] - to: body - - type: remove - field: attributes.timestamp - # please remove names from below if you want to collect logs from them - - type: filter - id: signoz_logs_filter - expr: 'attributes.container_name matches "^(signoz-(|alertmanager|query-service|otel-collector|clickhouse|zookeeper|logspout|otel-agent))"' - prometheus: - config: - global: - scrape_interval: 60s - scrape_configs: - - job_name: otel-collector - static_configs: - - targets: - - localhost:8888 - labels: - job_name: otel-collector -processors: - batch: - send_batch_size: 10000 - send_batch_max_size: 11000 - timeout: 10s - resourcedetection: - # Using OTEL_RESOURCE_ATTRIBUTES envvar, env detector adds custom labels. - detectors: [env, system] - timeout: 2s - transform: - error_mode: ignore - log_statements: - - context: log - statements: - - merge_maps(attributes, ParseJSON(body), "upsert") where IsMatch(body, "^\\{") - signozspanmetrics/delta: - metrics_exporter: clickhousemetricswrite - metrics_flush_interval: 60s - latency_histogram_buckets: - [ - 100us, - 1ms, - 2ms, - 6ms, - 10ms, - 50ms, - 100ms, - 250ms, - 500ms, - 1000ms, - 1400ms, - 2000ms, - 5s, - 10s, - 20s, - 40s, - 60s, - ] - dimensions_cache_size: 100000 - aggregation_temporality: AGGREGATION_TEMPORALITY_DELTA - enable_exp_histogram: true - dimensions: - - name: service.namespace - default: default - - name: deployment.environment - default: default - # This is added to ensure the uniqueness of the timeseries - # Otherwise, identical timeseries produced by multiple replicas of - # collectors result in incorrect APM metrics - - name: signoz.collector.id - - name: service.version - - name: browser.platform - - name: browser.mobile - - name: k8s.cluster.name - - name: k8s.node.name - - name: k8s.namespace.name - - name: host.name - - name: host.type - - name: container.name -extensions: - health_check: - endpoint: 0.0.0.0:13133 - pprof: - endpoint: 0.0.0.0:1777 - basicauth/server: - htpasswd: - inline: username:password -exporters: - clickhousetraces: - datasource: tcp://clickhouse:9000/signoz_traces - low_cardinal_exception_grouping: ${env:LOW_CARDINAL_EXCEPTION_GROUPING} - use_new_schema: true - clickhousemetricswrite: - endpoint: tcp://clickhouse:9000/signoz_metrics - resource_to_telemetry_conversion: - enabled: true - clickhousemetricswrite/prometheus: - endpoint: tcp://clickhouse:9000/signoz_metrics - clickhousemetricswritev2: - dsn: tcp://clickhouse:9000/signoz_metrics - clickhouselogsexporter: - dsn: tcp://clickhouse:9000/signoz_logs - timeout: 10s - use_new_schema: true - # debug: {} -service: - telemetry: - logs: - encoding: json - metrics: - address: 0.0.0.0:8888 - extensions: - - health_check - - pprof - - basicauth/server - pipelines: - traces: - receivers: [otlp] - processors: [signozspanmetrics/delta, batch] - exporters: [clickhousetraces] - metrics: - receivers: [otlp] - processors: [batch] - exporters: [clickhousemetricswrite, clickhousemetricswritev2] - metrics/prometheus: - receivers: [prometheus] - processors: [batch] - exporters: [clickhousemetricswrite/prometheus, clickhousemetricswritev2] - logs: - receivers: [otlp, tcplog/docker] - processors: [transform, batch] - exporters: [clickhouselogsexporter] diff --git a/example-crs-webservice/README.md b/example-crs-webservice/README.md index 67cc184..4bfec79 100644 --- a/example-crs-webservice/README.md +++ b/example-crs-webservice/README.md @@ -37,19 +37,21 @@ Install the dependencies for the package using the following `pip` command: $ pip install -e .[tests] ``` -Instead of installing the dependencies on your local machine, you may also use the compose.yaml. +Instead of installing the dependencies on your local machine, you may also use the compose.yaml. **Please note**: `competition-api` uses Podman, whereas the compose.yaml uses Docker. In order to use `docker compose` without having the +Docker daemon conflict with Podman, you may have to point the `DOCKER_HOST` environment variable to a podman socket. Please see instructions at this link for details: +https://podman-desktop.io/docs/migrating-from-docker/using-the-docker_host-environment-variable. #### Usage **Competition API Client** -The `example-competition-api` provides a mock implementation of the competition API which will validate input formats and provide example outputs. +The `competition-api` provides a implementation of the competition API which will validate input formats and provide example outputs. -The complete instructions for running the `example-competition-server` are available under [example-competition-server/](https://github.com/AIxCyberChallenge/example-crs-architecture/tree/main/example-competition-server). +The complete instructions for running the `competition-api` are available at https://github.com/AIxCyberChallenge/competition-api. All endpoints use HTTP Basic authentication. Use `11111111-1111-1111-1111-111111111111` and `secret` as the credentials. -A basic UI showing API interactions and formats is available at `http://localhost:1323/swagger/`. +A basic UI showing API interactions and formats is available at `http://localhost:30080/swagger/`. Test the Competition API client example implemented in `test_ping_api.py`. @@ -80,21 +82,9 @@ The web server will be accessible at `http://localhost:1324` by default. The [generate-challenge-task](https://github.com/AIxCyberChallenge/example-crs-architecture/tree/main/generate-challenge-task) script may be used to construct an HTTP request that the task server expects. -Alternatively, the `example-competition-server` may be used to generate and send tasks to the task server. +Alternatively, the `competition-api` may be used to generate and send tasks to the task server. `competition-api` is set up such that it receives events from Github via a webhook, and uses those events to generate +tasks. Please see the above link for details -This can be performed by sending a web request to the `example-competition-server` which in turn will then send a request over the CRS API to the task server. - -The example curl command below will stage a full scan task to the `example-competition-server` which will then send the task over to the task server. - -```bash -curl -X 'POST' 'http://localhost:1323/webhook/trigger_task' -H 'Content-Type: application/json' -d '{ - "challenge_repo_url": "git@github.com:.git", - "challenge_repo_head_ref": "", - "fuzz_tooling_url": "https://github.com/aixcc-finals/oss-fuzz-aixcc.git", - "fuzz_tooling_ref": "", - "fuzz_tooling_project_name": "", - "duration": 3600 -}' ``` #### Reproducing this repository @@ -127,9 +117,9 @@ $ sed -i -e 's/from openapi_client./from .openapi_client./' *. $ sed -i -e 's/import openapi_client./import ./' *.py ``` -The HTTP client code can be tested against the provided `example-competition-api` available as a Docker container at `ghcr.io/aixcc-finals/example-crs-architecture/competition-test-api:v1.4-rc1`. This container provides a mock Competition API on port 1323. +The HTTP client code can be tested against `competition-api` available at https://github.com/AIxCyberChallenge/competition-api/tree/main. This container provides a mock Competition API on port 30080. -Example code for how to interact with the `example-competition-api` has been added under `test/test_ping_api.py`. +Example code for how to interact with the `competition-api` has been added under `test/test_ping_api.py`. **CRS API Web Server** diff --git a/example-crs-webservice/submission.env b/example-crs-webservice/submission.env index 9775357..47897b6 100644 --- a/example-crs-webservice/submission.env +++ b/example-crs-webservice/submission.env @@ -1,7 +1,7 @@ # Competition API variables COMPETITION_API_TEAM_ID="11111111-1111-1111-1111-111111111111" COMPETITION_API_TEAM_SECRET="secret" -COMPETITION_API_ENDPOINT="http://scantron:1323" +COMPETITION_API_ENDPOINT="http://host.docker.internal:1323" # CRS variables CRS_API_KEY_ID="api_key_id" diff --git a/example-crs-webservice/test/test_ping_api.py b/example-crs-webservice/test/test_ping_api.py index 93bba73..12a8382 100644 --- a/example-crs-webservice/test/test_ping_api.py +++ b/example-crs-webservice/test/test_ping_api.py @@ -24,7 +24,7 @@ class TestPingApi(unittest.TestCase): def setUp(self) -> None: configuration = Configuration( - host="http://localhost:1323", + host="http://localhost:30080", username="11111111-1111-1111-1111-111111111111", password="secret", )