Commit Graph

3094 Commits

Author SHA1 Message Date
Gergő Jedlicska f1ec3f47c1 feat(server): add admin override to otheruser steams query (#1401) 2023-02-22 12:39:28 +01:00
Snyk bot 031980a3d2 fix: packages/server/Dockerfile to reduce vulnerabilities (#1399)
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-UPSTREAM-NODE-3326666
- https://snyk.io/vuln/SNYK-UPSTREAM-NODE-3326668
- https://snyk.io/vuln/SNYK-UPSTREAM-NODE-3326685
- https://snyk.io/vuln/SNYK-UPSTREAM-NODE-3326686
- https://snyk.io/vuln/SNYK-UPSTREAM-NODE-3326688

Co-authored-by: Iain Sproat <68657+iainsproat@users.noreply.github.com>
2023-02-22 10:07:16 +00:00
Iain Sproat d3b4310672 docs(helm): schematic diagram in mermaid format (#1358)
* docs(helm): schematic diagram in mermaid format
* Clarifies that dependencies can be external or internal to cluster
* Explicitly show namespace containing secrets
2023-02-22 09:40:30 +00:00
Snyk bot 8895eb2321 fix: packages/preview-service/Dockerfile to reduce vulnerabilities (#1400)
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-UPSTREAM-NODE-3326666
- https://snyk.io/vuln/SNYK-UPSTREAM-NODE-3326668
- https://snyk.io/vuln/SNYK-UPSTREAM-NODE-3326685
- https://snyk.io/vuln/SNYK-UPSTREAM-NODE-3326686
- https://snyk.io/vuln/SNYK-UPSTREAM-NODE-3326688
2023-02-22 09:35:27 +00:00
Iain Sproat 9ed1656541 fix(redis): Redis errors should be logged in a structured manner (#1389)
- errors should be logged to stdout in a structured format
- currently still throws errors which are ultimately unhandled, this matches existing behaviour
- Consolidate redis creation and error handling in a shared module
* remove unused 'redis' module, in favour of 'ioredis'
2023-02-22 09:13:05 +00:00
Iain Sproat af98e9bfd9 fix(webhook): do not log problems connecting to external webhook environment as error severity (#1397)
* fix(webhook): do not log problems connecting to external webhook environment as error severity
- these are user controlled variables and do not necessarily indicate problems with our system
2023-02-21 09:37:24 +00:00
Alexandru Popovici 5a17271afe Ignoring curves with no display values (#1398)
* Empty curves are now ignored and warned about instead of crashing the viewer

* Fixed typo
2023-02-21 11:26:34 +02:00
Gergő Jedlicska a0a44d8f17 fix(server auth): fix oidc stategy (#1394)
make sure the passport authentication works on the same request scope for auth and callback

fix #1374
2023-02-20 16:31:48 +01:00
Iain Sproat 787e85605c fix(security): prevent potential prototype pollution via request body filter (#1388)
* fix(security): prevent potential pollution of request body being executed

* An array is expected
2023-02-20 15:03:02 +00:00
Iain Sproat 5880356396 chore(deps): bump @aws-sdk/client-s3 to ^3.272.0 (#1393)
- address prototype pollution in fast-xml-parser
2023-02-20 13:55:48 +00:00
Iain Sproat c265ece433 feat(ratelimiting): allow auth endpoints to have custom rate limit (#1387) 2023-02-20 11:02:48 +00:00
Iain Sproat 06ab4078ae fix(logging): user login attempt without invite to an invite-only server should be logged for information (#1386)
* fix(logging): user login attempt without invite to invite-only server is info severity, not error severity

* fix(logging): a prompt for user to verify should be logged as information, not error severity
2023-02-20 11:01:13 +00:00
Gergő Jedlicska 40a6701799 feat(server): add switchable admin authz override (#1378)
* feat(server): add switchable admin authz override

* fix(server): make sure tests work with the new admin override

* feat(server authz): make sure to add all requested roles to server admins in admin override mode
2023-02-17 16:31:06 +01:00
Iain Sproat ae79a48eb0 chore(deps): bump numpy-stl to 3.0.0 (#1381)
- Snyk reported vulnerabilities in 2.17.1
2023-02-17 12:04:47 +00:00
Alexandru Popovici 1c78607942 Alex/#1347 Async Loading and Load cancelling (#1367)
* Implemented async walk for the world tree. Implemented asyn render tree building and async batch building. Implemented progressive loading

* WIP tree walk async that actually works using a generator

* Async walking now properly works and can be interrupted

* Properly working async walk

* Added loadObjectAsync function in the API which should be used if stream loading needs to be cancelled and for 'progressive' loading. Added a priority argument to the loadObjectAsync and to walkAsync functions which makes the async-iness so to speak configurable.

* Refactored the sync and async subtree batch building to remove duplicate code. Changed some logs for better clarity

* Fixed an issue with point clouds and material creation
2023-02-17 13:45:22 +02:00
dependabot[bot] eebaca1de9 chore(deps): bump node-jose from 2.1.1 to 2.2.0 (#1379)
Bumps [node-jose](https://github.com/cisco/node-jose) from 2.1.1 to 2.2.0.
- [Release notes](https://github.com/cisco/node-jose/releases)
- [Changelog](https://github.com/cisco/node-jose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/cisco/node-jose/compare/v2.1.1...v2.2.0)

---
updated-dependencies:
- dependency-name: node-jose
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-17 10:03:36 +00:00
dependabot[bot] 1975f45164 chore(deps): bump undici from 5.15.0 to 5.19.1 (#1380)
Bumps [undici](https://github.com/nodejs/undici) from 5.15.0 to 5.19.1.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v5.15.0...v5.19.1)

---
updated-dependencies:
- dependency-name: undici
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-17 10:03:10 +00:00
Alexandru Popovici 5f53558abe Added displayable geometry validation instead of testing it's aabb, which is 0 for points (#1373) 2023-02-15 16:18:05 +02:00
Iain Sproat e1eba7b333 fix(logging): user input errors should be logged as info severity (#1370)
* fix(logging): user input errors should be logged as info severity
* Tidy the code to use a constant and a specific error type
* Attempting to remove the last admin user is invalid user input and should not be logged as error severity
* Missing passwords are user input errors
2023-02-15 12:50:35 +00:00
Iain Sproat e3ba2cc9c3 fix(log): auth endpoint should not log app secrets (#1372)
- logs are now warn severity, as they are not necessarily system errors and may be user errors or incorrectly configured application errors.
- improved the error messages, as we should not have multiple errors with the same message as this makes debugging difficult.
2023-02-15 12:40:32 +00:00
Iain Sproat 6bc6446170 fix(logs): previews not found is a warning, not an error (#1371)
- the preview service may not yet have generated the preview as this takes some time
2023-02-15 12:21:28 +00:00
Alexandru Popovici 234c403430 Fixed a viewer issue related to having meshes with no vertex data and IBO shufling. We're now ignoring any render view which lacks vertex data and we're also displaying a warning when such objects are converted (#1369) 2023-02-14 12:43:44 +02:00
Iain Sproat a6fba9ebd3 chore(node): bump node version to 18.14.0 (#1365) 2023-02-10 11:44:44 +00:00
Alexandru Popovici 3c78bfe9bb Clamped the maximum shadowcatcher texture size to the maximum hw allowed texture size modulated by a customisable scale (defaults to 0.5). This fixes the error we had for some streams where resulting texture size would exceed the maximum allowed (#1364) 2023-02-09 11:48:04 +02:00
Iain Sproat dcf8bcc607 fix(monitor): logging should produce a msg field containing the message (#1363)
python logging produces an event field with the message, but all other loggers produce a msg field.
2023-02-08 15:35:43 +00:00
AlexandruPopovici 9bfa2b8931 Changed some default shadowcatcher parameters 2023-02-02 18:54:10 +02:00
Kristaps Fabians Geikins 7aec9bf29d fix(frontend): viewer dragging not working in some cases (#1357) 2023-02-02 16:34:46 +02:00
Kristaps Fabians Geikins 815d46d3ac fix(frontend): viewer object properties not being scrollable (#1356) 2023-02-02 12:01:23 +02:00
Kristaps Fabians Geikins 67515add5a Merge branch 'main' of github.com:specklesystems/speckle-server into main 2023-02-02 11:16:47 +02:00
Kristaps Fabians Geikins 3dc4c57653 possible post auth redirect fix 2023-02-02 11:16:31 +02:00
Iain Sproat 7af5be723a chore(deps): bump http-cache-semantics to 4.1.1 (#1355)
- Patch version upgrade to address vulnerability of medium severity
2023-02-02 09:08:05 +00:00
Gergő Jedlicska 92887af32f gergo/powerBiApp (#1353)
* feat(server default apps): add powerbi as a default app on the servers

* feat(server powerbi app): remove stream write permission from the powerbi app

* fix(defaultApps): make sure id and secret are the proper length

* feat(defaultApps): throw if something goes wrong during init

* tests(server default apps): update the default app count on the server
2023-02-02 10:56:44 +02:00
Dimitrie Stefanescu 9299ee7f88 Merge pull request #1345 from specklesystems/alex/#1332-selection-style
Outlines in Selection
2023-01-27 11:40:27 +00:00
AlexandruPopovici a9c97825dd Merge branch 'main' into alex/#1332-selection-style 2023-01-27 13:29:24 +02:00
AlexandruPopovici 39d68df932 Fixed an issue where batches would remain hidden after applying visibility only to stencil objects 2023-01-27 11:00:39 +02:00
AlexandruPopovici 248948363a Fixed an issue I created myslef a while ago. Reverted the object loader to the original state and made the ViewerObjectLoader to send the logger's logging function instead of the logger itself when creating ObjectLoader instances 2023-01-26 18:42:12 +02:00
AlexandruPopovici ef7495a397 Fixed an issue with transparent materials and outlining. Fixed an issue with selecting objects and shadowmap. Added section planes update to the stencil and stencil mask passes 2023-01-26 18:30:44 +02:00
Gergő Jedlicska 8e3add7788 feat(server default apps): add powerbi as a default app on the servers (#1344)
* feat(server default apps): add powerbi as a default app on the servers

* feat(server powerbi app): remove stream write permission from the powerbi app
2023-01-26 14:04:51 +01:00
Alexandru Popovici c6694c2511 query now returns the proper query result type. Added return type to the Utils functions (#1342) 2023-01-26 14:15:24 +02:00
AlexandruPopovici cced51e2b8 Merge branch 'main' into alex/#1332-selection-style 2023-01-26 12:19:17 +02:00
Alexandru Popovici 071e6382ca Queries update (#1341)
* Separated Point queries from Intersection queries. Defined query result types for both

* Updated exports

* Update Utils

* Updated frontend after the queries updates

* Allowed the objects field in the IntersectionQueryResult to be null
2023-01-26 12:12:09 +02:00
AlexandruPopovici e35bf79829 Working always-on-top stencil outlines 2023-01-25 22:10:41 +02: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
Gergő Jedlicska 7f617f132e fix(server blobs): make sure not implemented blobs delete endpoint returns 501 (#1337)
* fix(server blobs): make sure not implemented blobs delete endpoint returns 501

* fix(server blobs): make sure not implemented blobs delete endpoint returns 501
2023-01-25 13:26:53 +01:00
dependabot[bot] 94f94e19b5 chore(deps): bump ua-parser-js from 0.7.31 to 0.7.33 (#1338)
Bumps [ua-parser-js](https://github.com/faisalman/ua-parser-js) from 0.7.31 to 0.7.33.
- [Release notes](https://github.com/faisalman/ua-parser-js/releases)
- [Changelog](https://github.com/faisalman/ua-parser-js/blob/master/changelog.md)
- [Commits](https://github.com/faisalman/ua-parser-js/compare/0.7.31...0.7.33)

---
updated-dependencies:
- dependency-name: ua-parser-js
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-24 18:03:23 +00:00
dependabot[bot] 85191fa5d3 chore(deps): bump cookiejar from 2.1.3 to 2.1.4 (#1336)
Bumps [cookiejar](https://github.com/bmeck/node-cookiejar) from 2.1.3 to 2.1.4.
- [Release notes](https://github.com/bmeck/node-cookiejar/releases)
- [Commits](https://github.com/bmeck/node-cookiejar/commits)

---
updated-dependencies:
- dependency-name: cookiejar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-24 17:37:17 +00:00
Iain Sproat e24e443b79 chore(deps): bump ansi-regex@^2.0.0 to ^5.0.1 (#1334) 2023-01-24 12:34:50 +00:00
Gergő Jedlicska e06cea6b06 fix(ifc parser): replace empty children arrays with elements (#1333) 2023-01-20 20:57:03 +01:00
Alexandru Popovici 96b3a4923b Viewer queries (#1331)
* Added the concept of queries with a minimalistic implementation. Implemented PointQuerySolver which handles occlusion, projection and unprojection of points

* Added and tested the 'Pick' PointQuery operations which works just like an onclick viewer event

* Small fixes and changes to query and point query.

* Better approach on the occlusion query solving by using our universal scene intersection routine

* Tested and fixed occlusion testing for points

* Added optional custom width and height to NDC<->Screen helper functions

* Integrated queries in the frontend. Projection queries replace projecting by hand, and also added occlusion queries as a demonstration

* Added refactor comment
2023-01-20 18:59:01 +02:00
AlexandruPopovici c2a137135b WIP on stencil outlines 2023-01-20 18:54:02 +02:00