Commit Graph

3350 Commits

Author SHA1 Message Date
Iain Sproat 271888ccd6 fix(log): graphql logger should log everything (#1521)
- improve log field naming
- remove duplicated configuring of log fields
2023-04-12 18:30:29 +01:00
Gergő Jedlicska 84ea2b1043 fix(server): make sure apollo logging works and it doesn't leak sensitive stuff (#1520) 2023-04-12 13:39:03 +01:00
Iain Sproat d61138e157 feat(log): logs all headers, except authorization and cookie (#1517)
* feat(log): logs all headers, except authorization and cookie
* fix(logging): print headers for raw response
2023-04-11 20:11:56 +01:00
Iain Sproat 4c723781b5 feat(server): authentication middleware should log auth context creation status (#1508)
* feat(server): authentication middleware should log auth context creation status
- this uses the pino http logger provided via prior express middleware, ensuring a request ID is associated with the log messages
- userID, scopes and roles will be logged
* Appends the authContext to the req.log, which makes it available on all subsequent calls
2023-04-11 18:43:46 +01:00
Iain Sproat 6c66049248 feat(logging): log apollo (graphql) requests and responses (#1509)
* feat(logging): log apollo (graphql) requests and responses
2023-04-11 18:42:40 +01:00
Snyk bot ead926dea6 [Snyk] Security upgrade numpy from 1.21.3 to 1.22.2 (#1512)
* fix: packages/fileimport-service/requirements.txt to reduce vulnerabilities


The following vulnerabilities are fixed by pinning transitive dependencies:
- https://snyk.io/vuln/SNYK-PYTHON-NUMPY-2321964
- https://snyk.io/vuln/SNYK-PYTHON-NUMPY-2321966
- https://snyk.io/vuln/SNYK-PYTHON-NUMPY-2321970

* chore(deps): file-import python requirements should include required peers

* Improve comment on requirement

---------

Co-authored-by: Iain Sproat <68657+iainsproat@users.noreply.github.com>
2023-04-10 15:25:26 +01:00
Iain Sproat f4ce7a2a5d chore(deps): remove unused aws-sdk (#1510)
* Remove aws-sdk as it does not appear to be used
2023-04-10 11:00:44 +01:00
dependabot[bot] ed005f8e89 build(deps-dev): bump vite from 2.9.8 to 3.1.0 (#975)
* build(deps-dev): bump vite from 2.9.8 to 2.9.13

Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 2.9.8 to 2.9.13.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v2.9.13/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

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

* Bumps viewer-sandbox vite to match frontend version

* It was complaining about some html tags thing. Fixed it

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Iain Sproat <68657+iainsproat@users.noreply.github.com>
Co-authored-by: AlexandruPopovici <alexandrupopoviciioan@gmail.com>
2023-04-10 10:59:48 +01:00
Iain Sproat 2a35fe6178 fix(ratelimit): reduce /graphql limit based on incident (#1505) 2023-04-07 12:49:45 +01:00
Iain Sproat cff0fa8e31 chore(deps): bump node images to 18.15.0 (#1500) 2023-04-05 12:15:26 +01:00
Kristaps Fabians Geikins 483a28c211 fix(server): correct server_id format (#1495) 2023-03-30 16:37:24 +03:00
Kristaps Fabians Geikins 5d5c0e012f feat(server): awaitable track calls (#1493) 2023-03-30 15:54:24 +03:00
Kristaps Fabians Geikins 9f50a11188 feat(server): extra server tracking props + better logging (#1492) 2023-03-30 15:04:11 +03:00
Kristaps Fabians Geikins 5d0fceaaf3 feat: proper sign up tracking (#1489)
* feat: register flag passed to fe

* feat: mixpanel tracking for all sign ups

* feat: utm first touch & last touch tracking

* feat(helm): Allows Environment Variable for MP to be configured
- default is enabled
- renames environment variable to ENABLE_MP

* feat(helm network policy): allowlist analytics.speckle.systems

---------

Co-authored-by: Iain Sproat <68657+iainsproat@users.noreply.github.com>
2023-03-30 12:21:59 +03:00
Alexandru Popovici 9b6be5ba52 Disabled rendering of line-based geometry in the shadowcatcher pass (#1476) 2023-03-23 14:04:05 +02:00
dependabot[bot] 4ebb776feb chore(deps-dev): bump webpack from 5.72.0 to 5.76.0 (#1456)
Bumps [webpack](https://github.com/webpack/webpack) from 5.72.0 to 5.76.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.72.0...v5.76.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-16 12:27:44 +00:00
Gergő Jedlicska 0be2d5ee54 fix: (server password reset): email mjml was missing mj tags (#1452) 2023-03-14 10:41:00 +01:00
Iain Sproat 05838ac479 chore(server/fileimports): add more logging around file import failures (#1429) 2023-03-13 14:43:49 +00:00
Gergő Jedlicska c4454c2ede refactor(server email templates): use the mjml ejs rendering for all emails (#1448)
* refactor(server email templates): use the mjml ejs rendering for all emails

* fix(server access request): await the server info pls
2023-03-13 15:07:13 +01:00
Gergő Jedlicska 4e3e1de8d2 gergo/invalid token throw (#1444)
* fix(server authz): make sure to forbid access with invalid tokens

fix #927

* test(server authz tests): update tests to reflect the changes in the invalid token forbidden flow
2023-03-13 14:07:49 +01:00
Iain Sproat 87e8d08e64 chore(deps): bump node to 18.15.0 (#1446) 2023-03-10 11:01:30 +00:00
Iain Sproat 0652af4033 fix(server): preview REST endpoint shall return 403 not 500 if no permissions (#1443) 2023-03-09 12:11:40 +00:00
AlexandruPopovici f187510467 Merged 2023-03-08 14:34:37 +02:00
Gergő Jedlicska 560d544daf fix(server emails): outlook doesnt support linear gradients in css (#1439)
* fix(server emails): outlook doesnt support linear gradients in css

* using the same bg color in the default eamil template
2023-03-07 18:26:09 +01:00
AlexandruPopovici b2e1737617 Fixed compile error 2023-03-06 17:46:40 +02:00
Alexandru Popovici 3932a4bb93 Occlusion queries no longer report the ocluding speckle object, only it's id. This avoids walking the tree to fetch the object itself, which is unused in 99% of uses cases for occlusion testing. If the users need the object itself, they can still fetch it via the viewer API using it's id. This improves total occlusion query speed by 30-100x (#1438) 2023-03-06 17:33:34 +02:00
Gergő Jedlicska 7d8ff2048a fix(test): make sure users are created sequentially (#1437) 2023-03-06 14:40:35 +01:00
Alexandru Popovici 7bac769180 Fixed the issue with polycurve elements being conveted twice. Added the concept of nesteNodes in NodeData interface, but I'm wary of using it extensively (#1436) 2023-03-03 16:17:23 +02:00
AlexandruPopovici 06fc06adf5 Implemented hosted revit instances not stacking their host's transformation 2023-03-02 17:00:34 +02:00
AlexandruPopovici e037b310e5 Disabled tonemapping for point and point cloud materials 2023-03-02 13:13:57 +02:00
Iain Sproat cdd1a771ac fix(fileimport): should not fail if filetype is upper or mixed case (#1427) 2023-03-01 16:32:57 +00:00
Iain Sproat d8b7123ed0 chore(deps): bump node from 18.14.0 to 18.14.2 (#1426) 2023-03-01 12:16:55 +00:00
AlexandruPopovici cc2a68f6ea RevitInstances now always stack transforms 2023-03-01 11:52:39 +02:00
AlexandruPopovici 38d81c2d06 Merged 2023-02-28 15:20:37 +02:00
Alexandru Popovici 6b7dbc5d70 Reduced Viewer Memory Footprint (#1406)
* The ObjectLoader and ViewerObjectsLoaders are disposed upon loading complete.

* Added viewer parameter for keeping or discarding original geometry data. Defaults to discarding it. WIP on mesh and point cloud implementation for actual discarding it

* Geometry data from raw nodes is now disposed after building their reder views

* Removed raw geometry data from points and lines

* Removed the float64 array which was persisted pointlessly by the section plane outlines feature. Also fixed a bug for this feature regarding resizing the point buffer and RTE

* Implemented BVHs in local space, relative to world origin. This cuts down on it's redundant memory footprint by half

* Implemented SpeckleMeshBVH which completely hides the RTE-related transformations that we're making to reduce memory footprint.

* Added some clarifications to the SpeckleMeshBVH class
2023-02-28 13:07:33 +02:00
Iain Sproat 7e89950358 feat(logging): log all http requests and responses (#1416)
- feat(logging): log all http requests and responses
- the auto logger does not log the body, to ensure sensitive payloads are not logged. Unfortunately this means that error messages are not logged either, so need to be manually logged.
- fix(logging): 400 errors should be info not error severity logging
2023-02-27 15:14:56 +00:00
Alexandru Popovici b9d68efc55 #1408 - Separate Object Layers by Geometry Type (#1422)
* Extended the ObjectLayers on a per geometry type basis. We can now restrict intersections and rendering based on geometry type (mesh, line, point)

* Disabled geometry type based filtering of opaque/transparent/stencil objects in the batcher, since we're using separate object layers for the geometry types now

* Fixed and issue with OR-ing layers
2023-02-27 16:20:42 +02:00
Gergő Jedlicska f2803432b4 gergo/fix flaky admin override tests (#1420)
* fix(server authz tests): force wait until env vars are reloaded in authz tests

* test(server): fix flaky admin override tests with mocking
2023-02-27 13:59:16 +01:00
AlexandruPopovici b231204d24 WIP on instances transformation 2023-02-27 11:10:18 +02:00
AlexandruPopovici 0c5303e8e7 Implemented instance and revit instance conversion. First draft 2023-02-24 16:59:41 +02:00
Iain Sproat 4b1969c804 chore(server): improve logging of REST API endpoints (#1414)
- chore(server): adds endpoint parameter to some log messages
- and any other relevant parameters we have to hand (streamId, userId etc..)
- logging severity is info for `400` status codes, error for `500` status codes or equivalent.
2023-02-24 11:22:21 +00:00
Iain Sproat 6403a3fddd fix(webhook): should not duplicate logging of error (#1413)
- the caller should be responsible for logging an error response
2023-02-23 20:29:44 +00:00
Iain Sproat 3c2e866117 chore(fileimport): log more parameters (#1412) 2023-02-23 17:56:06 +00:00
Gergő Jedlicska c80c2a2602 fix(server authz tests): force wait until env vars are reloaded in authz tests (#1403) 2023-02-22 14:05:56 +01:00
Iain Sproat f9c2787f6d chore(deps): bump @aws-sdk/client-s3 to 3.276.0 due to vulnerability in earlier versions (#1402) 2023-02-22 12:00:53 +00:00
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
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