Skip to content

Commit 3a300da

Browse files
committed
ci test
1 parent 3154930 commit 3a300da

File tree

1 file changed

+53
-53
lines changed

1 file changed

+53
-53
lines changed

app/README.md

+53-53
Original file line numberDiff line numberDiff line change
@@ -42,66 +42,66 @@ COMS supports a large array of environment variables to configure how it will be
4242

4343
The following variables enable and enforce the use of Basic Authentication for requests to COMS
4444

45-
| Config Var | Env Var | Default | Notes |
46-
| --- | --- | --- | --- |
47-
| `enabled` | `BASICAUTH_ENABLED` | | Whether to run COMS in Basic Auth mode |
48-
| `username` | `BASICAUTH_USERNAME` | | An arbitrary Username provided in a Basic Auth header of requests from your COMS client application |
49-
| `password` | `BASICAUTH_PASSWORD` | | An arbitrary Password provided in a Basic Auth header of requests from your COMS client application |
45+
| Config Var | Env Var | Default | Notes |
46+
| ---------- | -------------------- | ------- | --------------------------------------------------------------------------------------------------- |
47+
| `enabled` | `BASICAUTH_ENABLED` | | Whether to run COMS in Basic Auth mode |
48+
| `username` | `BASICAUTH_USERNAME` | | An arbitrary Username provided in a Basic Auth header of requests from your COMS client application |
49+
| `password` | `BASICAUTH_PASSWORD` | | An arbitrary Password provided in a Basic Auth header of requests from your COMS client application |
5050

5151
### Database Variables
5252

5353
The following variables configure the use of a backend database to support user-based access control, tagging and other advanced features
5454

55-
| Config Var | Env Var | Default | Notes |
56-
| --- | --- | --- | --- |
57-
| `database` | `DB_DATABASE` | coms | COMS database name |
58-
| `host` | `DB_HOST` | localhost | Database conection hostname |
59-
| `username` | `DB_USERNAME` | app | Database account username |
60-
| `password` | `DB_PASSWORD` | | Database account password |
61-
| `port` | `DB_PORT` | 5432 | Database connection port |
62-
| `poolMin` | `DB_POOL_MIN` | 2 | avalable connections |
63-
| `poolMax` | `DB_POOL_MAX` | 10 | available connections |
55+
| Config Var | Env Var | Default | Notes |
56+
| ---------- | ------------- | --------- | --------------------------- |
57+
| `database` | `DB_DATABASE` | coms | COMS database name |
58+
| `host` | `DB_HOST` | localhost | Database conection hostname |
59+
| `username` | `DB_USERNAME` | app | Database account username |
60+
| `password` | `DB_PASSWORD` | | Database account password |
61+
| `port` | `DB_PORT` | 5432 | Database connection port |
62+
| `poolMin` | `DB_POOL_MIN` | 2 | avalable connections |
63+
| `poolMax` | `DB_POOL_MAX` | 10 | available connections |
6464

6565
### Keycloak Variables
6666

6767
The following variables enable and enforce the use of OIDC Bearer Authentication for requests to COMS
6868

69-
| Config Var | Env Var | Default | Notes |
70-
| --- | --- | --- | --- |
71-
| `enabled` | `KC_ENABLED` | | Whether to run COMS in OIDC mode, required for user-based access controls and integration with OIDC users |
72-
| `clientId` | `KC_CLIENTID` | | Keycloak service client ID for COMS |
73-
| `clientSecret` | `KC_CLIENTSECRET` | | Keycloak service client secret |
74-
| `identityKey` | `KC_IDENTITYKEY` | | Specify using alternative JWT claims for user identification instead of the standard jwt.sub. Multiple claim attributes may be specified via a comma-separated list. COMS will attempt to search for the custom claim ordered based on how it is specified in this variable before falling back to jwt.sub if none are found. |
75-
| `publicKey` | `KC_PUBLICKEY` | | If specified, verify all incoming JWT signatures off of the provided public key |
76-
| `realm` | `KC_REALM` | | Keycloak realm ID for COMS |
77-
| `serverUrl` | `KC_SERVERURL` | | Keycloak server url for COMS authentication |
69+
| Config Var | Env Var | Default | Notes |
70+
| -------------- | ----------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
71+
| `enabled` | `KC_ENABLED` | | Whether to run COMS in OIDC mode, required for user-based access controls and integration with OIDC users |
72+
| `clientId` | `KC_CLIENTID` | | Keycloak service client ID for COMS |
73+
| `clientSecret` | `KC_CLIENTSECRET` | | Keycloak service client secret for COMS |
74+
| `identityKey` | `KC_IDENTITYKEY` | | Specify using alternative JWT claims for user identification instead of the standard jwt.sub. Multiple claim attributes may be specified via a comma-separated list. COMS will attempt to search for the custom claim ordered based on how it is specified in this variable before falling back to jwt.sub if none are found. |
75+
| `publicKey` | `KC_PUBLICKEY` | | If specified, verify all incoming JWT signatures off of the provided public key |
76+
| `realm` | `KC_REALM` | | Keycloak realm ID for COMS |
77+
| `serverUrl` | `KC_SERVERURL` | | Keycloak server url for COMS authentication |
7878

