Skip to content

Commit 67c9cce

Browse files
committed
Merge branch 'stage' for release 1.3.0
2 parents 367917e + cfb13dc commit 67c9cce

File tree

73 files changed

+47725
-2404
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+47725
-2404
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,3 +157,8 @@ coverage-e2e
157157

158158
# secrets
159159
secrets/
160+
161+
# Visual Studio
162+
applicationhost.config
163+
*.suo
164+
.vs/

ormconfig.js

Lines changed: 0 additions & 15 deletions
This file was deleted.

package-lock.json

Lines changed: 2220 additions & 2018 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock_BACKUP_772.json

Lines changed: 11081 additions & 0 deletions
Large diffs are not rendered by default.

package-lock_BASE_772.json

Lines changed: 11242 additions & 0 deletions
Large diffs are not rendered by default.

package-lock_LOCAL_772.json

Lines changed: 11101 additions & 0 deletions
Large diffs are not rendered by default.

package-lock_REMOTE_772.json

Lines changed: 11216 additions & 0 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 36 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"scripts": {
99
"prebuild": "rimraf dist",
1010
"build": "nest build",
11-
"generate-migration": "npm run typeorm migration:generate -- -n",
11+
"generate-migration": "npm run typeorm migration:generate -n",
1212
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
1313
"prestart": "npm run run-migrations",
1414
"prestart:debug": "npm run run-migrations",
@@ -25,81 +25,89 @@
2525
"test:cov": "jest --coverage",
2626
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
2727
"test:e2e": "jest --config ./jest-e2e.js --detectOpenHandles --colors",
28-
"typeorm": "ts-node -r tsconfig-paths/register ./node_modules/typeorm/cli.js --config ./ormconfig.js",
28+
"typeorm": "ts-node -r tsconfig-paths/register ./node_modules/typeorm/cli.js -d \"src/repositories/os2iot.repository.ts\"",
2929
"typeorm-e2e": "ts-node -r tsconfig-paths/register ./node_modules/typeorm/cli.js --config ./ormconfig-e2e.json"
3030
},
3131
"dependencies": {
32-
"@nestjs/common": "^7.6.1",
33-
"@nestjs/config": "^0.6.1",
34-
"@nestjs/core": "^7.6.1",
35-
"@nestjs/jwt": "^7.2.0",
36-
"@nestjs/passport": "^7.1.5",
37-
"@nestjs/platform-express": "^7.6.1",
38-
"@nestjs/schedule": "^0.4.1",
39-
"@nestjs/swagger": "^4.8.2",
40-
"@nestjs/typeorm": "^7.1.5",
32+
"@nestjs/axios": "^0.1.0",
33+
"@nestjs/common": "^9.1.2",
34+
"@nestjs/config": "^2.2.0",
35+
"@nestjs/core": "^9.1.2",
36+
"@nestjs/jwt": "^9.0.0",
37+
"@nestjs/passport": "^9.0.0",
38+
"@nestjs/platform-express": "^9.1.2",
39+
"@nestjs/schedule": "^2.1.0",
40+
"@nestjs/swagger": "^6.1.2",
41+
"@nestjs/typeorm": "^9.0.1",
4142
"@types/bcryptjs": "^2.4.2",
4243
"@types/geojson": "^7946.0.7",
4344
"@types/kafkajs": "^1.9.0",
44-
"@types/passport-saml": "^1.1.2",
45+
"@types/passport-saml": "^1.1.3",
4546
"@types/uuid": "^8.3.0",
4647
"@types/ws": "^8.5.3",
4748
"@types/xml2js": "^0.4.7",
4849
"ajv": "^6.12.6",
4950
"axios-cache-adapter": "^2.5.0",
5051
"bcryptjs": "^2.4.3",
5152
"bluebird": "^3.7.2",
53+
"cache-manager": "^4.0.1",
5254
"class-transformer": "^0.5.1",
5355
"class-validator": "^0.13.2",
5456
"compression": "^1.7.4",
5557
"cookie-parser": "^1.4.5",
5658
"kafkajs": "^1.15.0",
5759
"lodash": "^4.17.20",
58-
"mqtt": "^4.2.6",
59-
"nestjs-pino": "^1.3.0",
60+
"mqtt": "^4.3.7",
6061
"njwt": "^1.0.0",
6162
"nodemailer": "^6.7.2",
62-
"passport": "^0.4.1",
63+
"passport": "^0.6.0",
6364
"passport-headerapikey": "^1.2.2",
6465
"passport-jwt": "^4.0.0",
6566
"passport-local": "^1.0.0",
66-
"passport-saml": "^1.3.5",
67+
"passport-saml": "^3.2.4",
6768
"pg": "^8.5.1",
68-
"protobufjs": "^6.11.2",
69+
"protobufjs": "^6.11.3",
6970
"reflect-metadata": "^0.1.13",
7071
"rimraf": "^3.0.2",
71-
"rxjs": "^6.6.3",
72+
"rxjs": "^7.5.7",
7273
"swagger-ui-express": "^4.1.5",
73-
"typeorm": "^0.2.34",
74+
"typeorm": "^0.3.10",
7475
"uuid": "^8.3.2",
75-
"vm2": "^3.9.9",
76+
"vm2": "^3.9.11",
7677
"wait-for-expect": "^3.0.2"
7778
},
7879
"devDependencies": {
79-
"@nestjs/cli": "^7.5.4",
80-
"@nestjs/testing": "^7.6.1",
80+
"@nestjs/cli": "^9.1.4",
81+
"@nestjs/testing": "^9.1.2",
82+
"@types/bcryptjs": "^2.4.2",
8183
"@types/bluebird": "^3.5.33",
84+
"@types/cache-manager": "^4.0.1",
8285
"@types/compression": "^1.7.0",
8386
"@types/cookie-parser": "^1.4.2",
8487
"@types/cron": "^1.7.2",
8588
"@types/express": "^4.17.9",
89+
"@types/geojson": "^7946.0.7",
90+
"@types/kafkajs": "^1.9.0",
8691
"@types/lodash": "^4.14.165",
8792
"@types/node": "^14.14.14",
8893
"@types/nodemailer": "^6.4.4",
8994
"@types/passport-jwt": "^3.0.3",
9095
"@types/passport-local": "^1.0.33",
96+
"@types/passport-saml": "^1.1.2",
9197
"@types/supertest": "^2.0.10",
98+
"@types/uuid": "^8.3.0",
9299
"@types/validator": "^13.7.1",
93-
"@types/ws": "^8.5.2",
94-
"@typescript-eslint/eslint-plugin": "^4.10.0",
95-
"@typescript-eslint/parser": "^4.10.0",
96-
"eslint": "^7.15.0",
100+
"@types/ws": "^8.5.3",
101+
"@types/xml2js": "^0.4.7",
102+
"@typescript-eslint/eslint-plugin": "^5.38.1",
103+
"@typescript-eslint/parser": "^5.38.1",
104+
"eslint": "^8.24.0",
97105
"eslint-config-prettier": "^7.0.0",
98106
"jest": "26.6.3",
99107
"prettier": "^2.2.1",
100108
"supertest": "^6.0.1",
101109
"ts-jest": "^26.4.4",
102-
"ts-node": "^9.1.1",
103-
"typescript": "^3.9.7"
110+
"ts-node": "^10.9.1",
111+
"typescript": "^4.8.3"
104112
}
105113
}

