Giter Site home page Giter Site logo

neuralegion / brokencrystals Goto Github PK

View Code? Open in Web Editor NEW
116.0 116.0 196.0 30.67 MB

A Broken Application - Very Vulnerable!

License: MIT License

Shell 2.13% JavaScript 25.97% TypeScript 33.32% CSS 36.90% HTML 0.90% Dockerfile 0.10% Perl 0.43% Smarty 0.24%
benchmark cyber-security devops nestjs nodejs react secops security typescript vulnerable

brokencrystals's People

Contributors

alexandrmiee avatar bararchy avatar bekto avatar bmnteam avatar brightamasiuk avatar cruisade avatar denanmusinovic avatar dependabot[bot] avatar derevnjuk avatar gasru76 avatar gmesserman avatar gornication avatar kif-fando avatar maximashin avatar mvhysko avatar neuralegion-aschmit avatar orubin avatar ostridm avatar rielas avatar tamirger avatar workgurin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

brokencrystals's Issues

Build Error on clean Ubuntu server

Installed node v14 on a fresh Ubuntu server and tried installing this application.

root@server:/home/ubuntu/brokencrystals# node -v
v14.21.3
root@server:/home/ubuntu/brokencrystals# npm -v
6.14.18

But I keep getting errors and I have no direct clue how to solve them:

root@server:/home/ubuntu/brokencrystals# sudo npm ci && sudo npm run build
npm WARN prepare removing existing node_modules/ before installation

> [email protected] install /home/ubuntu/brokencrystals/node_modules/libxmljs2
> node-pre-gyp install --fallback-to-build --loglevel http

node-pre-gyp http GET https://github.com/marudor/libxmljs2/releases/download/v0.31.0/node-v83-linux-x64-glibc.tar.gz
[libxmljs2] Success: "/home/ubuntu/brokencrystals/node_modules/libxmljs2/build/Release/xmljs.node" is installed via remote

> [email protected] install /home/ubuntu/brokencrystals/node_modules/libxmljs
> node-pre-gyp install --fallback-to-build --loglevel http

node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp http GET https://github.com/libxmljs/libxmljs/releases/download/v0.19.7/node-v83-linux-x64.tar.gz
node-pre-gyp http 404 https://github.com/libxmljs/libxmljs/releases/download/v0.19.7/node-v83-linux-x64.tar.gz
node-pre-gyp WARN Tried to download(404): https://github.com/libxmljs/libxmljs/releases/download/v0.19.7/node-v83-linux-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v83 ABI, glibc) (falling back to source compile with node-gyp)
node-pre-gyp http 404 status code downloading tarball https://github.com/libxmljs/libxmljs/releases/download/v0.19.7/node-v83-linux-x64.tar.gz
make: Entering directory '/home/ubuntu/brokencrystals/node_modules/libxmljs/build'
  CXX(target) Release/obj.target/xmljs/src/libxmljs.o