7979
### Object Storage Variables
8080

8181
The following variables enable and enforce the use of OIDC Bearer Authentication for requests to COMS
8282

83-
| Config Var | Env Var | Default | Notes |
84-
| --- | --- | --- | --- |
85-
| `enabled` | `OBJECTSTORAGE_ENABLED` | | Whether to run COMS with a default bucket |
86-
| `accessKeyId` | `OBJECTSTORAGE_ACCESSKEYID` | | The Access Key for your S3 compatible object storage account |
87-
| `bucket` | `OBJECTSTORAGE_BUCKET` | | The object storage bucket name |
88-
| `endpoint` | `OBJECTSTORAGE_ENDPOINT` | | Object store URL. eg: `https://nrs.objectstore.gov.bc.ca` |
89-
| `key` | `OBJECTSTORAGE_KEY` | | The base path for storage location |
90-
| `secretAccessKey` | `OBJECTSTORAGE_SECRETACCESSKEY` | | The Secret Access Key for your S3 compatible object storage account |
83+
| Config Var | Env Var | Default | Notes |
84+
| ----------------- | ------------------------------- | ------- | ------------------------------------------------------------------- |
85+
| `enabled` | `OBJECTSTORAGE_ENABLED` | | Whether to run COMS with a default bucket |
86+
| `accessKeyId` | `OBJECTSTORAGE_ACCESSKEYID` | | The Access Key for your S3 compatible object storage account |
87+
| `bucket` | `OBJECTSTORAGE_BUCKET` | | The object storage bucket name |
88+
| `endpoint` | `OBJECTSTORAGE_ENDPOINT` | | Object store URL. eg: `https://nrs.objectstore.gov.bc.ca` |
89+
| `key` | `OBJECTSTORAGE_KEY` | | The base path for storage location |
90+
| `secretAccessKey` | `OBJECTSTORAGE_SECRETACCESSKEY` | | The Secret Access Key for your S3 compatible object storage account |
9191

9292
### Server Variables
9393

9494
The following variables alter the general Express application behavior. For most situations, the defaults should be sufficient.
9595

96-
| Config Var | Env Var | Default | Notes |
97-
| --- | --- | --- | --- |
98-
| `bodyLimit` | `SERVER_BODYLIMIT` | 30mb | Maximum body size accepted for parsing to JSON body |
99-
| `defaultTempExpiresIn` | `SERVER_TEMP_EXPIRESIN` | 300 | The expiry time for pre-signed S3 URLs to objects in seconds |
100-
| `logFile` | `SERVER_LOGFILE` | | Writes logs to the following file only if defined |
101-
| `logLevel` | `SERVER_LOGLEVEL` | http | The logging level of COMS |
102-
| `passphrase` | `SERVER_PASSPHRASE` | | A key to encrypt/decrypt bucket secretAccessKey's saved to the database |
103-
| `port` | `SERVER_PORT` | 3000 | The port that COMS application will bind to |
104-
| `privacyMask` | `SERVER_PRIVACY_MASK` | | Strict content privacy controls |
96+
| Config Var | Env Var | Default | Notes |
97+
| ---------------------- | ----------------------- | ------- | ----------------------------------------------------------------------- |
98+
| `bodyLimit` | `SERVER_BODYLIMIT` | 30mb | Maximum body size accepted for parsing to JSON body |
99+
| `defaultTempExpiresIn` | `SERVER_TEMP_EXPIRESIN` | 300 | The expiry time for pre-signed S3 URLs to objects in seconds |
100+
| `logFile` | `SERVER_LOGFILE` | | Writes logs to the following file only if defined |
101+
| `logLevel` | `SERVER_LOGLEVEL` | http | The logging level of COMS |
102+
| `passphrase` | `SERVER_PASSPHRASE` | | A key to encrypt/decrypt bucket secretAccessKey's saved to the database |
103+
| `port` | `SERVER_PORT` | 3000 | The port that COMS application will bind to |
104+
| `privacyMask` | `SERVER_PRIVACY_MASK` | | Strict content privacy controls |
105105