src/auth/kombit.strategy.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1+
import configuration from "@config/configuration";
2+
import { UserResponseDto } from "@dto/user-response.dto";
3+
import { ErrorCodes } from "@enum/error-codes.enum";
14
import { Injectable, Logger } from "@nestjs/common";
25
import { PassportStrategy } from "@nestjs/passport";
36
import { AuthService } from "@services/user-management/auth.service";
47
import { Profile, Strategy } from "passport-saml";
5-
import { UserResponseDto } from "@dto/user-response.dto";
6-
import configuration from "@config/configuration";
7-
import { ErrorCodes } from "@enum/error-codes.enum";
88

99
@Injectable()
1010
export class KombitStrategy extends PassportStrategy(Strategy, "kombit") {
@@ -26,6 +26,7 @@ export class KombitStrategy extends PassportStrategy(Strategy, "kombit") {
2626
logoutUrl: configuration()["kombit"]["entryPoint"],
2727
entryPoint: configuration()["kombit"]["entryPoint"],
2828
identifierFormat: "",
29+
cert: configuration()["kombit"]["certificatePublicKey"],
2930
privateCert: configuration()["kombit"]["certificatePrivateKey"],
3031
decryptionPvk: configuration()["kombit"]["certificatePrivateKey"],
3132
signatureAlgorithm: "sha256",

src/config/configuration.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ export default (): any => {
2323
kombit: {
2424
entryPoint:
2525
process.env.KOMBIT_ENTRYPOINT ||
26-
"https://adgangsstyring.eksterntest-stoettesystemerne.dk/runtime/saml2/issue.idp",
26+
"https://adgangsstyring.eksterntest-stoettesystemerne.dk/runtime/saml2/issue.idp",
27+
certificatePublicKey: process.env.KOMBIT_CERTIFICATEPUBLICKEY || "INSERT_KOMBIT_CERT", // Public certificate from Kombit Test server
2728
certificatePrivateKey: process.env.KOMBIT_CERTIFICATEPRIVATEKEY || null,
2829
roleUri:
2930
process.env.KOMBIT_ROLE_NAME ||

0 commit comments

Comments
 (0)