Commit Graph

25 Commits

Author SHA1 Message Date
Iain Sproat 37a0fa4094 fix(frontend & frontend-2): x-frame-options header for /authn routes should be DENY (#1719)
* fix(frontend-2): routes to /authn should set x-frame-options header to deny
* fix(frontend1): do not render authn route if in an iframe
* fix(nginx): should log in json format
2023-07-24 15:17:16 +01:00
Iain Sproat 68fd86b754 chore(frontend): use bitnami/openresty as base image for frontend Dockerfile (#1335)
* chore(frontend): use bitnami/openresty as base image for frontend Dockerfile

openresty/openresty was not being patched as frequently as we would like, resulting in numerous
vulnerabilities without resolution. bitnami/openresty is being patched more frequently.

Some additional changes were necessary when porting our frontend between these distributions:
- html files are in /app
- nginx.conf is in /opt/bitnami/openresty/nginx/conf/nginx.conf
- envsubst is not available by default in bitnami/openresty and needs to be copied in
- Nginx.conf - we wrap the server block in http block and overwrite root nginx.conf
    - using the existing bitnami/openresty nginx.conf as a server block alone causes issues with bitnami/openresty, as bitnami/openresty provides a root nginx.conf which conflicts with directives in Speckle's server block
- we copy the directives from openresty/openresty (which are known to work with Speckle's server block), and apply them alongside Speckle's server block. This creates a new root nginx.conf which we can overwrite the default on the image.
- nginx should use a port available to non sudo/root user, we have selected 8080 instead of previous 80
- need to explicitly output nginx logs to stderr / stdout

Created a readonly root file system on Kubernetes. This requires the following changes:
- emptyDir volumes are mounted in kubernetes to allow bitnami/openresty to write to specific locations
- explicitly include and copy mime.types file to nginx configuration directory

Due to the change to non-privileged port number (8080), the following subsequent changes were required:
- Update 1-click deployment script to match frontend at port 8080
- Updates docker-compose-speckle.yaml file

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
2023-01-25 19:06:48 +00:00
Kristaps Fabians Geikins 2fef8b7de3 refactor(frontend): vue cli v4 -> vite (#1000) 2022-10-05 15:59:11 +03:00
Gergő Jedlicska 025141a8b1 gergo/summaryEmailFixes (#1030)
* fix(server): fix 'speckle:error(s)' mismatching naming

* fix(frontend): add mtl as documented file import format, fix missing computed prop

* fix(fileimports): specklepy operations.send shouldn't use local cache for sending

fixes #1017

* fix(nginx): forward /static route to backend

* fix(frontend): add missing notification type names

* fix(helm): cleanup
2022-09-23 17:22:18 +02:00
Iain Sproat 65a00dca2e feat(helm chart): add SecurityContext to pods and containers (#917)
* feat(helm chart): add SecurityContext to pods and containers

Speckle pods should run with minimal privileges and capabilities to function.

Fix https://github.com/specklesystems/speckle-server/issues/857

* Update securityContext for all pods

* frontend runs as nonroot and readonly root filesystem

- set fsgroup for all pods with volumes

* Frontend requires write directory at /etc/nginx/conf.d

* Allow openresty log directory to be writable

* feat(helm local test): add test container into the make script

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
2022-08-15 14:20:19 +02:00
Iain Sproat 427050a15d chore(pre-commit): Add shellcheck to pre-commit hook (#850)
* chore(pre-commit): adds shellcheck
* Resolves shellcheck linting issues in existing files
2022-08-09 15:00:51 +01:00
Gergő Jedlicska 71a2d89483 fixFrontendNginxPipefail (#870)
* fix(frontend nginx): fix pipefail not found in prod base image

* fix(frontend nginx entrypoint): add pipefail to entrypoint script
2022-08-03 10:02:09 +02:00
Fabians 69a10f7f08 feat(frontend): comments in viewer embed + refactored frontend viewer foundations 2022-08-01 12:43:50 +03:00
Gergő Jedlicska 5917e02a05 fix(frontend nginx): fix pipefail not found in prod base image (#843) 2022-07-29 13:27:29 +02:00
Iain Sproat 90847e422d Feat: configurable file limits (#835)
* Feat: configurable file limits

* ci(circleci): container build speed imporvements

* feat(frontend nginx): add file size limit configurability to frontend nginx

* feat(server blobstorage): use the new file size limit customization value

* feat(helm chart): implement the file size configuration in the helm chart

* fix(frontend docker): fix entrypoint script

* fix(server blobstorage): fix env var parsing NaN

* feat(fileimport-service): add customizable import timeout

* feat(helm chart): add fileimport service timeout value to helm chart

* feat(blobstorage): add server side blob storage size limits

* feat(docker-compose): add blob size limit env var to  docker-compose files

* refactor(frontend file uploads): refactor file uploads to use `useQuery`

* refactor(server env helper): move env helper to shared module

* refactor(blobstorage): use env helper for file size limit

* refactor(frontend file uploads): use generated query document

* fix(server blob sotrage): fix file size limit function call

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
2022-07-29 12:00:29 +02:00
Cristian Balas f37e623c8b Server limits and ratelimits (#632) 2022-03-23 14:29:58 +02:00
Cristian Balas d7a8928bb1 Added Cache-Control headers in frontend nginx and enabled gzip (#572) 2022-02-03 15:55:10 +02:00
Alan Rynne 911a025f57 fix: Added default_type to nginx config for embed (thx cristi!) 2021-08-20 14:49:31 +02:00
Alan Rynne 7c1a3bd195 feat: Embed route 2021-08-20 13:08:22 +02:00
Cristian Balas 0fb22deda9 previewService detect browser page crash, added postprocessing option in server preview endpoint (#344) 2021-07-19 12:19:35 +03:00
Cristian Balas 97fc9521e5 frontend og tags 2021-07-14 12:18:01 +03:00
Cristian Balas 3b227713da [nginx] disabled request buffering and set max-body-size at the server level (#332) 2021-07-13 11:40:41 +03:00
Cristian Balas 3840068cad diff endpoints + added version in ServerInfo (#235) 2021-05-11 20:23:42 +03:00
Cristian Balas 2172a06e4f Scripts for DigitalOcean oneclick image (#209) 2021-05-03 15:21:37 +03:00
cristi8 46bd6a98f8 set nginx max_body_size 2021-04-29 13:53:08 +03:00
Cristian Balas 4be91d2cfd frontend nginx improvement (#185)
Added websocket support for frontend->backend reverse proxy
Removed buffering from frontend->backend reverse proxy
Added python syntax in .editorconfig
2021-04-20 21:10:36 +03:00
Cristian Balas 5f8cf11cba fixed frontend nginx.conf for non-dockercompose deployments (#171) 2021-04-08 00:35:23 +03:00
Cristian Balas 4f5a8dd10e Simplified deployments and documentation (#168)
* added "wait" command to server docker container

* readme.md updates, development mode now listen only on localhost by default, added BIND_ADDRESS environment variable for server
2021-04-07 23:32:25 +03:00
cristi8 0be8fd7746 [ci test] fix nginx config, enabled testing k8s deployment updates 2021-03-15 12:33:48 +02:00
cristi8 4fcfd56664 CI test for separate fe and be builds 2021-03-15 11:47:24 +02:00