106106
## Quick Start
107107

@@ -115,13 +115,13 @@ Note: change the `latest` tag to specific version if needed. Avoid using the lat
115115

116116
Get COMS image:
117117

118-
``` sh
118+
```sh
119119
docker pull docker.io/bcgovimages/common-object-management-service:latest
120120
```
121121

122122
Run COMS in **Unauthenticated mode** (replace environment values as necessary)
123123

124-
``` sh
124+
```sh
125125
docker run -it --rm -p 3000:3000 \
126126
-e OBJECTSTORAGE_ENABLED=true \
127127
-e OBJECTSTORAGE_ACCESSKEYID=<Access Key ID for your S3 account> \
@@ -134,7 +134,7 @@ docker run -it --rm -p 3000:3000 \
134134

135135
Run COMS in **Basic Auth mode** (replace environment values as necessary)
136136

137-
``` sh
137+
```sh
138138
docker run -it --rm -p 3000:3000 \
139139
-e OBJECTSTORAGE_ENABLED=true \
140140
-e OBJECTSTORAGE_ACCESSKEYID=<Access Key ID for your S3 account> \
@@ -152,14 +152,14 @@ docker run -it --rm -p 3000:3000 \
152152

153153
Before running the application, you must make sure that your database is up to date with the latest schema migration. Run the following first before starting up the COMS app as a maintenance task:
154154

155-
``` sh
155+
```sh
156156
docker run -it --rm --entrypoint '/bin/sh' -c 'npm run migrate' \
157157
docker.io/bcgovimages/common-object-management-service:latest
158158
```
159159

160160
Run COMS in **OIDC Auth Mode** (replace environment values as necessary)
161161

162-
``` sh
162+
```sh
163163
docker run -it --rm -p 3000:3000 \
164164
-e OBJECTSTORAGE_ENABLED=true \
165165
-e OBJECTSTORAGE_ACCESSKEYID=<Access Key ID for your S3 account> \
@@ -180,7 +180,7 @@ docker run -it --rm -p 3000:3000 \
180180

181181
Run COMS in **Full Auth Mode** (replace environment values as necessary)
182182

183-
``` sh
183+
```sh
184184
docker run -it --rm -p 3000:3000 \
185185
-e OBJECTSTORAGE_ENABLED=true \
186186
-e OBJECTSTORAGE_ACCESSKEYID=<Access Key ID for your S3 account> \
@@ -218,7 +218,7 @@ For more information on how the config library loads and searches for environmen
218218
At a minimum (when running COMS in 'Unauthenticated mode'), you are required to have configuration values for your Object Storage.
219219
To run COMS in Full Auth mode you will want your `local.json` to have the following values defined, with your own values as needed:
220220

221-
``` json
221+
```json
222222
{
223223
"basicAuth": {
224224
"enabled": true,
@@ -255,7 +255,7 @@ To run COMS in Full Auth mode you will want your `local.json` to have the follow
255255

256256
Before starting up the COMS app, run the following command to ensure your database is up to date with the latest database schema migration:
257257

258-
``` sh
258+
```sh
259259
npm run migrate
260260
```
261261

@@ -265,31 +265,31 @@ Install node dependencies with `npm ci`. You may use `npm install` if you are up
265265

266266
Run the server with hot-reloading for development
267267

268-
``` sh
268+
```sh
269269
npm run serve
270270
```
271271

272272
Run the server
273273

274-
``` sh
274+
```sh
275275
npm run start
276276
```
277277

278278
Migrate Database
279279

280-
``` sh
280+
```sh
281281
npm run migrate
282282
```
283283

284284
Lint the codebase
285285

286-
``` sh
286+
```sh
287287
npm run lint
288288
```
289289

290290
Run your tests
291291

292-
``` sh
292+
```sh
293293
npm run test
294294
```
295295

0 commit comments

Comments
 (0)