make: g++: No such file or directory
make: *** [xmljs.target.mk:165: Release/obj.target/xmljs/src/libxmljs.o] Error 127
make: Leaving directory '/home/ubuntu/brokencrystals/node_modules/libxmljs/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:285:12)
gyp ERR! System Linux 5.15.0-60-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--loglevel=http" "--module=/home/ubuntu/brokencrystals/node_modules/libxmljs/build/Release/xmljs.node" "--module_name=xmljs" "--module_path=/home/ubuntu/brokencrystals/node_modules/libxmljs/build/Release" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v83"
gyp ERR! cwd /home/ubuntu/brokencrystals/node_modules/libxmljs
gyp ERR! node -v v14.21.3
gyp ERR! node-gyp -v v5.1.1
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --loglevel=http --module=/home/ubuntu/brokencrystals/node_modules/libxmljs/build/Release/xmljs.node --module_name=xmljs --module_path=/home/ubuntu/brokencrystals/node_modules/libxmljs/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/home/ubuntu/brokencrystals/node_modules/libxmljs/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1088:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:296:5)
node-pre-gyp ERR! System Linux 5.15.0-60-generic
node-pre-gyp ERR! command "/usr/bin/node" "/home/ubuntu/brokencrystals/node_modules/libxmljs/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--loglevel" "http"
node-pre-gyp ERR! cwd /home/ubuntu/brokencrystals/node_modules/libxmljs
node-pre-gyp ERR! node -v v14.21.3
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --loglevel=http --module=/home/ubuntu/brokencrystals/node_modules/libxmljs/build/Release/xmljs.node --module_name=xmljs --module_path=/home/ubuntu/brokencrystals/node_modules/libxmljs/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build --loglevel http`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2023-03-01T10_48_11_271Z-debug.log

Login protected 'marketplace' page on BC

During the last changes on BC, we now do not have any login protected resources to validate the authentication against.

We need to add a new 'marketplace' page with the following notes:

  • Can be accessed only with a valid authorization token

  • When trying to access it without authorization, it should reply with a "unauthorized" response & then redirect to 'brokencrystals.com/login' page

  • After a successful login, the redirect should be to 'brokencrystals.com/marketplace' instead of 'brokencrystals.com'

  • On the 'marketplace' page, allow writing 'testimonials', when trying to access the 'testimonials' without authorization, it should reply with an "unauthorized" response & then redirect to 'brokencrystals.com/login' page

Failed to load plugin 'prettier'

Hi,
I tried to run brokencrystals on amazon linux.
Installed git and nodejs(ver 12 LTS).
Doing the command npm ci --prefix public && npm run build --prefix public raises the following errors:

(snip)

Creating an optimized production build...
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db

Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating
Failed to compile.

Failed to load plugin 'prettier' declared in '.eslintrc.js': Cannot find module 'eslint-plugin-prettier'
Require stack:
- /home/user0/github/brokencrystals/public/node_modules/react-scripts/config/__placeholder__.js
Referenced from: /home/user0/github/brokencrystals/public/.eslintrc.js


npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `react-scripts build && cp -r vcs/git build/.git && cp -r vcs/hg build/.hg && cp -r vcs/svn build/.svn`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/user0/.npm/_logs/2021-06-22T20_46_27_066Z-debug.log

What's the matter is?
Thanks for advance.

Add simple GET-based CSRF Multi-Step Auth flow to BC

A simple multi-step flow where the user must do:

  1. GET to the login page (i.e GET /auth/simple-csrf-flow) to get a csrf token from the response
  2. POST to the auth API endpoint with that token and valid credentials

node v19.4.0 build error

Seems to not build with v19.4.0:

$ npm ci && npm run build
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@angular-devkit/[email protected]',
npm WARN EBADENGINE   required: { node: '>= 10.13.0', npm: '^6.11.0 || ^7.5.6', yarn: '>= 1.13.0' },
npm WARN EBADENGINE   current: { node: 'v19.4.0', npm: '8.19.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@angular-devkit/[email protected]',
npm WARN EBADENGINE   required: { node: '>= 10.13.0', npm: '^6.11.0 || ^7.5.6', yarn: '>= 1.13.0' },
npm WARN EBADENGINE   current: { node: 'v19.4.0', npm: '8.19.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@angular-devkit/[email protected]',
npm WARN EBADENGINE   required: { node: '>= 10.13.0', npm: '^6.11.0 || ^7.5.6', yarn: '>= 1.13.0' },
npm WARN EBADENGINE   current: { node: 'v19.4.0', npm: '8.19.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@angular-devkit/[email protected]',
npm WARN EBADENGINE   required: { node: '>= 10.13.0', npm: '^6.11.0 || ^7.5.6', yarn: '>= 1.13.0' },
npm WARN EBADENGINE   current: { node: 'v19.4.0', npm: '8.19.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@angular-devkit/[email protected]',
npm WARN EBADENGINE   required: { node: '>= 10.13.0', npm: '^6.11.0 || ^7.5.6', yarn: '>= 1.13.0' },
npm WARN EBADENGINE   current: { node: 'v19.4.0', npm: '8.19.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@schematics/[email protected]',
npm WARN EBADENGINE   required: { node: '>= 10.13.0', npm: '^6.11.0 || ^7.5.6', yarn: '>= 1.13.0' },
npm WARN EBADENGINE   current: { node: 'v19.4.0', npm: '8.19.2' }
npm WARN EBADENGINE }
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated @types/[email protected]: This is a stub types definition for raw-body (https://github.com/stream-utils/raw-body). raw-body provides its own type definitions, so you don't need @types/raw-body installed!
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated @types/[email protected]: This is a stub types definition for axios (https://github.com/mzabriskie/axios). axios provides its own type definitions, so you don't need @types/axios installed!
npm WARN deprecated [email protected]: This module renamed to process-warning
npm WARN deprecated [email protected]: Use your platform's native performance.now() and performance.timeOrigin.
npm WARN deprecated [email protected]: Please use @jridgewell/sourcemap-codec instead
npm WARN deprecated [email protected]: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
npm WARN deprecated [email protected]: request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
npm WARN deprecated [email protected]: Please upgrade to v7.0.2+ of superagent.  We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing.  See the releases tab for more information at <https://github.com/visionmedia/superagent/releases>.
npm ERR! code 1
npm ERR! path /tmp/brokencrystals/node_modules/libxmljs
npm ERR! command failed
npm ERR! command sh -c -- node-pre-gyp install --fallback-to-build --loglevel http
npm ERR! make: Entering directory '/tmp/brokencrystals/node_modules/libxmljs/build'
npm ERR!   CXX(target) Release/obj.target/xmljs/src/libxmljs.o
npm ERR! make: Leaving directory '/tmp/brokencrystals/node_modules/libxmljs/build'
npm ERR! Failed to execute '/usr/bin/node /usr/lib/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --loglevel=http --module=/tmp/brokencrystals/node_modules/libxmljs/build/Release/xmljs.node --module_name=xmljs --module_path=/tmp/brokencrystals/node_modules/libxmljs/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v111' (1)
npm ERR! node-pre-gyp WARN Using request for node-pre-gyp https download
npm ERR! node-pre-gyp http GET https://github.com/libxmljs/libxmljs/releases/download/v0.19.7/node-v111-linux-x64.tar.gz
npm ERR! node-pre-gyp http 404 https://github.com/libxmljs/libxmljs/releases/download/v0.19.7/node-v111-linux-x64.tar.gz
npm ERR! node-pre-gyp WARN Tried to download(404): https://github.com/libxmljs/libxmljs/releases/download/v0.19.7/node-v111-linux-x64.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v111 ABI, glibc) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp http 404 status code downloading tarball https://github.com/libxmljs/libxmljs/releases/download/v0.19.7/node-v111-linux-x64.tar.gz
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | x64
npm ERR! gyp info ok
npm ERR! gyp http GET https://nodejs.org/download/release/v19.4.0/node-v19.4.0-headers.tar.gz
npm ERR! gyp http 200 https://nodejs.org/download/release/v19.4.0/node-v19.4.0-headers.tar.gz
npm ERR! gyp http GET https://nodejs.org/download/release/v19.4.0/SHASUMS256.txt
npm ERR! gyp http 200 https://nodejs.org/download/release/v19.4.0/SHASUMS256.txt
npm ERR! In file included from ../../nan/nan.h:176,
npm ERR!                  from ../src/libxmljs.h:7,
npm ERR!                  from ../src/libxmljs.cc:7:
npm ERR! ../../nan/nan_callbacks.h:55:23: error: ‘AccessorSignature’ is not a member of ‘v8’
npm ERR!    55 | typedef v8::Local<v8::AccessorSignature> Sig;
npm ERR!       |                       ^~~~~~~~~~~~~~~~~
npm ERR! ../../nan/nan_callbacks.h:55:40: error: template argument 1 is invalid
npm ERR!    55 | typedef v8::Local<v8::AccessorSignature> Sig;
npm ERR!       |                                        ^
npm ERR! ../../nan/nan.h: In function ‘void Nan::SetAccessor(v8::Local<v8::ObjectTemplate>, v8::Local<v8::String>, GetterCallback, SetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute, imp::Sig)’:
npm ERR! ../../nan/nan.h:2542:19: error: no matching function for call to ‘v8::ObjectTemplate::SetAccessor(v8::Local<v8::String>&, void (*&)(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>&), void (*&)(v8::Local<v8::Name>, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<void>&), v8::Local<v8::Object>&, v8::AccessControl&, v8::PropertyAttribute&, Nan::imp::Sig&)’
npm ERR!  2542 |   tpl->SetAccessor(
npm ERR!       |   ~~~~~~~~~~~~~~~~^
npm ERR!  2543 |       name
npm ERR!       |       ~~~~
npm ERR!  2544 |     , getter_
npm ERR!       |     ~~~~~~~~~
npm ERR!  2545 |     , setter_
npm ERR!       |     ~~~~~~~~~
npm ERR!  2546 |     , obj
npm ERR!       |     ~~~~~
npm ERR!  2547 |     , settings
npm ERR!       |     ~~~~~~~~~~
npm ERR!  2548 |     , attribute
npm ERR!       |     ~~~~~~~~~~~
npm ERR!  2549 |     , signature);
npm ERR!       |     ~~~~~~~~~~~~
npm ERR! In file included from /home/noraj/.cache/node-gyp/19.4.0/include/node/v8-function.h:15,
npm ERR!                  from /home/noraj/.cache/node-gyp/19.4.0/include/node/v8.h:33,
npm ERR!                  from ../src/libxmljs.cc:3:
npm ERR! /home/noraj/.cache/node-gyp/19.4.0/include/node/v8-template.h:807:8: note: candidate: ‘void v8::ObjectTemplate::SetAccessor(v8::Local<v8::String>, v8::AccessorGetterCallback, v8::AccessorSetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute, v8::SideEffectType, v8::SideEffectType)’
npm ERR!   807 |   void SetAccessor(
npm ERR!       |        ^~~~~~~~~~~
npm ERR! /home/noraj/.cache/node-gyp/19.4.0/include/node/v8-template.h:812:22: note:   no known conversion for argument 7 from ‘Nan::imp::Sig’ {aka ‘int’} to ‘v8::SideEffectType’
npm ERR!   812 |       SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect,
npm ERR!       |       ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! /home/noraj/.cache/node-gyp/19.4.0/include/node/v8-template.h:814:8: note: candidate: ‘void v8::ObjectTemplate::SetAccessor(v8::Local<v8::Name>, v8::AccessorNameGetterCallback, v8::AccessorNameSetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute, v8::SideEffectType, v8::SideEffectType)’
npm ERR!   814 |   void SetAccessor(
npm ERR!       |        ^~~~~~~~~~~
npm ERR! /home/noraj/.cache/node-gyp/19.4.0/include/node/v8-template.h:819:22: note:   no known conversion for argument 7 from ‘Nan::imp::Sig’ {aka ‘int’} to ‘v8::SideEffectType’
npm ERR!   819 |       SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect,
npm ERR!       |       ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! make: *** [xmljs.target.mk:162: Release/obj.target/xmljs/src/libxmljs.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/node-gyp/lib/build.js:203:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:293:12)
npm ERR! gyp ERR! System Linux 6.1.7-arch1-1
npm ERR! gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--loglevel=http" "--module=/tmp/brokencrystals/node_modules/libxmljs/build/Release/xmljs.node" "--module_name=xmljs" "--module_path=/tmp/brokencrystals/node_modules/libxmljs/build/Release" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v111"
npm ERR! gyp ERR! cwd /tmp/brokencrystals/node_modules/libxmljs
npm ERR! gyp ERR! node -v v19.4.0
npm ERR! gyp ERR! node-gyp -v v9.3.1
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp ERR! build error
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --loglevel=http --module=/tmp/brokencrystals/node_modules/libxmljs/build/Release/xmljs.node --module_name=xmljs --module_path=/tmp/brokencrystals/node_modules/libxmljs/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v111' (1)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/tmp/brokencrystals/node_modules/libxmljs/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
npm ERR! node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1098:16)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:304:5)
npm ERR! node-pre-gyp ERR! System Linux 6.1.7-arch1-1
npm ERR! node-pre-gyp ERR! command "/usr/bin/node" "/tmp/brokencrystals/node_modules/libxmljs/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--loglevel" "http"
npm ERR! node-pre-gyp ERR! cwd /tmp/brokencrystals/node_modules/libxmljs
npm ERR! node-pre-gyp ERR! node -v v19.4.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.11.0
npm ERR! node-pre-gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/noraj/.npm/_logs/2023-01-21T14_21_58_116Z-debug-0.log

add dom based auth flow

A flow where the user must use the 'browser-based' authentication, where the following happens:

The JS form uses some hashed random data to generate a GET for the CSRF token

POST to the auth API endpoint with that token and valid credentials

Need some more discussion regarding the implementation of this feature. For a real world scenario, see RBC flow example on: https://www1.steroyalbank.com/cgi-bin/rbaccess/rbcgi3m01?F6=1&F7=IB&F21=IB&F22=IB&REQUEST=ClientSignin&LANGUAGE=ENGLISH

Create CI

Add GH Actions there:

  • build dist
  • run tests

Add support for OIDC

OIDC authentication should be configured as follows:

client credentials grant:

  • Token is embedded in Authorization header
  • The OAuth parameters (client_id, etc.) should be shown to the user on the OIDC login page

user password grant

  • Token is embedded in Cookie (e.g. auth_token=XYZ)
  • The OAuth parameters (client_id etc.) should be shown to the user on the OIDC login page

The typo in counters

@wehackpurple found a bug while we were filming! yey! 🎉

We guess it should say "messages" and not "Massages"? like depends on the services we supply 😅

image

image

brokencrystals-nodejs container keeps restarting

Hi there, I forked a copy of the repo and tried to run this locally on my Windows 10 device using Docker Desktop (WSL2). I had to modify the Dockerfile at the root dir, first line to "from node:16" as I was getting an error at the "RUN npm ci -q".

=> CACHED [brokencrystals-nodejs 3/13] COPY package*.json ./ 0.0s
=> ERROR [brokencrystals-nodejs 4/13] RUN npm ci -q 0.9s
=> CACHED [brokencrystals-proxy builder 2/11] WORKDIR /home/node/bc 0.0s
=> CACHED [brokencrystals-proxy builder 3/11] COPY package*.json ./ 0.0s
=> CANCELED [brokencrystals-proxy builder 4/11] RUN npm ci -q 1.0s

[brokencrystals-nodejs 4/13] RUN npm ci -q:
#0 0.914 npm ERR! Cannot read property '@mikro-orm/core' of undefined
#0 0.920
#0 0.920 npm ERR! A complete log of this run can be found in:
#0 0.920 npm ERR! /root/.npm/_logs/2022-12-12T19_59_32_263Z-debug.log


failed to solve: executor failed running [/bin/sh -c npm ci -q]: exit code: 1

By modifying to node:16 this allowed it to complete, however the container is unable to start due to the error below:

[email protected] start:prod
node dist/main.js

/var/www/node_modules/bindings/bindings.js:91
throw e
^

Error: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /var/www/node_modules/libxmljs/build/Release/xmljs.node)
at Object.Module._extensions..node (node:internal/modules/cjs/loader:1239:18)
at Module.load (node:internal/modules/cjs/loader:1033:32)
at Function.Module._load (node:internal/modules/cjs/loader:868:12)
at Module.require (node:internal/modules/cjs/loader:1057:19)
at require (node:internal/modules/cjs/helpers:103:18)
at bindings (/var/www/node_modules/bindings/bindings.js:84:48)
at Object. (/var/www/node_modules/libxmljs/lib/bindings.js:1:37)
at Module._compile (node:internal/modules/cjs/loader:1155:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
at Module.load (node:internal/modules/cjs/loader:1033:32) {
code: 'ERR_DLOPEN_FAILED'
}

Is there any more documentation on how to get it running locally? Any help is much appreciated

Docs: not clear how to build and run the project

I just couldn't run it with the following approach, can you please gimme a more detailed approach for running this repo ?

Building and Running the Application

build server

npm ci --prefix public && npm run build --prefix public

build client

npm ci && npm run build

#build and start dockers with Postgres DB, nginx and server
docker-compose up -d

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.