Skip to content

Commit

Permalink
Merge pull request #104 from bcgov/bug/config-defaults
Browse files Browse the repository at this point in the history
Make Keycloak config optional and update docs
  • Loading branch information
kyle1morel authored Jan 12, 2024
2 parents 70ed6fe + 744a37d commit 651b856
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ The following variables alter the behavior of Carbone and its caching behavior.

| Config Var | Env Var | Default | Notes |
| --- | --- | --- | --- |
| `cacheDir` | `CACHE_DIR` | `/tmp/carbone-files` | This is the root location to read/write files. Error will be thrown if directory does not exist and cannot be created. Will attempt to fall back to operating system temp file location. |
| `cacheDir` | `CACHE_DIR` | `/var/lib/file-cache/data` | This is the root location to read/write files. Error will be thrown if directory does not exist and cannot be created. Will attempt to fall back to operating system temp file location. |
| `cacheSize` | `CACHE_SIZE` | `2GB` | The maximum size of the `cacheDir` directory. Oldest timestamped files will be cycled out to make room for new files. Uses the [bytes](https://www.npmjs.com/package/bytes) library for parsing values. |
| `converterFactoryTimeout` | `CONVERTER_FACTORY_TIMEOUT` | `60000` | Maximum amount of time (in milliseconds) that Carbone will use to convert files before timing out. |
| `formFieldName` | `UPLOAD_FIELD_NAME` | `template` | Field name for multipart form data upload when uploading templates via /template api. |
Expand Down
4 changes: 2 additions & 2 deletions app/src/components/keycloak.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ module.exports = new Keycloak({}, {
'confidential-port': 0,
clientId: config.has('keycloak.clientId') ? config.get('keycloak.clientId') : undefined,
'policy-enforcer': {},
realm: config.get('keycloak.realm'),
realm: config.has('keycloak.realm') ? config.get('keycloak.realm') : undefined,
realmPublicKey: config.has('keycloak.publicKey') ? config.get('keycloak.publicKey') : undefined,
secret: config.has('keycloak.clientSecret') ? config.get('keycloak.clientSecret') : undefined,
serverUrl: config.get('keycloak.serverUrl'),
serverUrl: config.has('keycloak.serverUrl') ? config.get('keycloak.serverUrl') : undefined,
'ssl-required': 'external',
'use-resource-role-mappings': false,
'verify-token-audience': true
Expand Down

0 comments on commit 651b856

Please sign in to comment.