@oslokommune/auth-bff 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +30 -10
  2. package/dist/package.json +21 -21
  3. package/package.json +21 -21
package/README.md CHANGED
@@ -67,21 +67,21 @@ When running in docker you should specify the version to use, and make sure it m
67
67
  Example dockerfile:
68
68
 
69
69
  ```dockerfile
70
- FROM node:23-alpine AS base
70
+ FROM node:24-alpine AS base
71
71
 
72
- FROM base AS react-build
73
- WORKDIR /home/react
74
- COPY package*.json /home/react
75
- RUN npm install
72
+ FROM base AS build
73
+ WORKDIR /home/app
74
+ COPY package*.json /home/app
75
+ RUN npm ci
76
76
  COPY . ./
77
77
  RUN npm run build
78
78
 
79
79
  FROM base
80
80
  WORKDIR /application
81
81
  EXPOSE 8080
82
- COPY --from=react-build /home/react/dist /application/dist
82
+ COPY --from=build /home/app/dist /application/dist
83
83
  ENV NODE_ENV=production
84
- RUN npm install -g @oslokommune/auth-bff@2.0.0
84
+ RUN npm install -g @oslokommune/auth-bff@2.0.1
85
85
  COPY bff.config.json /application/
86
86
  CMD ["auth-bff"]
87
87
  ```
@@ -372,6 +372,26 @@ if (authState === 'authenticated') {
372
372
  ## Content Security Policy
373
373
 
374
374
  To configure the content security policy returned by the server, use the `contentSecurityPolicy` config option. This
375
- configuration is passed almost as-is to [helmet](https://github.com/helmetjs/helmet). Since our configuration is json
376
- only, not all features are supported. To set a nonce, use the special form `"{nonce}"` instead. It will be replaced by a
377
- generated nonce for each request.
375
+ configuration is passed almost as-is to [helmet](https://github.com/helmetjs/helmet). Note that since our configuration is json
376
+ only, not all features are supported.
377
+
378
+ ### Nonce
379
+ To set a nonce, use the special form `"{nonce}"`. It will be replaced by a
380
+ generated nonce for each request. For example:
381
+ ```json
382
+ {
383
+ "contentSecurityPolicy": {
384
+ "directives": {
385
+ ...
386
+ "script-src": ["'self'", "{nonce}", ...]
387
+ }
388
+ }
389
+ }
390
+ ```
391
+
392
+ To use a nonce in your app, use `__CSP_NONCE__` in your html. It will be replaced with a nonce for each request:
393
+ ```html
394
+ <script nonce="__CSP_NONCE__">
395
+ ...
396
+ </script>
397
+ ```
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oslokommune/auth-bff",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "repository": "https://github.com/oslokommune/auth-bff.git",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -27,32 +27,32 @@
27
27
  "license": "",
28
28
  "description": "",
29
29
  "devDependencies": {
30
- "@types/command-line-args": "^5.2.3",
31
- "@types/compression": "^1.8.1",
32
- "@types/express": "^4.17.22",
33
- "@types/express-session": "^1.18.2",
30
+ "@types/command-line-args": "5.2.3",
31
+ "@types/compression": "1.8.1",
32
+ "@types/express": "4.17.22",
33
+ "@types/express-session": "1.18.2",
34
34
  "@types/node-forge": "1.3.13",
35
35
  "@types/react": "17.0.87",
36
- "@types/supertest": "^6.0.3",
36
+ "@types/supertest": "6.0.3",
37
37
  "react": "17.0.2",
38
- "supertest": "^7.2.2",
39
- "typescript": "^5.9.3",
40
- "vitest": "^4.1.2"
38
+ "supertest": "7.2.2",
39
+ "typescript": "5.9.3",
40
+ "vitest": "4.1.6"
41
41
  },
42
42
  "dependencies": {
43
- "@aws-sdk/client-dynamodb": "^3.1018.0",
44
- "@aws-sdk/client-ssm": "^3.1018.0",
45
- "command-line-args": "^6.0.1",
46
- "compression": "^1.8.1",
47
- "connect-dynamodb": "^3.0.5",
48
- "express": "4.22.1",
43
+ "@aws-sdk/client-dynamodb": "3.1045.0",
44
+ "@aws-sdk/client-ssm": "3.1045.0",
45
+ "command-line-args": "6.0.1",
46
+ "compression": "1.8.1",
47
+ "connect-dynamodb": "3.0.5",
48
+ "express": "4.22.2",
49
49
  "express-session": "1.19.0",
50
- "find-up": "^7.0.0",
51
- "helmet": "^8.1.0",
52
- "http-proxy-middleware": "^3.0.5",
53
- "jose": "^6.1.3",
50
+ "find-up": "7.0.0",
51
+ "helmet": "8.1.0",
52
+ "http-proxy-middleware": "4.0.0",
53
+ "jose": "6.1.3",
54
54
  "node-forge": "1.4.0",
55
- "openid-client": "^6.8.2",
56
- "string-replace-middleware": "^1.1.0"
55
+ "openid-client": "6.8.2",
56
+ "string-replace-middleware": "1.1.0"
57
57
  }
58
58
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oslokommune/auth-bff",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "repository": "https://github.com/oslokommune/auth-bff.git",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -27,32 +27,32 @@
27
27
  "license": "",
28
28
  "description": "",
29
29
  "devDependencies": {
30
- "@types/command-line-args": "^5.2.3",
31
- "@types/compression": "^1.8.1",
32
- "@types/express": "^4.17.22",
33
- "@types/express-session": "^1.18.2",
30
+ "@types/command-line-args": "5.2.3",
31
+ "@types/compression": "1.8.1",
32
+ "@types/express": "4.17.22",
33
+ "@types/express-session": "1.18.2",
34
34
  "@types/node-forge": "1.3.13",
35
35
  "@types/react": "17.0.87",
36
- "@types/supertest": "^6.0.3",
36
+ "@types/supertest": "6.0.3",
37
37
  "react": "17.0.2",
38
- "supertest": "^7.2.2",
39
- "typescript": "^5.9.3",
40
- "vitest": "^4.1.2"
38
+ "supertest": "7.2.2",
39
+ "typescript": "5.9.3",
40
+ "vitest": "4.1.6"
41
41
  },
42
42
  "dependencies": {
43
- "@aws-sdk/client-dynamodb": "^3.1018.0",
44
- "@aws-sdk/client-ssm": "^3.1018.0",
45
- "command-line-args": "^6.0.1",
46
- "compression": "^1.8.1",
47
- "connect-dynamodb": "^3.0.5",
48
- "express": "4.22.1",
43
+ "@aws-sdk/client-dynamodb": "3.1045.0",
44
+ "@aws-sdk/client-ssm": "3.1045.0",
45
+ "command-line-args": "6.0.1",
46
+ "compression": "1.8.1",
47
+ "connect-dynamodb": "3.0.5",
48
+ "express": "4.22.2",
49
49
  "express-session": "1.19.0",
50
- "find-up": "^7.0.0",
51
- "helmet": "^8.1.0",
52
- "http-proxy-middleware": "^3.0.5",
53
- "jose": "^6.1.3",
50
+ "find-up": "7.0.0",
51
+ "helmet": "8.1.0",
52
+ "http-proxy-middleware": "4.0.0",
53
+ "jose": "6.1.3",
54
54
  "node-forge": "1.4.0",
55
- "openid-client": "^6.8.2",
56
- "string-replace-middleware": "^1.1.0"
55
+ "openid-client": "6.8.2",
56
+ "string-replace-middleware": "1.1.0"
57
57
  }
58
58
  }