diff --git a/.dockerignore b/.dockerignore
deleted file mode 100644
index fedf55d1..00000000
--- a/.dockerignore
+++ /dev/null
@@ -1,33 +0,0 @@
-admin/admin
-checker/checker
-dashboard/dashboard
-evdist/evdist
-generator/generator
-receiver/receiver
-repochecker/repochecker
-frontend/fic/build
-frontend/fic/node_modules
-qa/ui/build
-qa/ui/node_modules
-fickit-backend-initrd.img
-fickit-backend-kernel
-fickit-backend-squashfs.img
-fickit-backend-state
-fickit-frontend-initrd.img
-fickit-frontend-kernel
-fickit-frontend-squashfs.img
-fickit-frontend-state
-fickit-prepare-initrd.img
-fickit-prepare-kernel
-fickit-update-initrd.img
-fickit-update-kernel
-DASHBOARD
-FILES
-PKI
-REMOTE
-repochecker/*.so
-SETTINGS
-SETTINGSDIST
-submissions
-TEAMS
-vendor
\ No newline at end of file
diff --git a/.drone-manifest-fic-admin.yml b/.drone-manifest-fic-admin.yml
deleted file mode 100644
index fc1154f7..00000000
--- a/.drone-manifest-fic-admin.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-image: nemunaire/fic-admin:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
-{{#if build.tags}}
-tags:
-{{#each build.tags}}
- - {{this}}
-{{/each}}
-{{/if}}
-manifests:
- - image: nemunaire/fic-admin:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
- platform:
- architecture: amd64
- os: linux
- - image: nemunaire/fic-admin:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
- platform:
- architecture: arm64
- os: linux
- variant: v8
- - image: nemunaire/fic-admin:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm
- platform:
- architecture: arm
- os: linux
- variant: v7
diff --git a/.drone-manifest-fic-checker.yml b/.drone-manifest-fic-checker.yml
deleted file mode 100644
index 13721117..00000000
--- a/.drone-manifest-fic-checker.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-image: nemunaire/fic-checker:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
-{{#if build.tags}}
-tags:
-{{#each build.tags}}
- - {{this}}
-{{/each}}
-{{/if}}
-manifests:
- - image: nemunaire/fic-checker:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
- platform:
- architecture: amd64
- os: linux
- - image: nemunaire/fic-checker:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
- platform:
- architecture: arm64
- os: linux
- variant: v8
- - image: nemunaire/fic-checker:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm
- platform:
- architecture: arm
- os: linux
- variant: v7
diff --git a/.drone-manifest-fic-dashboard.yml b/.drone-manifest-fic-dashboard.yml
deleted file mode 100644
index 4f74d234..00000000
--- a/.drone-manifest-fic-dashboard.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-image: nemunaire/fic-dashboard:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
-{{#if build.tags}}
-tags:
-{{#each build.tags}}
- - {{this}}
-{{/each}}
-{{/if}}
-manifests:
- - image: nemunaire/fic-dashboard:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
- platform:
- architecture: amd64
- os: linux
- - image: nemunaire/fic-dashboard:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
- platform:
- architecture: arm64
- os: linux
- variant: v8
- - image: nemunaire/fic-dashboard:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm
- platform:
- architecture: arm
- os: linux
- variant: v7
diff --git a/.drone-manifest-fic-evdist.yml b/.drone-manifest-fic-evdist.yml
deleted file mode 100644
index 70b1e5c5..00000000
--- a/.drone-manifest-fic-evdist.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-image: nemunaire/fic-evdist:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
-{{#if build.tags}}
-tags:
-{{#each build.tags}}
- - {{this}}
-{{/each}}
-{{/if}}
-manifests:
- - image: nemunaire/fic-evdist:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
- platform:
- architecture: amd64
- os: linux
- - image: nemunaire/fic-evdist:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
- platform:
- architecture: arm64
- os: linux
- variant: v8
- - image: nemunaire/fic-evdist:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm
- platform:
- architecture: arm
- os: linux
- variant: v7
diff --git a/.drone-manifest-fic-frontend-ui.yml b/.drone-manifest-fic-frontend-ui.yml
deleted file mode 100644
index 0fc4a3a6..00000000
--- a/.drone-manifest-fic-frontend-ui.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-image: nemunaire/fic-frontend-ui:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
-{{#if build.tags}}
-tags:
-{{#each build.tags}}
- - {{this}}
-{{/each}}
-{{/if}}
-manifests:
- - image: nemunaire/fic-frontend-ui:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
- platform:
- architecture: amd64
- os: linux
- - image: nemunaire/fic-frontend-ui:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
- platform:
- architecture: arm64
- os: linux
- variant: v8
- - image: nemunaire/fic-frontend-ui:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm
- platform:
- architecture: arm
- os: linux
- variant: v7
diff --git a/.drone-manifest-fic-generator.yml b/.drone-manifest-fic-generator.yml
deleted file mode 100644
index a2b2443f..00000000
--- a/.drone-manifest-fic-generator.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-image: nemunaire/fic-generator:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
-{{#if build.tags}}
-tags:
-{{#each build.tags}}
- - {{this}}
-{{/each}}
-{{/if}}
-manifests:
- - image: nemunaire/fic-generator:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
- platform:
- architecture: amd64
- os: linux
- - image: nemunaire/fic-generator:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
- platform:
- architecture: arm64
- os: linux
- variant: v8
- - image: nemunaire/fic-generator:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm
- platform:
- architecture: arm
- os: linux
- variant: v7
diff --git a/.drone-manifest-fic-get-remote-files.yml b/.drone-manifest-fic-get-remote-files.yml
deleted file mode 100644
index 0f64b8c1..00000000
--- a/.drone-manifest-fic-get-remote-files.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-image: nemunaire/fic-get-remote-files:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
-{{#if build.tags}}
-tags:
-{{#each build.tags}}
- - {{this}}
-{{/each}}
-{{/if}}
-manifests:
- - image: nemunaire/fic-get-remote-files:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
- platform:
- architecture: amd64
- os: linux
- - image: nemunaire/fic-get-remote-files:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
- platform:
- architecture: arm64
- os: linux
- variant: v8
- - image: nemunaire/fic-get-remote-files:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm
- platform:
- architecture: arm
- os: linux
- variant: v7
diff --git a/.drone-manifest-fic-nginx.yml b/.drone-manifest-fic-nginx.yml
deleted file mode 100644
index cbd2dcce..00000000
--- a/.drone-manifest-fic-nginx.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-image: nemunaire/fic-nginx:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
-{{#if build.tags}}
-tags:
-{{#each build.tags}}
- - {{this}}
-{{/each}}
-{{/if}}
-manifests:
- - image: nemunaire/fic-nginx:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
- platform:
- architecture: amd64
- os: linux
- - image: nemunaire/fic-nginx:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
- platform:
- architecture: arm64
- os: linux
- variant: v8
- - image: nemunaire/fic-nginx:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm
- platform:
- architecture: arm
- os: linux
- variant: v7
diff --git a/.drone-manifest-fic-qa.yml b/.drone-manifest-fic-qa.yml
deleted file mode 100644
index 5a158970..00000000
--- a/.drone-manifest-fic-qa.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-image: nemunaire/fic-qa:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
-{{#if build.tags}}
-tags:
-{{#each build.tags}}
- - {{this}}
-{{/each}}
-{{/if}}
-manifests:
- - image: nemunaire/fic-qa:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
- platform:
- architecture: amd64
- os: linux
- - image: nemunaire/fic-qa:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
- platform:
- architecture: arm64
- os: linux
- variant: v8
- - image: nemunaire/fic-qa:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm
- platform:
- architecture: arm
- os: linux
- variant: v7
diff --git a/.drone-manifest-fic-receiver.yml b/.drone-manifest-fic-receiver.yml
deleted file mode 100644
index eda2fe25..00000000
--- a/.drone-manifest-fic-receiver.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-image: nemunaire/fic-receiver:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
-{{#if build.tags}}
-tags:
-{{#each build.tags}}
- - {{this}}
-{{/each}}
-{{/if}}
-manifests:
- - image: nemunaire/fic-receiver:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
- platform:
- architecture: amd64
- os: linux
- - image: nemunaire/fic-receiver:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
- platform:
- architecture: arm64
- os: linux
- variant: v8
- - image: nemunaire/fic-receiver:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm
- platform:
- architecture: arm
- os: linux
- variant: v7
diff --git a/.drone-manifest-fic-repochecker.yml b/.drone-manifest-fic-repochecker.yml
deleted file mode 100644
index 9b239931..00000000
--- a/.drone-manifest-fic-repochecker.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-image: nemunaire/fic-repochecker:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
-{{#if build.tags}}
-tags:
-{{#each build.tags}}
- - {{this}}
-{{/each}}
-{{/if}}
-manifests:
- - image: nemunaire/fic-repochecker:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
- platform:
- architecture: amd64
- os: linux
- - image: nemunaire/fic-repochecker:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
- platform:
- architecture: arm64
- os: linux
- variant: v8
- - image: nemunaire/fic-repochecker:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm
- platform:
- architecture: arm
- os: linux
- variant: v7
diff --git a/.drone-manifest-fickit-deploy.yml b/.drone-manifest-fickit-deploy.yml
deleted file mode 100644
index bfa37052..00000000
--- a/.drone-manifest-fickit-deploy.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-image: nemunaire/fickit-deploy:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
-{{#if build.tags}}
-tags:
-{{#each build.tags}}
- - {{this}}
-{{/each}}
-{{/if}}
-manifests:
- - image: nemunaire/fickit-deploy:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
- platform:
- architecture: amd64
- os: linux
- - image: nemunaire/fickit-deploy:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
- platform:
- architecture: arm64
- os: linux
- variant: v8
- - image: nemunaire/fickit-deploy:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm
- platform:
- architecture: arm
- os: linux
- variant: v7
diff --git a/.drone.yml b/.drone.yml
deleted file mode 100644
index 3e0e2cbc..00000000
--- a/.drone.yml
+++ /dev/null
@@ -1,816 +0,0 @@
----
-kind: pipeline
-type: docker
-name: build-amd64
-
-platform:
- os: linux
- arch: amd64
-
-workspace:
- base: /go
- path: src/srs.epita.fr/fic-server
-
-steps:
- - name: get deps
- image: golang:alpine
- commands:
- - apk --no-cache add git
- - go get -v -d ./...
- - mkdir deploy
-
- - name: build qa ui
- image: node:23-alpine
- commands:
- - cd qa/ui
- - npm install --network-timeout=100000
- - npm run build
- - tar chjf ../../deploy/htdocs-qa.tar.bz2 build
-
- - name: vet and tests
- image: golang:alpine
- commands:
- - apk --no-cache add build-base
- - go vet -buildvcs=false -tags gitgo ./...
- - go vet -buildvcs=false ./...
- - go test ./...
-
- - name: build admin
- image: golang:alpine
- commands:
- - go build -buildvcs=false -tags gitgo -o deploy/admin-gitgo-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} srs.epita.fr/fic-server/admin
- - go build -buildvcs=false -o deploy/admin-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} srs.epita.fr/fic-server/admin
- - tar chjf deploy/htdocs-admin.tar.bz2 htdocs-admin
- environment:
- CGO_ENABLED: 0
- when:
- branch:
- exclude:
- - master
-
- - name: build checker
- image: golang:alpine
- commands:
- - go build -buildvcs=false -o deploy/checker-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} srs.epita.fr/fic-server/checker
- environment:
- CGO_ENABLED: 0
- when:
- branch:
- exclude:
- - master
-
- - name: build evdist
- image: golang:alpine
- commands:
- - go build -buildvcs=false -o deploy/evdist-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} srs.epita.fr/fic-server/evdist
- environment:
- CGO_ENABLED: 0
- when:
- branch:
- exclude:
- - master
-
- - name: build generator
- image: golang:alpine
- commands:
- - go build -buildvcs=false -o deploy/generator-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} srs.epita.fr/fic-server/generator
- environment:
- CGO_ENABLED: 0
- when:
- branch:
- exclude:
- - master
-
- - name: build receiver
- image: golang:alpine
- commands:
- - go build -buildvcs=false -o deploy/receiver-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} srs.epita.fr/fic-server/receiver
- environment:
- CGO_ENABLED: 0
- when:
- branch:
- exclude:
- - master
-
- - name: build frontend fic ui
- image: node:23-alpine
- commands:
- - cd frontend/fic
- - npm install --network-timeout=100000
- - npm run build
- - tar chjf ../../deploy/htdocs-frontend-fic.tar.bz2 build
- when:
- branch:
- exclude:
- - master
-
- - name: build dashboard
- image: golang:alpine
- commands:
- - go build -buildvcs=false -o deploy/dashboard-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} srs.epita.fr/fic-server/dashboard
- - tar chjf deploy/htdocs-dashboard.tar.bz2 htdocs-dashboard
- environment:
- CGO_ENABLED: 0
- when:
- branch:
- exclude:
- - master
-
- - name: build repochecker
- image: golang:alpine
- commands:
- - apk --no-cache add build-base
- - go build -buildvcs=false --tags checkupdate -o deploy/repochecker-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} srs.epita.fr/fic-server/repochecker
- - go build -buildvcs=false -buildmode=plugin -o deploy/repochecker-epita-rules-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}.so srs.epita.fr/fic-server/repochecker/epita
- - go build -buildvcs=false -buildmode=plugin -o deploy/repochecker-file-inspector-rules-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}.so srs.epita.fr/fic-server/repochecker/file-inspector
- - go build -buildvcs=false -buildmode=plugin -o deploy/repochecker-grammalecte-rules-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}.so srs.epita.fr/fic-server/repochecker/grammalecte
- - go build -buildvcs=false -buildmode=plugin -o deploy/repochecker-pcap-inspector-rules-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}.so srs.epita.fr/fic-server/repochecker/pcap-inspector
- - go build -buildvcs=false -buildmode=plugin -o deploy/repochecker-videos-rules-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}.so srs.epita.fr/fic-server/repochecker/videos
- - grep "const version" repochecker/update.go | sed -r 's/^.*=\s*(\S.*)$/\1/' > deploy/repochecker.version
- when:
- branch:
- exclude:
- - master
-
- - name: build qa
- image: golang:alpine
- commands:
- - go build -buildvcs=false -o deploy/qa-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} srs.epita.fr/fic-server/qa
- environment:
- CGO_ENABLED: 0
- when:
- branch:
- exclude:
- - master
-
- - name: docker admin
- image: plugins/docker
- settings:
- username:
- from_secret: docker_username
- password:
- from_secret: docker_password
- repo: nemunaire/fic-admin
- auto_tag: true
- auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
- dockerfile: Dockerfile-admin
- when:
- branch:
- - master
-
- - name: docker checker
- image: plugins/docker
- settings:
- username:
- from_secret: docker_username
- password:
- from_secret: docker_password
- repo: nemunaire/fic-checker
- auto_tag: true
- auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
- dockerfile: Dockerfile-checker
- when:
- branch:
- - master
-
- - name: docker evdist
- image: plugins/docker
- settings:
- username:
- from_secret: docker_username
- password:
- from_secret: docker_password
- repo: nemunaire/fic-evdist
- auto_tag: true
- auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
- dockerfile: Dockerfile-evdist
- when:
- branch:
- - master
-
- - name: docker generator
- image: plugins/docker
- settings:
- username:
- from_secret: docker_username
- password:
- from_secret: docker_password
- repo: nemunaire/fic-generator
- auto_tag: true
- auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
- dockerfile: Dockerfile-generator
- when:
- branch:
- - master
-
- - name: docker receiver
- image: plugins/docker
- settings:
- username:
- from_secret: docker_username
- password:
- from_secret: docker_password
- repo: nemunaire/fic-receiver
- auto_tag: true
- auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
- dockerfile: Dockerfile-receiver
- when:
- branch:
- - master
-
- - name: docker frontend nginx
- image: plugins/docker
- settings:
- username:
- from_secret: docker_username
- password:
- from_secret: docker_password
- repo: nemunaire/fic-nginx
- auto_tag: true
- auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
- dockerfile: Dockerfile-nginx
- when:
- branch:
- - master
-
- - name: docker frontend ui
- image: plugins/docker
- settings:
- username:
- from_secret: docker_username
- password:
- from_secret: docker_password
- repo: nemunaire/fic-frontend-ui
- auto_tag: true
- auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
- dockerfile: Dockerfile-frontend-ui
- when:
- branch:
- - master
-
- - name: docker dashboard
- image: plugins/docker
- settings:
- username:
- from_secret: docker_username
- password:
- from_secret: docker_password
- repo: nemunaire/fic-dashboard
- auto_tag: true
- auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
- dockerfile: Dockerfile-dashboard
- when:
- branch:
- - master
-
- - name: docker qa
- image: plugins/docker
- settings:
- username:
- from_secret: docker_username
- password:
- from_secret: docker_password
- repo: nemunaire/fic-qa
- auto_tag: true
- auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
- dockerfile: Dockerfile-qa
- when:
- branch:
- - master
-
- - name: docker repochecker
- image: plugins/docker
- settings:
- username:
- from_secret: docker_username
- password:
- from_secret: docker_password
- repo: nemunaire/fic-repochecker
- auto_tag: true
- auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
- dockerfile: Dockerfile-repochecker
- when:
- branch:
- - master
-
- - name: docker remote-scores-sync-zqds
- image: plugins/docker
- settings:
- username:
- from_secret: docker_username
- password:
- from_secret: docker_password
- repo: nemunaire/fic-remote-scores-sync-zqds
- auto_tag: true
- auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
- dockerfile: Dockerfile-remote-scores-sync-zqds
- when:
- branch:
- - master
-
- - name: docker remote-challenge-sync-airbus
- image: plugins/docker
- settings:
- username:
- from_secret: docker_username
- password:
- from_secret: docker_password
- repo: nemunaire/fic-remote-challenge-sync-airbus
- auto_tag: true
- auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
- dockerfile: Dockerfile-remote-challenge-sync-airbus
- when:
- branch:
- - master
-
- - name: docker fic-get-remote-files
- failure: ignore
- image: plugins/docker
- settings:
- username:
- from_secret: docker_username
- password:
- from_secret: docker_password
- repo: nemunaire/fic-get-remote-files
- auto_tag: true
- auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
- dockerfile: Dockerfile-get-remote-files
- when:
- branch:
- - master
-
- - name: docker fickit-deploy
- image: plugins/docker
- settings:
- username:
- from_secret: docker_username
- password:
- from_secret: docker_password
- repo: nemunaire/fickit-deploy
- auto_tag: true
- auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
- dockerfile: Dockerfile-deploy
- when:
- branch:
- - master
-
-trigger:
- event:
- - cron
- - push
- - tag
-
----
-kind: pipeline
-type: docker
-name: build-arm64
-
-platform:
- os: linux
- arch: arm64
-
-workspace:
- base: /go
- path: src/srs.epita.fr/fic-server
-
-steps:
- - name: get deps
- image: golang:alpine
- commands:
- - apk --no-cache add git
- - go get -d ./...
- - mkdir deploy
-
- - name: build admin
- image: golang:alpine
- commands:
- - apk --no-cache add build-base
- - go build -buildvcs=false -o deploy/admin-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} srs.epita.fr/fic-server/admin
- environment:
- CGO_ENABLED: 0
- when:
- branch:
- exclude:
- - master
-
- - name: build checker
- image: golang:alpine
- commands:
- - go build -buildvcs=false -o deploy/checker-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} srs.epita.fr/fic-server/checker
- environment:
- CGO_ENABLED: 0
- when:
- branch:
- exclude:
- - master
-
- - name: build evdist
- image: golang:alpine
- commands:
- - go build -buildvcs=false -o deploy/evdist-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} srs.epita.fr/fic-server/evdist
- environment:
- CGO_ENABLED: 0
- when:
- branch:
- exclude:
- - master
-
- - name: build generator
- image: golang:alpine
- commands:
- - go build -buildvcs=false -o deploy/generator-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} srs.epita.fr/fic-server/generator
- environment:
- CGO_ENABLED: 0
- when:
- branch:
- exclude:
- - master
-
- - name: build receiver
- image: golang:alpine
- commands:
- - go build -buildvcs=false -o deploy/receiver-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} srs.epita.fr/fic-server/receiver
- environment:
- CGO_ENABLED: 0
- when:
- branch:
- exclude:
- - master
-
- - name: build frontend fic ui
- image: node:23-alpine
- commands:
- - cd frontend/fic
- - npm install --network-timeout=100000
- - npm run build
- when:
- branch:
- exclude:
- - master
-
- - name: build dashboard
- image: golang:alpine
- commands:
- - go build -buildvcs=false -o deploy/dashboard-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} srs.epita.fr/fic-server/dashboard
- environment:
- CGO_ENABLED: 0
- when:
- branch:
- exclude:
- - master
-
- - name: build repochecker
- image: golang:alpine
- commands:
- - apk --no-cache add build-base
- - go build -buildvcs=false --tags checkupdate -o deploy/repochecker-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} srs.epita.fr/fic-server/repochecker
- environment:
- CGO_ENABLED: 0
- when:
- branch:
- exclude:
- - master
-
- - name: build repochecker for macOS
- image: golang:alpine
- commands:
- - apk --no-cache add build-base
- - go build -buildvcs=false --tags checkupdate -o deploy/repochecker-darwin-${DRONE_STAGE_ARCH} srs.epita.fr/fic-server/repochecker
- environment:
- CGO_ENABLED: 0
- GOOS: darwin
- GOARCH: arm64
- when:
- branch:
- exclude:
- - master
-
- - name: build qa ui
- image: node:23-alpine
- commands:
- - cd qa/ui
- - npm install --network-timeout=100000
- - npm run build
- - tar chjf ../../deploy/htdocs-qa.tar.bz2 build
- when:
- branch:
- exclude:
- - master
-
- - name: build qa
- image: golang:alpine
- commands:
- - go build -buildvcs=false -o deploy/qa-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} srs.epita.fr/fic-server/qa
- environment:
- CGO_ENABLED: 0
- when:
- branch:
- exclude:
- - master
-
- - name: docker admin
- image: plugins/docker
- settings:
- username:
- from_secret: docker_username
- password:
- from_secret: docker_password
- repo: nemunaire/fic-admin
- auto_tag: true
- auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
- dockerfile: Dockerfile-admin
- when:
- branch:
- - master
-
- - name: docker checker
- image: plugins/docker
- settings:
- username:
- from_secret: docker_username
- password:
- from_secret: docker_password
- repo: nemunaire/fic-checker
- auto_tag: true
- auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
- dockerfile: Dockerfile-checker
- when:
- branch:
- - master
-
- - name: docker evdist
- image: plugins/docker
- settings:
- username:
- from_secret: docker_username
- password:
- from_secret: docker_password
- repo: nemunaire/fic-evdist
- auto_tag: true
- auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
- dockerfile: Dockerfile-evdist
- when:
- branch:
- - master
-
- - name: docker generator
- image: plugins/docker
- settings:
- username:
- from_secret: docker_username
- password:
- from_secret: docker_password
- repo: nemunaire/fic-generator
- auto_tag: true
- auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
- dockerfile: Dockerfile-generator
- when:
- branch:
- - master
-
- - name: docker fic-get-remote-files
- failure: ignore
- image: plugins/docker
- settings:
- username:
- from_secret: docker_username
- password:
- from_secret: docker_password
- repo: nemunaire/fic-get-remote-files
- auto_tag: true
- auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
- dockerfile: Dockerfile-get-remote-files
- when:
- branch:
- - master
-
- - name: docker receiver
- image: plugins/docker
- settings:
- username:
- from_secret: docker_username
- password:
- from_secret: docker_password
- repo: nemunaire/fic-receiver
- auto_tag: true
- auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
- dockerfile: Dockerfile-receiver
- when:
- branch:
- - master
-
- - name: docker frontend nginx
- image: plugins/docker
- settings:
- username:
- from_secret: docker_username
- password:
- from_secret: docker_password
- repo: nemunaire/fic-nginx
- auto_tag: true
- auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
- dockerfile: Dockerfile-nginx
- when:
- branch:
- - master
-
- - name: docker dashboard
- image: plugins/docker
- settings:
- username:
- from_secret: docker_username
- password:
- from_secret: docker_password
- repo: nemunaire/fic-dashboard
- auto_tag: true
- auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
- dockerfile: Dockerfile-dashboard
- when:
- branch:
- - master
-
- - name: docker qa
- image: plugins/docker
- settings:
- username:
- from_secret: docker_username
- password:
- from_secret: docker_password
- repo: nemunaire/fic-qa
- auto_tag: true
- auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
- dockerfile: Dockerfile-qa
- when:
- branch:
- - master
-
- - name: docker repochecker
- image: plugins/docker
- settings:
- username:
- from_secret: docker_username
- password:
- from_secret: docker_password
- repo: nemunaire/fic-repochecker
- auto_tag: true
- auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
- dockerfile: Dockerfile-repochecker
- when:
- branch:
- - master
-
-trigger:
- event:
- - cron
- - push
- - tag
-
----
-kind: pipeline
-name: docker-manifest
-steps:
- - name: publish admin
- image: plugins/manifest
- settings:
- auto_tag: true
- ignore_missing: true
- spec: .drone-manifest-fic-admin.yml
- username:
- from_secret: docker_username
- password:
- from_secret: docker_password
-
- - name: publish checker
- image: plugins/manifest
- settings:
- auto_tag: true
- ignore_missing: true
- spec: .drone-manifest-fic-checker.yml
- username:
- from_secret: docker_username
- password:
- from_secret: docker_password
-
- - name: publish evdist
- image: plugins/manifest
- settings:
- auto_tag: true
- ignore_missing: true
- spec: .drone-manifest-fic-evdist.yml
- username:
- from_secret: docker_username
- password:
- from_secret: docker_password
-
- - name: publish generator
- image: plugins/manifest
- settings:
- auto_tag: true
- ignore_missing: true
- spec: .drone-manifest-fic-generator.yml
- username:
- from_secret: docker_username
- password:
- from_secret: docker_password
-
- - name: publish receiver
- image: plugins/manifest
- settings:
- auto_tag: true
- ignore_missing: true
- spec: .drone-manifest-fic-receiver.yml
- username:
- from_secret: docker_username
- password:
- from_secret: docker_password
-
- - name: publish frontend nginx
- image: plugins/manifest
- settings:
- auto_tag: true
- ignore_missing: true
- spec: .drone-manifest-fic-nginx.yml
- username:
- from_secret: docker_username
- password:
- from_secret: docker_password
-
- - name: publish frontend ui
- image: plugins/manifest
- settings:
- auto_tag: true
- ignore_missing: true
- spec: .drone-manifest-fic-frontend-ui.yml
- username:
- from_secret: docker_username
- password:
- from_secret: docker_password
-
- - name: publish dashboard
- image: plugins/manifest
- settings:
- auto_tag: true
- ignore_missing: true
- spec: .drone-manifest-fic-dashboard.yml
- username:
- from_secret: docker_username
- password:
- from_secret: docker_password
-
- - name: publish repochecker
- image: plugins/manifest
- settings:
- auto_tag: true
- ignore_missing: true
- spec: .drone-manifest-fic-repochecker.yml
- username:
- from_secret: docker_username
- password:
- from_secret: docker_password
-
- - name: publish qa
- image: plugins/manifest
- settings:
- auto_tag: true
- ignore_missing: true
- spec: .drone-manifest-fic-qa.yml
- username:
- from_secret: docker_username
- password:
- from_secret: docker_password
-
- - name: docker fic-get-remote-files
- failure: ignore
- image: plugins/docker
- settings:
- username:
- from_secret: docker_username
- password:
- from_secret: docker_password
- repo: nemunaire/fic-get-remote-files
- auto_tag: true
- auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
- dockerfile: Dockerfile-get-remote-files
- when:
- branch:
- - master
-
- - name: publish fickit-deploy
- image: plugins/manifest
- settings:
- auto_tag: true
- ignore_missing: true
- spec: .drone-manifest-fickit-deploy.yml
- username:
- from_secret: docker_username
- password:
- from_secret: docker_password
-
-trigger:
- event:
- - push
- - tag
-
-depends_on:
-- build-amd64
-- build-arm64
diff --git a/.gitignore b/.gitignore
index 4327ccd0..b1d213ad 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,43 +1,11 @@
-vendor/
-DASHBOARD/
-FILES/
-PKI/
-REMOTE/
-SETTINGS/
-SETTINGSDIST/
-TEAMS/
-submissions/
-admin/sync/README.html
-fickit-boot-cmdline
-fickit-boot-initrd.img
-fickit-boot-kernel
-fickit-backend-cmdline
-fickit-backend-initrd.img
-fickit-backend-squashfs.img
-fickit-backend-kernel
-fickit-backend-state
-fickit-frontend-cmdline
-fickit-frontend-initrd.img
-fickit-frontend-squashfs.img
-fickit-frontend-kernel
-fickit-frontend-state
-fickit-prepare-bios.img
-fickit-prepare-cmdline
-fickit-prepare-initrd.img
-fickit-prepare-kernel
-fickit-prepare-state
-fickit-update-cmdline
-fickit-update-initrd.img
-fickit-update-kernel
-fickit-update-squashfs.img
-result
-started
-
-# Standalone binaries
-admin/get-remote-files/get-remote-files
-fic-admin
-fic-backend
-fic-dashboard
-fic-frontend
-fic-qa
-fic-repochecker
+*.swp
+*~
+*#
+onyx/cache/*.cache.php
+onyx/cache/templates/*/*.php
+onyx/log/*
+onyx/config/root.xml
+onyx/db/*.profile.php
+onyx/tpl/*/*.html
+submission/*
+misc/openssl.cnf
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
deleted file mode 100644
index 0e57016f..00000000
--- a/.gitlab-ci.yml
+++ /dev/null
@@ -1,122 +0,0 @@
----
-
-stages:
- - deps
- - build
- - fickit
- - sast
- - qa
- - image
- - container_scanning
-
-cache:
- paths:
- - .go/pkg/mod/
- - qa/ui/node_modules/
- - frontend/ui/node_modules/
-
-include:
- - '.gitlab-ci/build.yml'
- - '.gitlab-ci/image.yml'
- - template: SAST.gitlab-ci.yml
- - template: Security/Dependency-Scanning.gitlab-ci.yml
- - template: Security/Secret-Detection.gitlab-ci.yml
- - template: Security/Container-Scanning.gitlab-ci.yml
-
-.scanners-matrix:
- parallel:
- matrix:
- - IMAGE_NAME: [checker, admin, evdist, frontend-ui, nginx, dashboard, repochecker, qa, receiver, generator, remote-challenge-sync-airbus]
-
-container_scanning:
- stage: container_scanning
- extends:
- - .scanners-matrix
- variables:
- DOCKER_SERVICE: localhost
- DOCKERFILE_PATH: Dockerfile-${IMAGE_NAME}
- CI_APPLICATION_REPOSITORY: ${CI_REGISTRY_IMAGE}/${CI_COMMIT_REF_SLUG}/${IMAGE_NAME}
- CI_APPLICATION_TAG: latest
- GIT_STRATEGY: fetch
- before_script:
- - 'echo "Scanning: ${IMAGE_NAME}"'
- rules:
- - if: '$CI_COMMIT_BRANCH == "master"'
-
-sast:
- stage: sast
- interruptible: true
- needs: []
- before_script:
- - rm -rf .go/
-
-secret_detection:
- stage: sast
- interruptible: true
- needs: []
-
-dependency_scanning:
- stage: qa
- interruptible: true
- needs: []
-
-get-deps:
- stage: deps
- image: golang:1-alpine
- before_script:
- - export GOPATH="$CI_PROJECT_DIR/.go"
- - mkdir -p .go
- script:
- - apk --no-cache add git
- - go get -v -d ./...
-
-vet:
- stage: sast
- needs: ["build-qa-ui"]
- dependencies:
- - build-qa-ui
- image: golang:1-alpine
- before_script:
- - export GOPATH="$CI_PROJECT_DIR/.go"
- - mkdir -p .go
- script:
- - apk --no-cache add build-base
- - go vet -v -buildvcs=false -tags gitgo ./...
- - go vet -v -buildvcs=false ./...
-
-fickit:
- stage: fickit
- interruptible: true
- needs: ["build-admin","build-checker","build-dashboard","build-evdist","build-generator","build-qa","build-receiver","build-repochecker"]
- image: nemunaire/linuxkit
- tags: ['docker']
- before_script:
- - mkdir -p ~/.docker
- - echo "{\"auths\":{\"${CI_REGISTRY}\":{\"username\":\"${CI_REGISTRY_USER}\",\"password\":\"${CI_REGISTRY_PASSWORD}\"}}}" > ~/.docker/config.json
- script:
- - dockerd & sleep 5
-
- - linuxkit pkg push -force -org "${CI_REGISTRY_IMAGE}/${CI_COMMIT_REF_SLUG}" fickit-pkg/boot/
- - linuxkit pkg push -force -org "${CI_REGISTRY_IMAGE}/${CI_COMMIT_REF_SLUG}" fickit-pkg/kexec/
- - linuxkit pkg push -force -org "${CI_REGISTRY_IMAGE}/${CI_COMMIT_REF_SLUG}" fickit-pkg/mariadb-client/
- - linuxkit pkg push -force -org "${CI_REGISTRY_IMAGE}/${CI_COMMIT_REF_SLUG}" fickit-pkg/mdadm/
- - linuxkit pkg push -force -org "${CI_REGISTRY_IMAGE}/${CI_COMMIT_REF_SLUG}" fickit-pkg/rsync/
- - linuxkit pkg push -force -org "${CI_REGISTRY_IMAGE}/${CI_COMMIT_REF_SLUG}" fickit-pkg/syslinux/
- - linuxkit pkg push -force -org "${CI_REGISTRY_IMAGE}/${CI_COMMIT_REF_SLUG}" fickit-pkg/unbound/
-
- - sed -i "s@nemunaire/fic-@${CI_REGISTRY_IMAGE}/master/@;s@nemunaire/@${CI_REGISTRY_IMAGE}/${CI_COMMIT_REF_SLUG}/@" fickit-backend.yml fickit-boot.yml fickit-frontend.yml fickit-prepare.yml fickit-update.yml
-
- - linuxkit build -format kernel+squashfs fickit-backend.yml
- - linuxkit build -format kernel+squashfs fickit-frontend.yml
- - linuxkit build -format kernel+initrd fickit-boot.yml
- - linuxkit build -format kernel+initrd fickit-prepare.yml
- - linuxkit build -format kernel+initrd fickit-update.yml
- artifacts:
- expire_in: 8 hours
- paths:
- - fickit-backend-squashfs.img
- - fickit-frontend-squashfs.img
- - fickit-boot-kernel
- - fickit-boot-initrd.img
- - fickit-prepare-initrd.img
- - fickit-update-initrd.img
diff --git a/.gitlab-ci/build.yml b/.gitlab-ci/build.yml
deleted file mode 100644
index 621d8bbb..00000000
--- a/.gitlab-ci/build.yml
+++ /dev/null
@@ -1,93 +0,0 @@
----
-
-.build:
- stage: build
- image: golang:1-alpine
- before_script:
- - export GOPATH="$CI_PROJECT_DIR/.go"
- - mkdir -p .go
- variables:
- CGO_ENABLED: 0
-
-build-qa-ui:
- stage: build
- image: node:21-alpine
- before_script:
- script:
- - cd qa/ui
- - npm install --network-timeout=100000
- - npm run build
- artifacts:
- paths:
- - qa/ui/build/
- when: on_success
-
-build-checker:
- extends:
- - .build
- script:
- - go build -v -buildvcs=false -o deploy/checker srs.epita.fr/fic-server/checker
-
-build-generator:
- extends:
- - .build
- script:
- - go build -v -buildvcs=false -o deploy/generator srs.epita.fr/fic-server/generator
-
-build-receiver:
- extends:
- - .build
- script:
- - go build -v -buildvcs=false -o deploy/receiver srs.epita.fr/fic-server/receiver
-
-build-admin:
- extends:
- - .build
- script:
- - go build -v -buildvcs=false -tags gitgo -o deploy/admin-gitgo srs.epita.fr/fic-server/admin
- - go build -v -buildvcs=false -o deploy/admin srs.epita.fr/fic-server/admin
-
-build-evdist:
- extends:
- - .build
- script:
- - go build -v -buildvcs=false -o deploy/evdist srs.epita.fr/fic-server/evdist
-
-build-frontend-ui:
- stage: build
- image: node:21-alpine
- before_script:
- script:
- - cd frontend/fic
- - npm install --network-timeout=100000
- - npm run build
-
-build-dashboard:
- extends:
- - .build
- script:
- - go build -v -buildvcs=false -o deploy/dashboard srs.epita.fr/fic-server/dashboard
-
-build-repochecker:
- extends:
- - .build
- variables:
- CGO_ENABLED: 1
- script:
- - apk --no-cache add build-base
- - go build -buildvcs=false --tags checkupdate -v -o deploy/repochecker srs.epita.fr/fic-server/repochecker
- - go build -buildvcs=false -buildmode=plugin -v -o deploy/repochecker-epita-rules.so srs.epita.fr/fic-server/repochecker/epita
- - go build -buildvcs=false -buildmode=plugin -v -o deploy/repochecker-file-inspector-rules.so srs.epita.fr/fic-server/repochecker/file-inspector
- - go build -buildvcs=false -buildmode=plugin -v -o deploy/repochecker-grammalecte-rules.so srs.epita.fr/fic-server/repochecker/grammalecte
- - go build -buildvcs=false -buildmode=plugin -v -o deploy/repochecker-pcap-inspector-rules.so srs.epita.fr/fic-server/repochecker/pcap-inspector
- - go build -buildvcs=false -buildmode=plugin -v -o deploy/repochecker-videos-rules.so srs.epita.fr/fic-server/repochecker/videos
- - grep "const version" repochecker/update.go | sed -r 's/^.*=\s*(\S.*)$/\1/' > deploy/repochecker.version
-
-build-qa:
- extends:
- - .build
- needs: ["build-qa-ui"]
- dependencies:
- - build-qa-ui
- script:
- - go build -v -buildvcs=false -o deploy/qa srs.epita.fr/fic-server/qa
diff --git a/.gitlab-ci/image.yml b/.gitlab-ci/image.yml
deleted file mode 100644
index 988bb2b0..00000000
--- a/.gitlab-ci/image.yml
+++ /dev/null
@@ -1,99 +0,0 @@
----
-
-.push:
- stage: image
- interruptible: true
- needs: []
- image:
- name: gcr.io/kaniko-project/executor:v1.9.0-debug
- entrypoint: [""]
- before_script:
- - mkdir -p /kaniko/.docker
- - echo "{\"auths\":{\"${CI_REGISTRY}\":{\"username\":\"${CI_REGISTRY_USER}\",\"password\":\"${CI_REGISTRY_PASSWORD}\"}}}" > /kaniko/.docker/config.json
- script:
- - |
- /kaniko/executor \
- --context . \
- --dockerfile "${DOCKERFILE}" \
- --destination "${CI_REGISTRY_IMAGE}/${CI_COMMIT_REF_SLUG}/${CI_JOB_NAME}:${CI_COMMIT_SHA}" \
- --destination "${CI_REGISTRY_IMAGE}/${CI_COMMIT_REF_SLUG}/${CI_JOB_NAME}:latest"
- only:
- - master
-
-checker:
- extends:
- - .push
- variables:
- DOCKERFILE: Dockerfile-checker
-
-receiver:
- extends:
- - .push
- variables:
- DOCKERFILE: Dockerfile-receiver
-
-generator:
- extends:
- - .push
- variables:
- DOCKERFILE: Dockerfile-generator
-
-admin:
- extends:
- - .push
- variables:
- DOCKERFILE: Dockerfile-admin
-
-fickit-deploy:
- extends:
- - .push
- variables:
- DOCKERFILE: Dockerfile-deploy
-
-get-remote-files:
- extends:
- - .push
- variables:
- DOCKERFILE: Dockerfile-get-remote-files
-
-evdist:
- extends:
- - .push
- variables:
- DOCKERFILE: Dockerfile-evdist
-
-frontend-ui:
- extends:
- - .push
- variables:
- DOCKERFILE: Dockerfile-frontend-ui
-
-nginx:
- extends:
- - .push
- variables:
- DOCKERFILE: Dockerfile-nginx
-
-dashboard:
- extends:
- - .push
- variables:
- DOCKERFILE: Dockerfile-dashboard
-
-repochecker:
- extends:
- - .push
- variables:
- DOCKERFILE: Dockerfile-repochecker
-
-qa:
- extends:
- - .push
- variables:
- DOCKERFILE: Dockerfile-qa
-
-remote-challenge-sync-airbus:
- extends:
- - .push
- variables:
- DOCKERFILE: Dockerfile-remote-challenge-sync-airbus
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 00000000..03cde9bd
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,26 @@
+# /!\ WARNING: the container generated through this Dockerfile is made only for development purpose; it is NOT SAFE or production ready.
+
+FROM php:5.5-fpm-alpine
+MAINTAINER Pierre-Olivier Mercier Le challenge forensic vous place dans la peau de spécialistes en investigation numérique. Nous mettons à votre disposition une vingtaine de scénarios différents, dans lesquels vous devrez faire les différentes étapes de la caractérisation d’une réponse à incident proposées. Chaque scénario met en scène un contexte d’entreprise, ayant découvert récemment qu’elle a été victime d’une cyberattaque. Elle vous demande alors de l’aider à caractériser, afin de mieux comprendre la situation, notamment le mode opératoire de l’adversaire, les impacts de la cyberattaque, le périmètre technique compromis, etc. Il faudra parfois aussi l’éclairer sur les premières étapes de la réaction. Pendant toute la durée du challenge, vous aurez accès à tous les scénarios, mais seulement à la première des 5 étapes. Chaque étape supplémentaire est débloquée lorsque vous validez l’intégralité de l’étape précédente. Toutefois, pour dynamiser le challenge toutes les étapes et tous les scénarios seront débloquées pour la dernière heure du challenge. Nous mettons à votre disposition une plateforme sur laquelle vous pourrez obtenir les informations sur le contexte de l’entreprise et, généralement, une série de fichiers qui semblent appropriés pour avancer dans l’investigation. La validation d’une étape se fait sur la plateforme, après avoir analysé les informations fournies, en répondant à des questions plus ou moins précises. Il s’agit le plus souvent des mots-clefs que l’on placerait dans un rapport. Pour vous débloquer ou accélérer votre investigation, vous pouvez accéder à quelques indices, en échange d’une décote sur votre score d’un certain nombre de points préalablement affichés. Chaque équipe dispose d’un compteur de points dans l’intervalle ]-∞;+∞[ (aux détails techniques près), à partir duquel le classement est établi. Vous perdez des points en dévoilant des indices, en demandant des propositions de réponses en remplacement de certains champs de texte, ou en essayant un trop grand nombre de fois une réponse. Le nombre de points que vous fait perdre un indice dépend habituellement de l’aide qu’il vous apportera et est indiqué avant de le dévoiler, car il peut fluctuer en fonction de l’avancement du challenge. Pour chaque champ de texte, vous disposez de 10 tentatives avant de perdre des points (vous perdez les points même si vous ne validez pas l’étape) pour chaque tentative supplémentaire : -0,25 point entre 11 et 20, -0,5 entre 21 et 30, -0,75 entre 31 et 40, … La seule manière de gagner des points est de valider une étape d’un scénario dans son intégralité. Le nombre de points gagnés dépend de la difficulté théorique de l’étape ainsi que d’éventuels bonus. Un bonus de 10 % est accordé à la première équipe qui valide une étape. D’autres bonus peuvent ponctuer le challenge, détaillé dans la partie suivante. Le classement est établi par équipe, selon le nombre de points récoltés et perdus par tous les membres. En cas d’égalité au score, les équipes sont départagées en fonction de leur ordre d’arrivée à ce score. Le challenge forensic est jalonné de plusieurs temps forts durant lesquels certains calculs détaillés dans la partie précédente peuvent être altérés. L’équipe d’animation du challenge vous avertira environ 15 minutes avant le début de la modification. Chaque modification se répercute instantanément dans votre interface, attendez simplement qu’elle apparaisse afin d’être certain d’en bénéficier. Un compte à rebours est généralement affiché sur les écrans pour indiquer la fin d’un temps fort. La fin d’application d’un bonus est déterminé par l’heure d’arrivée de votre demande sur nos serveurs. Sans y être limité ou assuré, sachez que durant les précédentes éditions du challenge forensic, nous avons par exemple : doublé les points de défis peu tentés, doublé les points de tous les défis pendant 30 minutes, réduit le coût des indices pendant 15 minutes, etc. Tous les étudiants de la majeure Système, Réseaux et Sécurité de l’ÉPITA, son équipe enseignante ainsi que le commandement de la cyberdéfense vous souhaitent bon courage pour cette nouvelle éditions du challenge ! Vous voici aujourd'hui dans la peau de spécialistes en investigation numérique. Vous avez à votre disposition une vingtaine de scénarios différents dans lesquels vous devrez faire les différentes étapes de la caractérisation d’une réponse à incident. Chaque scénario est découpé en 5 grandes étapes de difficulté croissante. Un certain nombre de points est attribué à chaque étape, avec un processus de validation automatique. Un classement est établi en temps réel, tenant compte des différents bonus, en fonction du nombre de points de chaque équipe.
- Date du dernier import :
-
- Bienvenue au {{ .Name }} !
-
-
- {{ "{{" }} if .BackLink {{ "}}" }}
-
- {{ "{{" }} end {{ "}}" }}
-Déroulement
-Calcul des points, bonus, malus et classement
-Temps forts
-Bienvenue au challenge forensic !
-Rapport d'import FIC
-
- Durant ce challenge, les équipes doivent remonter des scénarii - d'attaques auxquels nos systèmes d'information font face - chaque jour : fuite de données, compromission d'un poste de - travail, exploitation de vulnérabilités d'un site web, ... -
-- Pour valider un challenge, chaque participant va télécharger : - soit des journaux d'évènements, des extraits de trafic réseau - ou même des copies figées de la mémoire vive de machines - malveillantes, pour essayer de comprendre comment l'attaquant a - contourné la sécurité de la machine et quelles actions hostiles - ont été effectuées. -
-- Challenge {{ themes[my.exercices[s.params.exercice].theme_id].exercices[s.params.exercice].title }} du thème {{ themes[my.exercices[s.params.exercice].theme_id].name }} - par {{ themes[my.exercices[s.params.exercice].theme_id].authors | stripHTML }} -
- -- | {{ th.name }} |
-
---|---|
- - {{ exercice.solved }} - {{ exercice.tried }} - - | -|
{{ team.rank }}ere — {{ team.score | number:0 }} points |
- - {{ mystats.themes[tid].solved }}/{{ mystats.themes[tid].total }} - ({{ mystats.themes[tid].tries }}) - | -
- Résolus
- Total résolus - |
-
- {{ mystats.themes[tid].solved }} - {{ mystats.themes[tid].tries }} - |
-
Place | -Équipe | -Score | -
---|---|---|
{{ r.rank }}ere | -{{ r.name }} | -{{ r.score | number:0 }} | -
{{ rank[0].rank }}er | -{{ rank[0].name }} | -{{ rank[0].score | number:0 }} | -
-
|
- ||
{{ rank[1].rank }}e | -{{ rank[1].name }} | -{{ rank[1].score | number:0 }} | -
-
|
- ||
{{ rank[2].rank }}e | -{{ rank[2].name }} | -{{ rank[2].score | number:0 }} | -
-
|
-
- Durant ce challenge, les équipes doivent remonter des scénarii - d'attaques auxquels nos systèmes d'information font face - chaque jour : fuite de données, compromission d'un poste de - travail, exploitation de vulnérabilités d'un site web, ... -
-- Pour valider un challenge, chaque participant va télécharger : - soit des journaux d'évènements, des extraits de trafic réseau - ou même des copies figées de la mémoire vive de machines - malveillantes, pour essayer de comprendre comment l'attaquant a - contourné la sécurité de la machine et quelles actions hostiles - ont été effectuées. -
-Place | -Équipe | -Score | -
---|---|---|
{{ r.rank }}ere | -{{ r.name }} | -{{ r.score | number:0 }} | -
|${FIC_CUSTOM_BODY}|" "${PATH_STATIC}/index.html" - -exit 0 diff --git a/configs/nginx/auth/client-cert.conf b/configs/nginx/auth/client-cert.conf deleted file mode 100644 index 7fcbb0c7..00000000 --- a/configs/nginx/auth/client-cert.conf +++ /dev/null @@ -1,3 +0,0 @@ -ssl_client_certificate /srv/PKI/shared/ca.pem; -ssl_trusted_certificate /srv/PKI/shared/ca.pem; -ssl_verify_client optional; diff --git a/configs/nginx/auth/oidc.conf b/configs/nginx/auth/oidc.conf deleted file mode 100644 index 8e629385..00000000 --- a/configs/nginx/auth/oidc.conf +++ /dev/null @@ -1,50 +0,0 @@ -error_page 401 = @error401; - -location /challenge_access { - # forward the /validate request to Vouch Proxy - proxy_pass http://auth:9090; - # be sure to pass the original host header - proxy_set_header Host $http_host; - - # Vouch Proxy only acts on the request headers - proxy_pass_request_body off; - proxy_set_header Content-Length ""; - - # optionally add X-Vouch-User as returned by Vouch Proxy along with the request - auth_request_set $auth_resp_x_vouch_user $upstream_http_x_vouch_user; - - # these return values are used by the @error401 call - auth_request_set $auth_resp_jwt $upstream_http_x_vouch_jwt; - auth_request_set $auth_resp_err $upstream_http_x_vouch_err; - auth_request_set $auth_resp_failcount $upstream_http_x_vouch_failcount; -} - -# If the user is not logged in, redirect them to Vouch's login URL -location @error401 { - return 302 https://live.fic.srs.epita.fr/challenge_access/login?url=https://live.fic.srs.epita.fr$request_uri&vouch-failcount=$auth_resp_failcount&X-Vouch-Token=$auth_resp_jwt&error=$auth_resp_err; -} - -location /auth { - proxy_pass http://auth:5556; -} -location /approval { - proxy_pass http://auth:5556; -} -location /token { - proxy_pass http://auth:5556; -} -location /keys { - proxy_pass http://auth:5556; -} -location /userinfo { - proxy_pass http://auth:5556; -} -location /static { - proxy_pass http://auth:5556; -} -location /theme { - proxy_pass http://auth:5556; -} -location /.well-known/openid-configuration { - proxy_pass http://auth:5556; -} diff --git a/configs/nginx/base/demo.conf b/configs/nginx/base/demo.conf deleted file mode 100644 index 1c607ede..00000000 --- a/configs/nginx/base/demo.conf +++ /dev/null @@ -1,245 +0,0 @@ -proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=STATIC:10m inactive=24h max_size=1g; -proxy_connect_timeout 1s; - -server_tokens off; - -server { - listen 80 default; - - rewrite ^ https://$host$request_uri permanent; -} - -server { - listen 443 default ssl http2; - - ssl_protocols TLSv1.2 TLSv1.3; - ssl_dhparam /etc/nginx/ssl/dhparams-4096.pem; - ssl_prefer_server_ciphers on; - - ssl_certificate /etc/nginx/ssl/fullchain.pem; - ssl_certificate_key /etc/nginx/ssl/privkey.pem; - - ssl_client_certificate /srv/PKI/shared/ca.pem; - ssl_trusted_certificate /srv/PKI/shared/ca.pem; - ssl_verify_client optional; - - root /srv/htdocs-frontend/; - - error_page 401 /welcome.html; - error_page 403 404 /e404.html; - error_page 413 /e413.html; - error_page 500 502 504 /e500.html; - - add_header Strict-Transport-Security max-age=31536000; - add_header X-Frame-Options deny; - add_header Content-Security-Policy "script-src 'unsafe-inline' 'self' 'unsafe-eval'; img-src 'self' data:; style-src 'unsafe-inline' 'self'; font-src 'self'; default-src 'self'"; - add_header X-Xss-Protection "1; mode=block"; - add_header X-Content-Type-Options nosniff; - add_header Referrer-Policy strict-origin; - add_header Feature-Policy "accelerometer 'none'; ambient-light-sensor 'none'; autoplay 'none'; battery 'none'; camera 'none'; display-capture 'none'; document-domain 'none'; encrypted-media 'none'; fullscreen 'none'; geolocation 'none'; gyroscope 'none'; magnetometer 'none'; microphone 'none'; midi 'none'; payment 'none'; picture-in-picture 'none'; speaker 'none'; sync-xhr 'none'; usb 'none'; vr 'none'; wake-lock 'none'; xr-spatial-tracking 'none'"; - - location = / { - include fic-auth.conf; - } - location = /auth { - internal; - proxy_pass https://163.5.55.58/remote.php/webdav/; - proxy_pass_request_body off; - proxy_set_header Host "owncloud.srs.epita.fr"; - proxy_set_header Content-Length ""; - proxy_set_header X-Original-URI $request_uri; - } - location = /index.html { - include fic-auth.conf; - } - location = /welcome.html { - internal; - if ($http_accept ~ "^application/json") { - rewrite ^/(.*).html$ /$1.json; - } - } - location = /e404.html { - internal; - if ($http_accept ~ "^application/json") { - rewrite ^/(.*).html$ /$1.json; - } - } - location = /e413.html { - internal; - if ($http_accept ~ "^application/json") { - rewrite ^/(.*).html$ /$1.json; - } - } - location = /e500.html { - internal; - if ($http_accept ~ "^application/json") { - rewrite ^/(.*).html$ /$1.json; - } - } - - location ~ ^/([A-Z]|_/) { - include fic-auth.conf; - - rewrite ^/.*$ /index.html; - } - - location /edit { - include fic-auth.conf; - - rewrite ^/.*$ /index.html; - } - location /issues { - include fic-auth.conf; - - rewrite ^/.*$ /index.html; - } - location /rank { - include fic-auth.conf; - - rewrite ^/.*$ /index.html; - } - location /tags/ { - include fic-auth.conf; - - rewrite ^/.*$ /index.html; - } - location /register { - include fic-auth.conf; - - rewrite ^/.*$ /index.html; - } - location /rules { - include fic-auth.conf; - - rewrite ^/.*$ /index.html; - } - - location /files/ { - alias /srv/FILES/; - sendfile on; - tcp_nodelay on; - gzip_static always; - } - - location /wait.json { - include fic-auth.conf; - - root /srv/TEAMS/$team/; - expires epoch; - add_header Cache-Control no-cache; - } - location /stats.json { - root /srv/TEAMS/; - expires epoch; - add_header Cache-Control no-cache; - } - location /my.json { - include fic-auth.conf; - - root /srv/TEAMS/$team/; - expires epoch; - add_header Cache-Control no-cache; - - if (!-f /srv/startingblock/started) { - rewrite ^/.* /wait.json; - } - } - location /issues.json { - include fic-auth.conf; - - root /srv/TEAMS/$team/; - expires epoch; - add_header Cache-Control no-cache; - } - location /scores.json { - include fic-auth.conf; - - root /srv/TEAMS/$team/; - expires epoch; - add_header Cache-Control no-cache; - } - location = /events.json { - root /srv/TEAMS/; - expires epoch; - add_header Cache-Control no-cache; - } - location = /teams.json { - root /srv/TEAMS/; - expires epoch; - add_header Cache-Control no-cache; - } - location = /themes.json { - root /srv/TEAMS/; - expires epoch; - add_header Cache-Control no-cache; - } - location = /challenge.json { - root /srv/SETTINGSDIST/; - expires epoch; - add_header X-FIC-time $msec; - add_header Cache-Control no-cache; - } - location = /settings.json { - root /srv/SETTINGSDIST/; - expires epoch; - add_header X-FIC-time $msec; - add_header Cache-Control no-cache; - } - - location /submit/ { - include fic-auth.conf; - - proxy_pass http://receiver:8080/submission; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header X-FIC-Team $team; - proxy_redirect off; - } - location /issue { - include fic-auth.conf; - - proxy_pass http://receiver:8080; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header X-FIC-Team $team; - proxy_redirect off; - } - location /chname { - include fic-auth.conf; - - proxy_pass http://receiver:8080; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header X-FIC-Team $team; - proxy_redirect off; - } - location /registration { - include fic-auth.conf; - - proxy_pass http://receiver:8080; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header X-FIC-Team $team; - proxy_redirect off; - } - location /reset_progress { - include fic-auth.conf; - - proxy_pass http://receiver:8080; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header X-FIC-Team $team; - proxy_redirect off; - } - location /openhint/ { - include fic-auth.conf; - - proxy_pass http://receiver:8080; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header X-FIC-Team $team; - proxy_redirect off; - } - location /wantchoices/ { - include fic-auth.conf; - - proxy_pass http://receiver:8080; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header X-FIC-Team $team; - proxy_redirect off; - } -} diff --git a/configs/nginx/base/docker.conf b/configs/nginx/base/docker.conf deleted file mode 100644 index 63d29b78..00000000 --- a/configs/nginx/base/docker.conf +++ /dev/null @@ -1,282 +0,0 @@ -server_tokens off; -proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=STATIC:10m inactive=24h max_size=1g; -proxy_connect_timeout 1s; - -server { - listen 80 default; - listen [::]:80 default; - - include fic-auth.conf; - - root ${PATH_STATIC}; - - error_page 401 /welcome.html; - error_page 403 404 /e404.html; - error_page 413 404 /e413.html; - error_page 500 502 504 /e500.html; - - error_page 401 /welcome.html; - error_page 403 404 /e404.html; - error_page 413 /e413.html; - error_page 500 502 504 /e500.html; - - add_header Strict-Transport-Security max-age=31536000; - add_header X-Frame-Options deny; - add_header Content-Security-Policy "script-src 'unsafe-inline' 'self' 'unsafe-eval'; img-src 'self' data:; style-src 'unsafe-inline' 'self'; font-src 'self'; default-src 'self'"; - add_header X-Xss-Protection "1; mode=block"; - add_header X-Content-Type-Options nosniff; - add_header Referrer-Policy strict-origin; - add_header Feature-Policy "accelerometer 'none'; ambient-light-sensor 'none'; autoplay 'none'; battery 'none'; camera 'none'; display-capture 'none'; document-domain 'none'; encrypted-media 'none'; fullscreen 'none'; geolocation 'none'; gyroscope 'none'; magnetometer 'none'; microphone 'none'; midi 'none'; payment 'none'; picture-in-picture 'none'; speaker 'none'; sync-xhr 'none'; usb 'none'; vr 'none'; wake-lock 'none'; xr-spatial-tracking 'none'"; - - location = / { - include fic-get-team.conf; - } - location = /index.html { - include fic-get-team.conf; - } - location = /welcome.html { - internal; - if ($http_accept ~ "^application/json") { - rewrite ^/(.*).html$ /$1.json; - } - } - location = /e404.html { - internal; - if ($http_accept ~ "^application/json") { - rewrite ^/(.*).html$ /$1.json; - } - } - location = /e413.html { - internal; - if ($http_accept ~ "^application/json") { - rewrite ^/(.*).html$ /$1.json; - } - } - location = /e500.html { - internal; - if ($http_accept ~ "^application/json") { - rewrite ^/(.*).html$ /$1.json; - } - } - - location ${FIC_BASEURL2} { - rewrite ^${FIC_BASEURL2}(.*)$ /$1; - } - - location ~ ^/([A-Z]|_/) { - include fic-get-team.conf; - - rewrite ^/.*$ /index.html; - } - - location /edit { - include fic-get-team.conf; - - rewrite ^/.*$ /index.html; - } - location /issues { - include fic-get-team.conf; - - rewrite ^/.*$ /index.html; - } - location /rank { - include fic-get-team.conf; - - rewrite ^/.*$ /index.html; - } - location /tags/ { - include fic-get-team.conf; - - rewrite ^/.*$ /index.html; - } - location /register { - include fic-get-team.conf; - - rewrite ^/.*$ /index.html; - } - location /rules { - include fic-get-team.conf; - - rewrite ^/.*$ /index.html; - } - - location /files/ { - alias ${PATH_FILES}/; - sendfile on; - tcp_nodelay on; - gzip_static always; - } - - location /wait.json { - include fic-get-team.conf; - - root ${PATH_TEAMS}/$team/; - expires epoch; - add_header Cache-Control no-cache; - } - location /stats.json { - root ${PATH_TEAMS}/; - expires epoch; - add_header Cache-Control no-cache; - } - location /my.json { - include fic-get-team.conf; - - root ${PATH_TEAMS}/$team/; - expires epoch; - add_header Cache-Control no-cache; - - if (!-f ${PATH_STARTINGBLOCK}/started) { - rewrite ^/ /wait.json; - } - } - location /issues.json { - include fic-get-team.conf; - - root ${PATH_TEAMS}/$team/; - expires epoch; - add_header Cache-Control no-cache; - } - location /scores.json { - include fic-get-team.conf; - - root ${PATH_TEAMS}/$team/; - expires epoch; - add_header Cache-Control no-cache; - } - location /teams.json { - root ${PATH_TEAMS}; - expires epoch; - add_header Cache-Control no-cache; - } - location /themes.json { - include fic-get-team.conf; - - root ${PATH_TEAMS}; - expires epoch; - add_header Cache-Control no-cache; - - if (!-f ${PATH_TEAMS}/$team/my.json) { - rewrite ^/ /themes-wait.json break; - } - } - location /challenge.json { - root ${PATH_SETTINGS}/; - expires epoch; - add_header X-FIC-time $msec; - add_header Cache-Control no-cache; - } - location /settings.json { - root ${PATH_SETTINGS}/; - expires epoch; - add_header X-FIC-time $msec; - add_header Cache-Control no-cache; - } - - location /submit/ { - include fic-get-team.conf; - - proxy_pass http://${HOST_RECEIVER}/submission/; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header X-FIC-Team $team; - proxy_redirect off; - } - location /issue { - include fic-get-team.conf; - - proxy_pass http://${HOST_RECEIVER}; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header X-FIC-Team $team; - proxy_redirect off; - } - location /chname { - include fic-get-team.conf; - - proxy_pass http://${HOST_RECEIVER}; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header X-FIC-Team $team; - proxy_redirect off; - } - location /registration { - include fic-get-team.conf; - - proxy_pass http://${HOST_RECEIVER}; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header X-FIC-Team $team; - proxy_redirect off; - } - location /reset_progress { - include fic-get-team.conf; - - proxy_pass http://${HOST_RECEIVER}; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header X-FIC-Team $team; - proxy_redirect off; - } - location /openhint/ { - include fic-get-team.conf; - - proxy_pass http://${HOST_RECEIVER}; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header X-FIC-Team $team; - proxy_redirect off; - } - location /wantchoices/ { - include fic-get-team.conf; - - proxy_pass http://${HOST_RECEIVER}; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header X-FIC-Team $team; - proxy_redirect off; - } - - location /api { - include fic-get-team.conf; - - proxy_pass http://${HOST_ADMIN}${FIC_BASEURL}admin/api; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header X-FIC-Team $team; - proxy_redirect off; - } - - location ${FIC_BASEURL}admin { - proxy_pass http://${HOST_ADMIN}; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_redirect off; - } - - location ${FIC_BASEURL}admin/api { - proxy_pass http://${HOST_ADMIN}; - proxy_read_timeout 400s; - proxy_set_header X-Forwarded-For $remote_addr; - } - - location ${FIC_BASEURL}qa { - include fic-get-team.conf; - - proxy_pass http://${HOST_QA}; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header X-FIC-Team $team; - proxy_redirect off; - } - - location ${FIC_BASEURL}dashboard { - include fic-get-team.conf; - - proxy_pass http://${HOST_DASHBOARD}; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header X-FIC-Team $team; - proxy_redirect off; - } - - location = /events.json { - proxy_pass http://${HOST_ADMIN}/api/events/; - proxy_method GET; - proxy_pass_request_body off; - proxy_set_header Content-Length ""; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_redirect off; - proxy_cache STATIC; - proxy_cache_valid 3s; - } -} diff --git a/configs/nginx/base/prod.conf b/configs/nginx/base/prod.conf deleted file mode 100644 index 07d7d27e..00000000 --- a/configs/nginx/base/prod.conf +++ /dev/null @@ -1,237 +0,0 @@ -proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=STATIC:10m inactive=24h max_size=1g; -proxy_connect_timeout 1s; - -server_tokens off; - -server { - listen 80 default; - - rewrite ^ https://$host$request_uri permanent; -} - -server { - listen 443 default ssl http2; - - ssl_protocols TLSv1.2 TLSv1.3; - ssl_dhparam /etc/nginx/ssl/dhparams-4096.pem; - ssl_prefer_server_ciphers on; - - ssl_certificate /etc/nginx/ssl/fullchain.pem; - ssl_certificate_key /etc/nginx/ssl/privkey.pem; - - include fic-auth.conf; - - root /srv/htdocs-frontend/; - - error_page 401 /welcome.html; - error_page 403 404 /e404.html; - error_page 413 /e413.html; - error_page 500 502 504 /e500.html; - - add_header Strict-Transport-Security max-age=31536000; - add_header X-Frame-Options deny; - add_header Content-Security-Policy "script-src 'unsafe-inline' 'self' 'unsafe-eval'; img-src 'self' data:; style-src 'unsafe-inline' 'self'; font-src 'self'; default-src 'self'"; - add_header X-Xss-Protection "1; mode=block"; - add_header X-Content-Type-Options nosniff; - add_header Referrer-Policy strict-origin; - add_header Feature-Policy "accelerometer 'none'; ambient-light-sensor 'none'; autoplay 'none'; battery 'none'; camera 'none'; display-capture 'none'; document-domain 'none'; encrypted-media 'none'; fullscreen 'none'; geolocation 'none'; gyroscope 'none'; magnetometer 'none'; microphone 'none'; midi 'none'; payment 'none'; picture-in-picture 'none'; speaker 'none'; sync-xhr 'none'; usb 'none'; vr 'none'; wake-lock 'none'; xr-spatial-tracking 'none'"; - - location = / { - include fic-get-team.conf; - } - location = /index.html { - include fic-get-team.conf; - } - location = /welcome.html { - internal; - if ($http_accept ~ "^application/json") { - rewrite ^/(.*).html$ /$1.json; - } - } - location = /e404.html { - internal; - if ($http_accept ~ "^application/json") { - rewrite ^/(.*).html$ /$1.json; - } - } - location = /e413.html { - internal; - if ($http_accept ~ "^application/json") { - rewrite ^/(.*).html$ /$1.json; - } - } - location = /e500.html { - internal; - if ($http_accept ~ "^application/json") { - rewrite ^/(.*).html$ /$1.json; - } - } - - location ~ ^/([A-Z]|_/) { - include fic-get-team.conf; - - rewrite ^/.*$ /index.html; - } - - location /edit { - include fic-get-team.conf; - - rewrite ^/.*$ /index.html; - } - location /issues { - include fic-get-team.conf; - - rewrite ^/.*$ /index.html; - } - location /rank { - include fic-get-team.conf; - - rewrite ^/.*$ /index.html; - } - location /tags/ { - include fic-get-team.conf; - - rewrite ^/.*$ /index.html; - } - location /register { - include fic-get-team.conf; - - rewrite ^/.*$ /index.html; - } - location /rules { - include fic-get-team.conf; - - rewrite ^/.*$ /index.html; - } - - location /files/ { - alias /srv/FILES/; - sendfile on; - tcp_nodelay on; - gzip_static always; - } - - location /wait.json { - include fic-get-team.conf; - - root /srv/TEAMS/$team/; - expires epoch; - add_header Cache-Control no-cache; - } - location /stats.json { - root /srv/TEAMS/; - expires epoch; - add_header Cache-Control no-cache; - } - location /my.json { - include fic-get-team.conf; - - root /srv/TEAMS/$team/; - expires epoch; - add_header Cache-Control no-cache; - - if (!-f /srv/startingblock/started) { - rewrite ^/.* /wait.json; - } - } - location /issues.json { - include fic-get-team.conf; - - root /srv/TEAMS/$team/; - expires epoch; - add_header Cache-Control no-cache; - } - location /scores.json { - include fic-get-team.conf; - - root /srv/TEAMS/$team/; - expires epoch; - add_header Cache-Control no-cache; - } - location = /events.json { - root /srv/TEAMS/; - expires epoch; - add_header Cache-Control no-cache; - } - location = /teams.json { - root /srv/TEAMS/; - expires epoch; - add_header Cache-Control no-cache; - } - location = /themes.json { - root /srv/TEAMS/; - expires epoch; - add_header Cache-Control no-cache; - } - location = /challenge.json { - root /srv/SETTINGSDIST/; - expires epoch; - add_header X-FIC-time $msec; - add_header Cache-Control no-cache; - } - location = /settings.json { - root /srv/SETTINGSDIST/; - expires epoch; - add_header X-FIC-time $msec; - add_header Cache-Control no-cache; - } - - location /submit/ { - include fic-get-team.conf; - - proxy_pass http://receiver:8080/submission/; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header X-FIC-Team $team; - proxy_redirect off; - } - location /issue { - include fic-get-team.conf; - - proxy_pass http://receiver:8080; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header X-FIC-Team $team; - proxy_redirect off; - } - location /chname { - include fic-get-team.conf; - - proxy_pass http://receiver:8080; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header X-FIC-Team $team; - proxy_redirect off; - } - location /registration { - include fic-get-team.conf; - - proxy_pass http://receiver:8080; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header X-FIC-Team $team; - proxy_redirect off; - } - location /reset_progress { - include fic-get-team.conf; - - proxy_pass http://receiver:8080; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header X-FIC-Team $team; - proxy_redirect off; - } - location /openhint/ { - include fic-get-team.conf; - - proxy_pass http://receiver:8080; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header X-FIC-Team $team; - proxy_redirect off; - } - location /wantchoices/ { - include fic-get-team.conf; - - proxy_pass http://receiver:8080; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header X-FIC-Team $team; - proxy_redirect off; - } - - include /etc/nginx/conf.d/*.fic-conf; -} diff --git a/configs/nginx/base/static.conf b/configs/nginx/base/static.conf deleted file mode 100644 index bada9896..00000000 --- a/configs/nginx/base/static.conf +++ /dev/null @@ -1,69 +0,0 @@ -server { - listen 80 default_server; - listen [::]:80 default_server; - - server_name fic.srs.epita.fr; - - access_log /var/log/nginx/fic2016.access_log main; - error_log /var/log/nginx/fic2016.error_log info; - - root /srv/www/fic2016-static/; - - error_page 403 404 /e404.html; - error_page 413 404 /e413.html; - error_page 500 502 504 /e500.html; - - location /.htaccess { - return 404; - } - location /chbase.sh { - return 404; - } - - location ~ ^/[0-9] { - rewrite ^/.*$ /index.html; - } - - location /edit { - rewrite ^/.*$ /index.html; - } - - location /rank { - rewrite ^/.*$ /index.html; - } - - location /tags/ { - rewrite ^/.*$ /index.html; - } - - location /files/ { - sendfile on; - tcp_nodelay on; - gzip_static always; - } - - location = /welcome.html { - internal; - if ($http_accept ~ "^application/json") { - rewrite ^/(.*).html$ /$1.json; - } - } - location = /e404.html { - internal; - if ($http_accept ~ "^application/json") { - rewrite ^/(.*).html$ /$1.json; - } - } - location = /e413.html { - internal; - if ($http_accept ~ "^application/json") { - rewrite ^/(.*).html$ /$1.json; - } - } - location = /e500.html { - internal; - if ($http_accept ~ "^application/json") { - rewrite ^/(.*).html$ /$1.json; - } - } -} diff --git a/configs/nginx/get-team/client-cert.conf b/configs/nginx/get-team/client-cert.conf deleted file mode 100644 index e0026b09..00000000 --- a/configs/nginx/get-team/client-cert.conf +++ /dev/null @@ -1,19 +0,0 @@ -set $auth_basic "Challenge FIC"; -if ($ssl_client_verify != "SUCCESS") { - set $team "$remote_user"; - set $needauth "1"; -} -if ($ssl_client_verify = "SUCCESS") { - set $team "_AUTH_ID_$ssl_client_serial"; - set $auth_basic off; - set $needauth "0"; -} -if (!-f /srv/PKI/shared/ficpasswd) { - set $needauth "${needauth}0"; -} -if ($needauth = "10") { - return 401; -} - -auth_basic $auth_basic; -auth_basic_user_file /srv/PKI/shared/ficpasswd; diff --git a/configs/nginx/get-team/oidc.conf b/configs/nginx/get-team/oidc.conf deleted file mode 100644 index 32709ab7..00000000 --- a/configs/nginx/get-team/oidc.conf +++ /dev/null @@ -1,3 +0,0 @@ -auth_request /challenge_access/validate; - -auth_request_set $team "$upstream_http_x_vouch_user"; diff --git a/configs/nginx/get-team/request.conf b/configs/nginx/get-team/request.conf deleted file mode 100644 index b3453f71..00000000 --- a/configs/nginx/get-team/request.conf +++ /dev/null @@ -1,3 +0,0 @@ -auth_request /auth; - -set $team "$remote_user"; diff --git a/configs/nginx/get-team/team-1.conf b/configs/nginx/get-team/team-1.conf deleted file mode 100644 index a8900e81..00000000 --- a/configs/nginx/get-team/team-1.conf +++ /dev/null @@ -1 +0,0 @@ -set $team 1; \ No newline at end of file diff --git a/configs/nginx/get-team/upstream.conf b/configs/nginx/get-team/upstream.conf deleted file mode 100644 index 370ae10f..00000000 --- a/configs/nginx/get-team/upstream.conf +++ /dev/null @@ -1 +0,0 @@ -set $team "$http_x_fic_team"; diff --git a/configs/nsenter_iptables.sh b/configs/nsenter_iptables.sh deleted file mode 100755 index 80b6986f..00000000 --- a/configs/nsenter_iptables.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -if [ -d /containers/onboot/006-synchro-ip-setup ]; then - LOWER=/containers/onboot/006-synchro-ip-setup/lower -elif [ -d /containers/onboot/006-nginx-ip-setup ]; then - LOWER=/containers/onboot/006-nginx-ip-setup/lower -else - nsenter -t 1 -m -u -i -p -- "$0" $@ - exit $? -fi - -mount -t tmpfs none $LOWER/run - -chroot $LOWER iptables $@ -EXIT=$? - -umount $LOWER/run - -exit ${EXIT} diff --git a/configs/nsenter_mysql.sh b/configs/nsenter_mysql.sh deleted file mode 100755 index e3d4b29d..00000000 --- a/configs/nsenter_mysql.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -nsenter -t $(pgrep mariadb | head -1) -m -u -i -n -p -- mariadb $@ diff --git a/configs/nsenter_process.sh b/configs/nsenter_process.sh deleted file mode 100755 index 8e78f753..00000000 --- a/configs/nsenter_process.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -PROC="$1" -shift - -nsenter -t $(pgrep "$PROC" | head -1) $@ -exit $? diff --git a/configs/pxelinux.cfg b/configs/pxelinux.cfg deleted file mode 100644 index 8f9a58b7..00000000 --- a/configs/pxelinux.cfg +++ /dev/null @@ -1,35 +0,0 @@ -TIMEOUT 30 -ONTIMEOUT update - -MENU background #00000000 * * -MENU color title * #FF22BBCC * -MENU color sel * #FFFFFFFF #FF22BBCC * -MENU color hotsel 1;7;37;40 #ffffffff #76a1d0ff * - -UI vesamenu.c32 -MENU TITLE FICKIT PXE BOOT - -LABEL backend - MENU LABEL Prepare for ^backend - LINUX /s/fickit-boot-kernel - INITRD /s/fickit-prepare-initrd.img - APPEND console=tty0 fickit.autoprepare=backend -LABEL frontend - MENU LABEL Prepare for ^frontend - LINUX /s/fickit-boot-kernel - INITRD /s/fickit-prepare-initrd.img - APPEND console=tty0 fickit.autoprepare=frontend -LABEL prepare - MENU LABEL Prepare with ^shell - LINUX /s/fickit-boot-kernel - INITRD /s/fickit-prepare-initrd.img - APPEND console=tty0 -LABEL update - MENU LABEL ^Update images - LINUX /s/fickit-boot-kernel - INITRD /s/fickit-update-initrd.img - APPEND console=ttyS0 console=tty0 -MENU SEPARATOR -LABEL poweroff - MENU LABEL ^Shutdown - KERNEL poweroff.c32 diff --git a/configs/sshd-setup.sh b/configs/sshd-setup.sh deleted file mode 100644 index e5f969f8..00000000 --- a/configs/sshd-setup.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -[ -f /var/lib/fic/ssh/sshd_config ] && exit 0 - -mkdir -p /var/lib/fic/ssh/ - -cp /containers/services/sshd/rootfs/etc/ssh/* /var/lib/fic/ssh/ - -mount -o bind /dev /containers/services/sshd/rootfs/dev -mount -o bind /proc /containers/services/sshd/rootfs/proc -mount -o bind /sys /containers/services/sshd/rootfs/sys -mount -o bind /var/lib/fic/ssh/ /containers/services/sshd/rootfs/etc/ssh - -chroot /containers/services/sshd/rootfs/ ssh-keygen -A - -umount /containers/services/sshd/rootfs/dev /containers/services/sshd/rootfs/proc /containers/services/sshd/rootfs/sys /containers/services/sshd/rootfs/etc/ssh diff --git a/configs/synchro.sh b/configs/synchro.sh deleted file mode 100755 index 8fd8f8df..00000000 --- a/configs/synchro.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash - -# This script synchronizes first, the generated frontend and then -# retrieves submissions - -BASEDIR="/srv" -FRONTEND_HOSTNAME="phobos" - -SSH_OPTS="ssh -p 22 -i ~/.ssh/id_ed25519 -o ControlMaster=auto -o ControlPath=/root/.ssh/%r@%h:%p -o ControlPersist=2 -o PasswordAuthentication=no -o StrictHostKeyChecking=no" - -cd "${BASEDIR}" - -touch /tmp/stop - -# Establish first ssh connection for controlpersist socket, to avoid delay during time synchronization -${SSH_OPTS} ${FRONTEND_HOSTNAME} ls > /dev/null - -# Synchronize the date one time -${SSH_OPTS} ${FRONTEND_HOSTNAME} date -s @"$(date +%s)" - -# Synchronize static files in a separate loop (to avoid submissions delays during file synchronization) -while ! [ -f SETTINGS/stop ] || [ /tmp/stop -nt SETTINGS/stop ] -do - rsync -e "$SSH_OPTS" -av --delete FILES "${FRONTEND_HOSTNAME}":"${BASEDIR}" - - # Synchronize logs - rsync -e "$SSH_OPTS" -av "${FRONTEND_HOSTNAME}":/var/log/ /var/log/frontend - - sleep 5 -done & - -while ! [ -f SETTINGS/stop ] || [ /tmp/stop -nt SETTINGS/stop ] -do - # Synchronize static files pages - rsync -e "$SSH_OPTS" -av --delete --delay-updates --partial-dir=.tmp/ PKI TEAMS SETTINGSDIST "${FRONTEND_HOSTNAME}":"${BASEDIR}" - - # Synchronize submissions - rsync -e "$SSH_OPTS" -av --ignore-existing --delay-updates --temp-dir=.tmp/ --partial-dir=.tmp/ --remove-source-files "${FRONTEND_HOSTNAME}":"${BASEDIR}"/submissions/ submissions/ - - sleep 0.3 -done - -wait -echo See you diff --git a/configs/sysctl-backend.conf b/configs/sysctl-backend.conf deleted file mode 100644 index 50ca3f42..00000000 --- a/configs/sysctl-backend.conf +++ /dev/null @@ -1,7 +0,0 @@ -net.ipv6.conf.all.disable_ipv6 = 1 - -# Increase system file descriptor limit -fs.file-max = 65535 - -# Increase system IP port limits -net.ipv4.ip_local_port_range = 2000 65000 diff --git a/configs/sysctl-frontend.conf b/configs/sysctl-frontend.conf deleted file mode 100644 index 50ca3f42..00000000 --- a/configs/sysctl-frontend.conf +++ /dev/null @@ -1,7 +0,0 @@ -net.ipv6.conf.all.disable_ipv6 = 1 - -# Increase system file descriptor limit -fs.file-max = 65535 - -# Increase system IP port limits -net.ipv4.ip_local_port_range = 2000 65000 diff --git a/configs/udhcpd-sample.conf b/configs/udhcpd-sample.conf deleted file mode 100644 index 30f9b119..00000000 --- a/configs/udhcpd-sample.conf +++ /dev/null @@ -1,59 +0,0 @@ -# Sample udhcpd configuration file (/etc/udhcpd.conf) -# Values shown are defaults - -# The start and end of the IP lease block -start 192.168.255.100 -end 192.168.255.200 - -# The interface that udhcpd will use -interface eth0 - -# The maximum number of leases (includes addresses reserved -# by OFFER's, DECLINE's, and ARP conflicts). Will be corrected -# if it's bigger than IP lease block, but it ok to make it -# smaller than lease block. -max_leases 100 - -# The amount of time that an IP will be reserved (leased to nobody) -# if a DHCP decline message is received (seconds) -#decline_time 3600 - -# The amount of time that an IP will be reserved -# if an ARP conflict occurs (seconds) -#conflict_time 3600 - -# How long an offered address is reserved (seconds) -#offer_time 60 - -# If client asks for lease below this value, it will be rounded up -# to this value (seconds) -#min_lease 60 - -# The location of the pid file -#pidfile /var/run/udhcpd.pid - -# The location of the leases file -#lease_file /var/lib/misc/udhcpd.leases - -# The following are BOOTP specific options -# next server to use in bootstrap -siaddr 192.168.255.2 # default: 0.0.0.0 (none) -# tftp server name -#sname zorak # default: none -# tftp file to download (e.g. kernel image) -boot_file pxelinux.0 # default: none - -# NOTE: "boot_file FILE" and "opt bootfile FILE" are conceptually the same, -# but "boot_file" goes into BOOTP-defined fixed-size field in the packet, -# whereas "opt bootfile" goes into DHCP option 0x43. -# Same for "sname HOST" and "opt tftp HOST". - -# The remainder of options are DHCP options and can be specified with the -# keyword 'opt' or 'option'. If an option can take multiple items, such -# as the dns option, they can be listed on the same line, or multiple -# lines. -# Examples: -#opt dns 192.168.10.2 192.168.10.10 -option subnet 255.255.255.0 -opt router 192.168.255.2 -option lease 3600 diff --git a/configs/update-backend.sh b/configs/update-backend.sh deleted file mode 100755 index efeb1aab..00000000 --- a/configs/update-backend.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -IP_BACKEND=192.168.3.92 -IMG_BACKEND=fickit-backend-squashfs.img -IMG_METADATA=fickit-metadata.iso - -echo "Sending image..." -rsync -v -e ssh "${IMG_BACKEND}" "${IMG_METADATA}" "root@${IP_BACKEND}:/var/lib/fic/outofsync/" || exit 1 - -echo "Done!" -echo "Now, execute upgrade_image on backend, through iDRAC interface." diff --git a/configs/update_imgs.sh b/configs/update_imgs.sh deleted file mode 100644 index fa507cee..00000000 --- a/configs/update_imgs.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh - -mkdir -p /boot/imgs - -# Backup the previous metadata -/usr/bin/metadata -v cdrom -mv /boot/imgs/fickit-metadata.iso /boot/imgs/fickit-metadata.iso.bak - -for img in fickit-boot-kernel fickit-metadata.iso fickit-boot-initrd.img fickit-prepare-initrd.img fickit-frontend-squashfs.img fickit-backend-squashfs.img fickit-update-initrd.img -do - wget -O "/boot/imgs/${img}" "$1/${img}" -done - -# Check dm-crypt key not changed -ISO=$(mktemp -d) -mount /boot/imgs/fickit-metadata.iso "${ISO}" - -NEW_KEY=$(sed -rn 's/.*"content": "([^"]+)"$/\1/p' "${ISO}/user-data" | head -n 1) -OLD_KEY=$(cat /run/config/dm-crypt/key) - -[ "${NEW_KEY}" != "${OLD_KEY}" ] && { - read -p "DM-CRYPT key changed in metadata, are you sure you want to erase it? (y/N) " V - [ "$V" != "y" ] && [ "$V" != "Y" ] && while true; do - mv /boot/imgs/fickit-metadata.iso /boot/imgs/fickit-metadata.iso.skipped - cp /boot/imgs/fickit-metadata.iso.bak /boot/imgs/fickit-metadata.iso - echo - echo "Metadata drive not erased" - echo - /bin/ash - sync - reboot -f - done -} - -umount "${ISO}" - -dd if=/boot/imgs/fickit-metadata.iso of="$2" diff --git a/dashboard/.gitignore b/dashboard/.gitignore deleted file mode 100644 index ef360c84..00000000 --- a/dashboard/.gitignore +++ /dev/null @@ -1 +0,0 @@ -dashboard \ No newline at end of file diff --git a/dashboard/app.go b/dashboard/app.go deleted file mode 100644 index 6f6ecaaf..00000000 --- a/dashboard/app.go +++ /dev/null @@ -1,75 +0,0 @@ -package main - -import ( - "context" - "log" - "net/http" - "time" - - "github.com/gin-gonic/gin" -) - -type App struct { - router *gin.Engine - srv *http.Server - bind string - ips []string -} - -func NewApp(htpasswd_file *string, restrict_to_ips *string, baseURL string, bind string) App { - gin.ForceConsoleColor() - router := gin.Default() - - var baserouter *gin.RouterGroup - if len(baseURL) > 1 { - router.GET("/", func(c *gin.Context) { - c.Redirect(http.StatusFound, baseURL) - }) - - baserouter = router.Group(baseURL) - } else { - baserouter = router.Group("") - } - - if htpasswd_file != nil && len(*htpasswd_file) > 0 { - baserouter.Use(Htpassword(*htpasswd_file)) - } - - app := App{ - router: router, - bind: bind, - } - - if restrict_to_ips != nil && len(*restrict_to_ips) > 0 { - app.loadAndWatchIPs(*restrict_to_ips) - baserouter.Use(app.Restrict2IPs) - } - - declareStaticRoutes(baserouter, baseURL) - - return app -} - -func (app *App) Start() { - app.srv = &http.Server{ - Addr: app.bind, - Handler: app.router, - ReadHeaderTimeout: 15 * time.Second, - ReadTimeout: 15 * time.Second, - WriteTimeout: 10 * time.Second, - IdleTimeout: 30 * time.Second, - } - - log.Printf("Ready, listening on %s\n", app.bind) - if err := app.srv.ListenAndServe(); err != nil && err != http.ErrServerClosed { - log.Fatalf("listen: %s\n", err) - } -} - -func (app *App) Stop() { - ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) - defer cancel() - if err := app.srv.Shutdown(ctx); err != nil { - log.Fatal("Server Shutdown:", err) - } -} diff --git a/dashboard/fwd.go b/dashboard/fwd.go deleted file mode 100644 index 9514a134..00000000 --- a/dashboard/fwd.go +++ /dev/null @@ -1,50 +0,0 @@ -package main - -import ( - "io" - "net/http" - "net/url" - "os" - "path" -) - -func fwd_request(w http.ResponseWriter, r *http.Request, fwd string) { - if u, err := url.Parse(fwd); err != nil { - http.Error(w, err.Error(), http.StatusInternalServerError) - } else { - var user, pass string - if u.User != nil { - user = u.User.Username() - pass, _ = u.User.Password() - u.User = nil - } - if v, exists := os.LookupEnv("FICCLOUD_USER"); exists { - user = v - } else if v, exists := os.LookupEnv("FICCLOUD_PASS"); exists { - pass = v - } - - u.Path = path.Join(u.Path, r.URL.Path) - - if r, err := http.NewRequest(r.Method, u.String(), r.Body); err != nil { - http.Error(w, err.Error(), http.StatusInternalServerError) - } else { - if len(user) != 0 || len(pass) != 0 { - r.SetBasicAuth(user, pass) - } - - if resp, err := http.DefaultClient.Do(r); err != nil { - http.Error(w, err.Error(), http.StatusBadGateway) - } else { - defer resp.Body.Close() - - for key := range resp.Header { - w.Header().Add(key, resp.Header.Get(key)) - } - w.WriteHeader(resp.StatusCode) - - io.Copy(w, resp.Body) - } - } - } -} diff --git a/dashboard/htpasswd.go b/dashboard/htpasswd.go deleted file mode 100644 index 1f62bf9a..00000000 --- a/dashboard/htpasswd.go +++ /dev/null @@ -1,78 +0,0 @@ -package main - -import ( - "bufio" - "fmt" - "log" - "net/http" - "os" - "strings" - - "github.com/gin-gonic/gin" - "gitlab.com/nyarla/go-crypt" -) - -func Htpassword(file string) func(c *gin.Context) { - htpasswd := &Htpasswd{} - - log.Println("Reading htpasswd file...") - var err error - if htpasswd, err = NewHtpasswd(file); htpasswd == nil { - log.Fatal("Unable to parse htpasswd:", err) - } - - return func(c *gin.Context) { - username, password, ok := c.Request.BasicAuth() - if !ok { - c.Writer.Header().Add("WWW-Authenticate", "Basic realm=\"FIC challenge Dashboard\"") - c.AbortWithError(http.StatusUnauthorized, fmt.Errorf("Please login")) - return - } - - if !htpasswd.Authenticate(username, password) { - c.Writer.Header().Add("WWW-Authenticate", "Basic realm=\"FIC challenge Dashboard\"") - c.AbortWithError(http.StatusUnauthorized, fmt.Errorf("Not authorized")) - return - } - - c.Next() - } -} - -type Htpasswd struct { - entries map[string]string -} - -func NewHtpasswd(path string) (*Htpasswd, error) { - if fd, err := os.Open(path); err != nil { - return nil, err - } else { - defer fd.Close() - - htpasswd := Htpasswd{ - map[string]string{}, - } - - scanner := bufio.NewScanner(fd) - for scanner.Scan() { - line := strings.SplitN(strings.TrimSpace(scanner.Text()), ":", 2) - if len(line) == 2 && len(line[1]) > 2 { - htpasswd.entries[line[0]] = line[1] - } - } - if err := scanner.Err(); err != nil { - return nil, err - } - return &htpasswd, nil - } -} - -func (h Htpasswd) Authenticate(username, password string) bool { - if hash, ok := h.entries[username]; !ok { - return false - } else if crypt.Crypt(password, hash[:2]) != hash { - return false - } else { - return true - } -} diff --git a/dashboard/main.go b/dashboard/main.go deleted file mode 100644 index 4c6de9e0..00000000 --- a/dashboard/main.go +++ /dev/null @@ -1,90 +0,0 @@ -package main - -import ( - "flag" - "io/fs" - "log" - "net/http" - "os" - "os/signal" - "path" - "path/filepath" - "syscall" - - "srs.epita.fr/fic-server/libfic" - "srs.epita.fr/fic-server/settings" -) - -var DashboardDir string -var TeamsDir string - -func main() { - var baseURL string - // Read paremeters from environment - if v, exists := os.LookupEnv("FIC_BASEURL"); exists { - baseURL = v - } - - // Read parameters from command line - var bind = flag.String("bind", "127.0.0.1:8082", "Bind port/socket") - htpasswd_file := flag.String("htpasswd", "", "Restrict access with password, Apache htpasswd format") - restrict_ip := flag.String("restrict-to-ips", "", "Restrict access to IP listed in this JSON array") - flag.StringVar(&baseURL, "baseurl", baseURL, "URL prepended to each URL") - staticDir := flag.String("static", "./htdocs-dashboard/", "Directory containing static files") - flag.StringVar(&fic.FilesDir, "files", fic.FilesDir, "Base directory where found challenges files, local part") - flag.StringVar(&DashboardDir, "dashbord", "./DASHBOARD", "Base directory where save public JSON files") - flag.StringVar(&TeamsDir, "teams", "./TEAMS", "Base directory where save teams JSON files") - flag.StringVar(&settings.SettingsDir, "settings", "./SETTINGSDIST", "Base directory where load and save settings") - var fwdr = flag.String("forwarder", "", "URL of another dashboard where send traffic to, except static assets") - flag.BoolVar(&fwdPublicJson, "fwdpublicjson", fwdPublicJson, "Also forward public.json files to forwarder") - flag.Parse() - - log.SetPrefix("[public] ") - - // Sanitize options - var err error - log.Println("Checking paths...") - if staticDir != nil && *staticDir != "" { - if sDir, err := filepath.Abs(*staticDir); err != nil { - log.Fatal(err) - } else { - log.Println("Serving pages from", sDir) - staticFS = http.Dir(sDir) - } - } else { - sub, err := fs.Sub(assets, "static") - if err != nil { - log.Fatal("Unable to cd to static/ directory:", err) - } - log.Println("Serving pages from memory.") - staticFS = http.FS(sub) - } - if fic.FilesDir, err = filepath.Abs(fic.FilesDir); err != nil { - log.Fatal(err) - } - if settings.SettingsDir, err = filepath.Abs(settings.SettingsDir); err != nil { - log.Fatal(err) - } - if baseURL != "/" { - baseURL = path.Clean(baseURL) - } else { - baseURL = "" - } - if fwdr != nil && len(*fwdr) > 0 { - forwarder = fwdr - } - - // Prepare graceful shutdown - interrupt := make(chan os.Signal, 1) - signal.Notify(interrupt, os.Interrupt, syscall.SIGTERM) - - app := NewApp(htpasswd_file, restrict_ip, baseURL, *bind) - go app.Start() - - // Wait shutdown signal - <-interrupt - - log.Print("The service is shutting down...") - app.Stop() - log.Println("done") -} diff --git a/dashboard/restrict_ip.go b/dashboard/restrict_ip.go deleted file mode 100644 index e2ec172c..00000000 --- a/dashboard/restrict_ip.go +++ /dev/null @@ -1,99 +0,0 @@ -package main - -import ( - "encoding/json" - "fmt" - "log" - "net/http" - "os" - "os/signal" - "path" - "strings" - "syscall" - - "github.com/gin-gonic/gin" - "gopkg.in/fsnotify.v1" -) - -func (app *App) loadAndWatchIPs(ipfile string) { - // First load of file if it exists - app.tryReloadIPList(ipfile) - - // Register SIGHUP - c := make(chan os.Signal, 1) - signal.Notify(c, syscall.SIGHUP) - go func() { - for range c { - log.Println("SIGHUP received, reloading ip list...") - go app.tryReloadIPList(ipfile) - } - }() - - // Watch the configuration file - if watcher, err := fsnotify.NewWatcher(); err != nil { - log.Fatal(err) - } else { - if err := watcher.Add(path.Dir(ipfile)); err != nil { - log.Fatal("Unable to watch: ", path.Dir(ipfile), ": ", err) - } - - go func() { - defer watcher.Close() - for { - select { - case ev := <-watcher.Events: - if path.Base(ev.Name) == path.Base(ipfile) && ev.Op&(fsnotify.Write|fsnotify.Create) != 0 { - log.Println("IPs file changes, reloading them!") - go app.tryReloadIPList(ipfile) - } - case err := <-watcher.Errors: - log.Println("watcher error:", err) - } - } - }() - } -} - -func (app *App) tryReloadIPList(ipfile string) { - if _, err := os.Stat(ipfile); !os.IsNotExist(err) { - if iplist, err := loadIPs(ipfile); err != nil { - log.Println("ERROR: Unable to read ip file:", err) - } else { - log.Printf("Loading %d IPs to authorized list", len(iplist)) - app.ips = iplist - } - } -} - -func loadIPs(file string) ([]string, error) { - fd, err := os.Open(file) - if err != nil { - return nil, err - } - defer fd.Close() - - var ret []string - jdec := json.NewDecoder(fd) - - if err := jdec.Decode(&ret); err != nil { - return ret, err - } - - return ret, nil -} - -func (app *App) Restrict2IPs(c *gin.Context) { - found := false - for _, ip := range app.ips { - if strings.HasPrefix(c.Request.RemoteAddr, ip) { - found = true - break - } - } - - if found { - c.Next() - } else { - c.AbortWithError(http.StatusForbidden, fmt.Errorf("IP not authorized: %s", c.Request.RemoteAddr)) - } -} diff --git a/dashboard/static.go b/dashboard/static.go deleted file mode 100644 index 55308ce0..00000000 --- a/dashboard/static.go +++ /dev/null @@ -1,248 +0,0 @@ -package main - -import ( - "bytes" - "embed" - "fmt" - "io" - "io/ioutil" - "log" - "net/http" - "path" - "strings" - "time" - - "srs.epita.fr/fic-server/libfic" - "srs.epita.fr/fic-server/settings" - - "github.com/gin-gonic/gin" -) - -//go:embed static - -var assets embed.FS -var staticFS http.FileSystem - -var forwarder *string = nil -var fwdPublicJson = false - -var indexTmpl []byte - -func getIndexHtml(w io.Writer, baseURL string) { - if len(indexTmpl) == 0 { - if file, err := staticFS.Open("index.html"); err != nil { - log.Println("Unable to open index.html: ", err) - } else { - defer file.Close() - - if indexTmpl, err = ioutil.ReadAll(file); err != nil { - log.Println("Cannot read whole index.html: ", err) - } else { - indexTmpl = bytes.Replace(indexTmpl, []byte("{{.urlbase}}"), []byte(path.Clean(path.Join(baseURL+"/", "nuke"))[:len(path.Clean(path.Join(baseURL+"/", "nuke")))-4]), -1) - } - } - } - - w.Write(indexTmpl) -} - -func serveFile(c *gin.Context, url string) { - c.Request.URL.Path = url - http.FileServer(staticFS).ServeHTTP(c.Writer, c.Request) -} - -func declareStaticRoutes(router *gin.RouterGroup, baseURL string) { - router.GET("/", func(c *gin.Context) { - http.Redirect(c.Writer, c.Request, "public0.html", http.StatusFound) - }) - for i := 0; i <= 9; i++ { - router.GET(fmt.Sprintf("/public%d.html", i), func(c *gin.Context) { - getIndexHtml(c.Writer, baseURL) - }) - } - - router.GET("/css/*_", func(c *gin.Context) { - serveFile(c, strings.TrimPrefix(c.Request.URL.Path, baseURL)) - }) - router.GET("/fonts/*_", func(c *gin.Context) { - serveFile(c, strings.TrimPrefix(c.Request.URL.Path, baseURL)) - }) - router.GET("/img/*_", func(c *gin.Context) { - serveFile(c, strings.TrimPrefix(c.Request.URL.Path, baseURL)) - }) - router.GET("/js/*_", func(c *gin.Context) { - serveFile(c, strings.TrimPrefix(c.Request.URL.Path, baseURL)) - }) - router.GET("/views/*_", func(c *gin.Context) { - serveFile(c, strings.TrimPrefix(c.Request.URL.Path, baseURL)) - }) - - router.GET("/files/*_", func(c *gin.Context) { - if forwarder != nil { - fwd_request(c.Writer, c.Request, *forwarder) - } else { - http.ServeFile(c.Writer, c.Request, path.Join(fic.FilesDir, strings.TrimPrefix(c.Request.URL.Path, "/"+path.Join(baseURL, "files")))) - } - }) - - router.GET("/events.json", func(c *gin.Context) { - c.Writer.Header().Set("Cache-Control", "no-cache") - if forwarder != nil { - fwd_request(c.Writer, c.Request, *forwarder) - } else { - http.ServeFile(c.Writer, c.Request, path.Join(TeamsDir, "events.json")) - } - }) - router.GET("/my.json", func(c *gin.Context) { - c.Writer.Header().Set("Cache-Control", "no-cache") - if forwarder != nil { - fwd_request(c.Writer, c.Request, *forwarder) - } else { - http.ServeFile(c.Writer, c.Request, path.Join(TeamsDir, "public", "my.json")) - } - }) - router.GET("/api/teams/:tid/score-grid.json", func(c *gin.Context) { - if forwarder != nil { - fwd_request(c.Writer, c.Request, *forwarder) - } else { - fwd_request(c.Writer, c.Request, "http://127.0.0.1:8081/") - } - }) - router.GET("/api/teams/:tid/stats.json", func(c *gin.Context) { - if forwarder != nil { - fwd_request(c.Writer, c.Request, *forwarder) - } else { - fwd_request(c.Writer, c.Request, "http://127.0.0.1:8081/") - } - }) - router.GET("/challenge.json", func(c *gin.Context) { - c.Writer.Header().Set("Cache-Control", "no-cache") - if forwarder != nil { - fwd_request(c.Writer, c.Request, *forwarder) - } else { - http.ServeFile(c.Writer, c.Request, path.Join(settings.SettingsDir, settings.ChallengeFile)) - } - }) - router.GET("/settings.json", func(c *gin.Context) { - c.Writer.Header().Set("Cache-Control", "no-cache") - if forwarder != nil { - fwd_request(c.Writer, c.Request, *forwarder) - } else { - c.Writer.Header().Set("X-FIC-Time", fmt.Sprintf("%f", float64(time.Now().UnixNano()/1000)/1000000)) - http.ServeFile(c.Writer, c.Request, path.Join(settings.SettingsDir, settings.SettingsFile)) - } - }) - router.GET("/teams.json", func(c *gin.Context) { - c.Writer.Header().Set("Cache-Control", "no-cache") - if forwarder != nil { - fwd_request(c.Writer, c.Request, *forwarder) - } else { - http.ServeFile(c.Writer, c.Request, path.Join(TeamsDir, "public", "teams.json")) - } - }) - router.GET("/themes.json", func(c *gin.Context) { - c.Writer.Header().Set("Cache-Control", "no-cache") - if forwarder != nil { - fwd_request(c.Writer, c.Request, *forwarder) - } else { - http.ServeFile(c.Writer, c.Request, path.Join(TeamsDir, "themes.json")) - } - }) - - router.GET("/background.png", func(c *gin.Context) { - if forwarder != nil && fwdPublicJson { - fwd_request(c.Writer, c.Request, *forwarder) - } else { - http.ServeFile(c.Writer, c.Request, path.Join(DashboardDir, "background.png")) - } - }) - - router.GET("/public.json", func(c *gin.Context) { - c.Writer.Header().Set("Cache-Control", "no-cache") - if forwarder != nil && fwdPublicJson { - fwd_request(c.Writer, c.Request, *forwarder) - } else { - http.ServeFile(c.Writer, c.Request, path.Join(DashboardDir, "public.json")) - } - }) - router.GET("/public0.json", func(c *gin.Context) { - c.Writer.Header().Set("Cache-Control", "no-cache") - if forwarder != nil && fwdPublicJson { - fwd_request(c.Writer, c.Request, *forwarder) - } else { - http.ServeFile(c.Writer, c.Request, path.Join(DashboardDir, "public0.json")) - } - }) - router.GET("/public1.json", func(c *gin.Context) { - c.Writer.Header().Set("Cache-Control", "no-cache") - if forwarder != nil && fwdPublicJson { - fwd_request(c.Writer, c.Request, *forwarder) - } else { - http.ServeFile(c.Writer, c.Request, path.Join(DashboardDir, "public1.json")) - } - }) - router.GET("/public2.json", func(c *gin.Context) { - c.Writer.Header().Set("Cache-Control", "no-cache") - if forwarder != nil && fwdPublicJson { - fwd_request(c.Writer, c.Request, *forwarder) - } else { - http.ServeFile(c.Writer, c.Request, path.Join(DashboardDir, "public2.json")) - } - }) - router.GET("/public3.json", func(c *gin.Context) { - c.Writer.Header().Set("Cache-Control", "no-cache") - if forwarder != nil && fwdPublicJson { - fwd_request(c.Writer, c.Request, *forwarder) - } else { - http.ServeFile(c.Writer, c.Request, path.Join(DashboardDir, "public3.json")) - } - }) - router.GET("/public4.json", func(c *gin.Context) { - c.Writer.Header().Set("Cache-Control", "no-cache") - if forwarder != nil && fwdPublicJson { - fwd_request(c.Writer, c.Request, *forwarder) - } else { - http.ServeFile(c.Writer, c.Request, path.Join(DashboardDir, "public4.json")) - } - }) - router.GET("/public5.json", func(c *gin.Context) { - c.Writer.Header().Set("Cache-Control", "no-cache") - if forwarder != nil && fwdPublicJson { - fwd_request(c.Writer, c.Request, *forwarder) - } else { - http.ServeFile(c.Writer, c.Request, path.Join(DashboardDir, "public5.json")) - } - }) - router.GET("/public6.json", func(c *gin.Context) { - c.Writer.Header().Set("Cache-Control", "no-cache") - if forwarder != nil && fwdPublicJson { - fwd_request(c.Writer, c.Request, *forwarder) - } else { - http.ServeFile(c.Writer, c.Request, path.Join(DashboardDir, "public6.json")) - } - }) - router.GET("/public7.json", func(c *gin.Context) { - c.Writer.Header().Set("Cache-Control", "no-cache") - if forwarder != nil && fwdPublicJson { - fwd_request(c.Writer, c.Request, *forwarder) - } else { - http.ServeFile(c.Writer, c.Request, path.Join(DashboardDir, "public7.json")) - } - }) - router.GET("/public8.json", func(c *gin.Context) { - c.Writer.Header().Set("Cache-Control", "no-cache") - if forwarder != nil && fwdPublicJson { - fwd_request(c.Writer, c.Request, *forwarder) - } else { - http.ServeFile(c.Writer, c.Request, path.Join(DashboardDir, "public8.json")) - } - }) - router.GET("/public9.json", func(c *gin.Context) { - c.Writer.Header().Set("Cache-Control", "no-cache") - if forwarder != nil && fwdPublicJson { - fwd_request(c.Writer, c.Request, *forwarder) - } else { - http.ServeFile(c.Writer, c.Request, path.Join(DashboardDir, "public9.json")) - } - }) -} diff --git a/dashboard/static/css/bootstrap.min.css b/dashboard/static/css/bootstrap.min.css deleted file mode 120000 index 8dd0a066..00000000 --- a/dashboard/static/css/bootstrap.min.css +++ /dev/null @@ -1 +0,0 @@ -../../../admin/static/css/bootstrap.min.css \ No newline at end of file diff --git a/dashboard/static/css/fic.css b/dashboard/static/css/fic.css deleted file mode 100644 index 9c88d5ca..00000000 --- a/dashboard/static/css/fic.css +++ /dev/null @@ -1,387 +0,0 @@ -@font-face { - font-family: "Linux Biolinum"; - src: url('../fonts/LinBiolinum_R.woff') format('woff'); -} -@font-face { - font-family: "Linux Biolinum"; - src: url('../fonts/LinBiolinum_RB.woff') format('woff'); - font-weight: bold; -} -@font-face { - font-family: "Linux Biolinum"; - src: url('../fonts/LinBiolinum_RI.woff') format('woff'); - font-style: italic; -} -@font-face { - font-family: 'FantasqueSansMonoRegular'; - src: url('../fonts/FantasqueSansMono-Regular.woff') format('woff'); - font-weight: normal; - font-style: normal; -} - -b, strong { - font-weight: bold; -} - -[ng-cloak] { - display:none !important; -} - -.popover.bs-popover-left .arrow::after { - border-left-color: #7A8288; -} - -body { - overflow-y: scroll; -} - -.bg-public { - background-image: url('../background.png'); - background-repeat: no-repeat; - background-size: contain; - height: 100vh; -} - -.bg-public .carousel h3 { - font-size: 1.5rem; - line-height: 1.1rem; -} - -.flag { - font-family: 'FantasqueSansMonoRegular', monospace; -} - -.card-img-top { - background-position: center; - background-repeat: no-repeat; - background-size: cover; -} -.theme-card { - height: 10rem; -} - -.beautiful { - font-family: "Linux Biolinum",Helvetica,Arial,sans-serif; -} -.beautiful ol { - font-size: 133%; -} -.beautiful ol ol { - font-size: 90%; -} - -.text-bold { - font-weight: bolder; -} -.text-indent p { - text-indent: 1em; -} - -.navbar { - margin-bottom: 0; -} -.niceborder { - border-bottom: 5px #4eaee6 solid; -} -.navbar img { - margin: 3px auto; - height: 100px; -} -.navbar .clock { - font-size: 70px; -} -.clock:not(.expired):not(.wait) .point, .clock.expired { - transition: color text-shadow 1s; - position: relative; - animation: clockanim 1s ease infinite; - -moz-animation: clockanim 1s ease infinite; - -webkit-animation: clockanim 1s ease infinite; -} -.clock.wait .point { - transition: color text-shadow 1s; - position: relative; - animation: clockwait 1s ease infinite; - -moz-animation: clockwait 1s ease infinite; - -webkit-animation: clockwait 1s ease infinite; -} -.end { - color: #e64143; -} -.point { - text-shadow: 0 0 20px #4eaee6; -} -.end .point { - text-shadow: 0 0 20px #e64143; -} -@-webkit-keyframes clockanim { - 0% { opacity: 1.0; } - 50% { opacity: 0; } - 100% { opacity: 1.0; }; -} -@-moz-keyframes clockanim { - 0% { opacity: 1.0; } - 50% { opacity: 0; } - 100% { opacity: 1.0; }; -} -keyframes clockanim { - 0% { opacity: 1.0; } - 50% { opacity: 0; } - 100% { opacity: 1.0; }; -} -@-webkit-keyframes clockwait { - 0% { text-shadow: 0 0 20px #A6D6F2; } - 50% { text-shadow: 0 0 2px #A6D6F2; } - 100% { text-shadow: 0 0 20px #A6D6F2; } -} -@-moz-keyframes clockwait { - 0% { text-shadow: 0 0 20px #A6D6F2; } - 50% { text-shadow: 0 0 2px #A6D6F2; } - 100% { text-shadow: 0 0 20px #A6D6F2; } -} -keyframes clockwait { - 0% { text-shadow: 0 0 20px #A6D6F2; } - 50% { text-shadow: 0 0 2px #A6D6F2; } - 100% { text-shadow: 0 0 20px #A6D6F2; } -} - -samp.cksum { - overflow-x: hidden; - text-overflow: ellipsis; - max-width: 16vw; - display: inline-block; - vertical-align: middle; - word-wrap: normal; -} - -h1 small.authors { - float: right; - font-style: italic; - font-size: 42%; -} -.lead small.authors { - color: #7a8288; - font-style: italic; -} - -a.badge:hover { - text-decoration: none; -} -.teamname { - -webkit-filter: invert(100%); - filter: invert(100%); -} -a:hover .teamname { - text-shadow: 0px 0px 10px #888888; -} - -.authors a { - color: #3A3F44; -} - -.heading { - font-style: italic; - margin-top: -7px; - text-align: right; -} - -#eventsList { - overflow:hidden; - max-height: 90vh; -} - -.swap-animation .alert { - margin-bottom: 0px; -} -.swap-animation { - margin-bottom: 0.5rem; - max-height: 30vh; - transition: max-height 1.0s linear,opacity 1.0s linear,transform 0.5s linear; -} -.swap-animation.ng-enter { - transform: translateY(-25vh); - max-height: 0vh; -} -.swap-animation.ng-enter-active { - opacity: 1; - transform: translateY(0px); - max-height: 30vh; -} -.swap-animation.ng-leave { - opacity: 1; - max-height: 30vh; - transform: translateY(0px); -} -.swap-animation.ng-leave-active { - opacity: 0; - transform: translateX(120vw); - max-height: 0vh; -} - -.carousel-indicators { - bottom: -10px; -} -.carousel-caption { - padding: 0; - position: static; -} -.carousel .table { - margin-bottom: 0; -} -.carousel .table-sm td { - padding: 2px; -} - -.table th.frotated { - border: 0; -} -.table th.rotated { - height: 100px; - width: 40px; - min-width: 40px; - max-width: 40px; - position: relative; - vertical-align: bottom; - padding: 0; - font-size: 12px; - line-height: 0.9; - border: 0; -} - -th.rotated > div { - position: relative; - top: 0px; - left: -50px; - height: 100%; - transform: skew(45deg,0deg); - overflow: hidden; - border: 1px solid #000; -} -th.rotated div span { - transform: skew(-45deg,0deg) rotate(45deg); - position: absolute; - bottom: 40px; - left: -35px; - display: inline-block; - width: 110px; - text-align: left; - text-overflow: ellipsis; -} - -ul.list-inline li { - display: inline; -} -ul.list-inline li:not(:last-child)::after { - content: " ● " -} - -.breadcrumb-item + .breadcrumb-item::before { - content: ">" -} - -.excard { - transition: transform 250ms; -} -.excard:hover { - transform: scale(1.07); -} - -#tagsMenu + .dropdown-menu div { - overflow-y: auto; - max-height: calc(66vh - 100px); -} - -blockquote { - border-left: solid 2px; - margin-left: 1em; - padding-left: 1em; -} - -.jumbotron img { - margin-left: -1em; - padding-left: 2em; - padding-right: 2em; -} -img { - max-width: 100%; -} - -#eventsList .card { - border-left-color: rgba(0,0,0,.125) !important; - border-right-color: rgba(0,0,0,.125) !important; - border-top-color: rgba(0,0,0,.125) !important; -} - -.bg-public .card-body { - padding:1rem; - padding-bottom:0; -} - -#themesSummary .card-body { - padding:0; -} -#themesSummary h3 { - background: rgba(64,64,64,0.66); - border-radius: 2px; - padding: 0.5rem; - margin-left: 0.5rem; - margin-right: 0.5rem; - margin-top: -40px; -} -#themesSummary p { - font-size: 90%; - margin: 0.2rem; - text-indent: 0.6em; -} - -.card-sm .card-header, .card-sm .card-footer { - padding: 0.2rem 0.75rem; -} -.card-sm .card-body { - padding: 0.4rem 0.75rem; -} -.card-sm .card-body.text-indent p { - text-indent: 0.4rem; -} - -.carousel-item, .carousel-caption { - height: inherit; -} - -.page-header { - background-size: cover; - background-position: center; - margin-bottom: -15rem; -} -.page-header h1 { - text-shadow: 0 0 15px rgba(255,255,255,0.95), 0 0 5px rgb(255,255,255) -} -.page-header h1, .page-header h1 a { - color: black; -} -.page-header h1 a:hover { - text-decoration: none; -} -.page-header h2 { - font-size: 100%; - text-shadow: 1px 1px 1px rgba(0,0,0,0.9) -} -.page-header h2, .page-header h2 a { - color: #4eaee6; -} -.page-header h1 { - padding-top: 4rem; - text-align: center; -} -.page-header h2 { - padding-bottom: 14rem; - text-align: center; -} - -.page-header .headerfade { - background: linear-gradient(transparent 0%, rgb(233,236,239) 100%); - height: 3rem; -} - -a.list-group-item:hover { - text-decoration: none; -} diff --git a/dashboard/static/css/glyphicon.css b/dashboard/static/css/glyphicon.css deleted file mode 120000 index 14cd8c56..00000000 --- a/dashboard/static/css/glyphicon.css +++ /dev/null @@ -1 +0,0 @@ -../../../admin/static/css/glyphicon.css \ No newline at end of file diff --git a/dashboard/static/fonts b/dashboard/static/fonts deleted file mode 120000 index 0ef2f8d8..00000000 --- a/dashboard/static/fonts +++ /dev/null @@ -1 +0,0 @@ -../../admin/static/fonts/ \ No newline at end of file diff --git a/dashboard/static/img/srs.png b/dashboard/static/img/srs.png deleted file mode 100644 index c25b6af4..00000000 Binary files a/dashboard/static/img/srs.png and /dev/null differ diff --git a/dashboard/static/index.html b/dashboard/static/index.html deleted file mode 100644 index 99afa26f..00000000 --- a/dashboard/static/index.html +++ /dev/null @@ -1,640 +0,0 @@ - - -
- -
-
-
-
-
-
-
-