@oslokommune/auth-bff 2.0.0-beta5 → 2.0.0

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.
package/README.md CHANGED
@@ -4,14 +4,14 @@ A NodeJS Backend for frontend.
4
4
 
5
5
  Features:
6
6
 
7
+ * Serves a static web app
8
+ * Proxies API calls, with the user's access token
7
9
  * Two "modes" of operation
8
10
  * A vite plugin for use during development
9
11
  * A standalone mode for use in production (e.g. inside a docker container)
10
12
  * Supports generic OIDC auth code flow clients
11
13
  * Has special support for `okdata`-generated Idporten clients
12
14
  * Handles login/logout and sessions (using DynamoDb as a store)
13
- * Proxies API calls
14
- * Serves a static web app
15
15
  * Includes simple React components for handling login-state
16
16
 
17
17
  See https://github.com/oslokommune/auth-bff-example for an example React app using this package.
@@ -81,7 +81,7 @@ WORKDIR /application
81
81
  EXPOSE 8080
82
82
  COPY --from=react-build /home/react/dist /application/dist
83
83
  ENV NODE_ENV=production
84
- RUN npm install -g @oslokommune/auth-bff@2.0.0-beta4
84
+ RUN npm install -g @oslokommune/auth-bff@2.0.0
85
85
  COPY bff.config.json /application/
86
86
  CMD ["auth-bff"]
87
87
  ```
@@ -161,7 +161,8 @@ AWS Parameter store:
161
161
  This loads from the configured AWS environment. For this to work on your local machine the `AWS_PROFILE` environment
162
162
  variable must be set, and you must be signed in to that profile
163
163
 
164
- ℹ️ [See `config.ts` for a description of all config parameters](src/config.ts)
164
+ > [!NOTE]
165
+ >️ See [`config.ts`](src/config.ts) for a description of all config parameters
165
166
 
166
167
  ## Using with ID-porten (via `okdata`):
167
168
 
@@ -211,6 +212,25 @@ running locally.
211
212
 
212
213
  3. Done!
213
214
 
215
+
216
+ ## Using with Entra ID:
217
+ When using the package with Entra ID, you need to get credentials from Azure. You need to collect following credentials in order to be able to use this package:
218
+
219
+ * issuer
220
+ * client id
221
+ * client secret
222
+
223
+ With Entra ID you need to make sure to remove `"okDataIdPortenKeyName"`from the configuration file and replace it with client secret.
224
+
225
+ ```json
226
+ {
227
+ "issuer": "https://login.microsoftonline.com/{TENANT_ID}/v2.0",
228
+ "clientId": "1111111q-2bab-3333-c444-5555e556cb55",
229
+ "clientSecret": "7dW3Q~_sdfj3-4f5g-6789-h0i1-2j3k4l5m6n7",
230
+ ...
231
+ }
232
+ ```
233
+
214
234
  ## Configuring session storage
215
235
 
216
236
  Currently only dynamoDb is supported for storing sessions in production. It requires some setup.
@@ -221,7 +241,7 @@ sessions during front-channel logout)
221
241
  > If the table does not exist, it will be automatically created with settings not appropriate for production.
222
242
 
223
243
 
224
- Here is an example configuration in terraform. If you are using (https://km.oslo.systems/)[Golden Path],
244
+ Here is an example configuration in terraform. If you are using [Golden Path](https://km.oslo.systems/),
225
245
  you can simply copy this to a file in your application stack, and run `terraform apply`
226
246
 
227
247
  ```terraform
@@ -352,6 +372,6 @@ if (authState === 'authenticated') {
352
372
  ## Content Security Policy
353
373
 
354
374
  To configure the content security policy returned by the server, use the `contentSecurityPolicy` config option. This
355
- configuration is passed almost as-is to (helmet)[https://github.com/helmetjs/helmet]. Since our configuration is json
375
+ configuration is passed almost as-is to [helmet](https://github.com/helmetjs/helmet). Since our configuration is json
356
376
  only, not all features are supported. To set a nonce, use the special form `"{nonce}"` instead. It will be replaced by a
357
377
  generated nonce for each request.
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oslokommune/auth-bff",
3
- "version": "2.0.0-beta5",
3
+ "version": "2.0.0",
4
4
  "repository": "https://github.com/oslokommune/auth-bff.git",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -37,11 +37,11 @@
37
37
  "react": "17.0.2",
38
38
  "supertest": "^7.2.2",
39
39
  "typescript": "^5.9.3",
40
- "vitest": "^4.0.18"
40
+ "vitest": "^4.1.2"
41
41
  },
42
42
  "dependencies": {
43
- "@aws-sdk/client-dynamodb": "^3.990.0",
44
- "@aws-sdk/client-ssm": "^3.990.0",
43
+ "@aws-sdk/client-dynamodb": "^3.1018.0",
44
+ "@aws-sdk/client-ssm": "^3.1018.0",
45
45
  "command-line-args": "^6.0.1",
46
46
  "compression": "^1.8.1",
47
47
  "connect-dynamodb": "^3.0.5",
@@ -51,7 +51,7 @@
51
51
  "helmet": "^8.1.0",
52
52
  "http-proxy-middleware": "^3.0.5",
53
53
  "jose": "^6.1.3",
54
- "node-forge": "1.3.3",
54
+ "node-forge": "1.4.0",
55
55
  "openid-client": "^6.8.2",
56
56
  "string-replace-middleware": "^1.1.0"
57
57
  }
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oslokommune/auth-bff",
3
- "version": "2.0.0-beta5",
3
+ "version": "2.0.0",
4
4
  "repository": "https://github.com/oslokommune/auth-bff.git",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -37,11 +37,11 @@
37
37
  "react": "17.0.2",
38
38
  "supertest": "^7.2.2",
39
39
  "typescript": "^5.9.3",
40
- "vitest": "^4.0.18"
40
+ "vitest": "^4.1.2"
41
41
  },
42
42
  "dependencies": {
43
- "@aws-sdk/client-dynamodb": "^3.990.0",
44
- "@aws-sdk/client-ssm": "^3.990.0",
43
+ "@aws-sdk/client-dynamodb": "^3.1018.0",
44
+ "@aws-sdk/client-ssm": "^3.1018.0",
45
45
  "command-line-args": "^6.0.1",
46
46
  "compression": "^1.8.1",
47
47
  "connect-dynamodb": "^3.0.5",
@@ -51,7 +51,7 @@
51
51
  "helmet": "^8.1.0",
52
52
  "http-proxy-middleware": "^3.0.5",
53
53
  "jose": "^6.1.3",
54
- "node-forge": "1.3.3",
54
+ "node-forge": "1.4.0",
55
55
  "openid-client": "^6.8.2",
56
56
  "string-replace-middleware": "^1.1.0"
57
57
  }