diff --git a/README.md b/README.md index abc0b54..79502f3 100644 --- a/README.md +++ b/README.md @@ -52,29 +52,35 @@ npm run test:integration The following environment variables are used by `dscp-api` and can be configured. Entries marked as `required` are needed when running `dscp-api` in production mode. -| variable | required | default | description | -| :------------------------------ | :------: | :-------------------------------------------------: | :------------------------------------------------------------------------------------------- | -| PORT | N | `3001` | The port for the API to listen on | -| API_HOST | Y | - | The hostname of the `dscp-node` the API should connect to | -| API_PORT | N | `9944` | The port of the `dscp-node` the API should connect to | -| LOG_LEVEL | N | `info` | Logging level. Valid values are [`trace`, `debug`, `info`, `warn`, `error`, `fatal`] | -| USER_URI | Y | - | The Substrate `URI` representing the private key to use when making `dscp-node` transactions | -| IPFS_HOST | Y | - | Hostname of the `IPFS` node to use for metadata storage | -| IPFS_PORT | N | `15001` | Port of the `IPFS` node to use for metadata storage | -| AUTH_JWKS_URI | N | `https://inteli.eu.auth0.com/.well-known/jwks.json` | JSON Web Key Set containing public keys used by the Auth0 API | -| AUTH_AUDIENCE | N | `inteli-dev` | Identifier of the Auth0 API | -| AUTH_ISSUER | N | `https://inteli.eu.auth0.com/` | Domain of the Auth0 API ` | -| AUTH_TOKEN_URL | N | `https://inteli.eu.auth0.com/oauth/token` | Auth0 API endpoint that issues an Authorisation (Bearer) access token | -| METADATA_KEY_LENGTH | N | `32` | Fixed length of metadata keys | -| METADATA_VALUE_LITERAL_LENGTH | N | `32` | Fixed length of metadata LITERAL values | -| MAX_METADATA_COUNT | N | `16` | Maximum number of metadata items allowed per token | -| API_VERSION | N | `package.json version` | API version | -| API_MAJOR_VERSION | N | `v3` | API major version | -| FILE_UPLOAD_MAX_SIZE | N | `200 * 1024 * 1024` | The Maximum file upload size (bytes) | -| SUBSTRATE_STATUS_POLL_PERIOD_MS | N | `10 * 1000` | Number of ms between calls to check dscp-node status | -| SUBSTRATE_STATUS_TIMEOUT_MS | N | `2 * 1000` | Number of ms to wait for response to dscp-node health requests | -| IPFS_STATUS_POLL_PERIOD_MS | N | `10 * 1000` | Number of ms between calls to check ipfs status | -| IPFS_STATUS_TIMEOUT_MS | N | `2 * 1000` | Number of ms to wait for response to ipfs health requests | +| variable | required | default | description | +| :------------------------------ | :------: | :--------------------: | :------------------------------------------------------------------------------------------- | +| PORT | N | `3001` | The port for the API to listen on | +| API_HOST | Y | - | The hostname of the `dscp-node` the API should connect to | +| API_PORT | N | `9944` | The port of the `dscp-node` the API should connect to | +| LOG_LEVEL | N | `info` | Logging level. Valid values are [`trace`, `debug`, `info`, `warn`, `error`, `fatal`] | +| USER_URI | Y | - | The Substrate `URI` representing the private key to use when making `dscp-node` transactions | +| IPFS_HOST | Y | - | Hostname of the `IPFS` node to use for metadata storage | +| IPFS_PORT | N | `15001` | Port of the `IPFS` node to use for metadata storage | +| METADATA_KEY_LENGTH | N | `32` | Fixed length of metadata keys | +| METADATA_VALUE_LITERAL_LENGTH | N | `32` | Fixed length of metadata LITERAL values | +| MAX_METADATA_COUNT | N | `16` | Maximum number of metadata items allowed per token | +| API_VERSION | N | `package.json version` | API version | +| API_MAJOR_VERSION | N | `v3` | API major version | +| FILE_UPLOAD_MAX_SIZE | N | `200 * 1024 * 1024` | The Maximum file upload size (bytes) | +| SUBSTRATE_STATUS_POLL_PERIOD_MS | N | `10 * 1000` | Number of ms between calls to check dscp-node status | +| SUBSTRATE_STATUS_TIMEOUT_MS | N | `2 * 1000` | Number of ms to wait for response to dscp-node health requests | +| IPFS_STATUS_POLL_PERIOD_MS | N | `10 * 1000` | Number of ms between calls to check ipfs status | +| IPFS_STATUS_TIMEOUT_MS | N | `2 * 1000` | Number of ms to wait for response to ipfs health requests | +| AUTH_TYPE | N | `NONE` | Authentication type for routes on the service. Valid values: [`NONE`, `JWT`] | + +The following environment variables are additionally used when `AUTH_TYPE : 'JWT'` + +| variable | required | default | description | +| :------------- | :------: | :-------------------------------------------------: | :-------------------------------------------------------------------- | +| AUTH_JWKS_URI | N | `https://inteli.eu.auth0.com/.well-known/jwks.json` | JSON Web Key Set containing public keys used by the Auth0 API | +| AUTH_AUDIENCE | N | `inteli-dev` | Identifier of the Auth0 API | +| AUTH_ISSUER | N | `https://inteli.eu.auth0.com/` | Domain of the Auth0 API ` | +| AUTH_TOKEN_URL | N | `https://inteli.eu.auth0.com/oauth/token` | Auth0 API endpoint that issues an Authorisation (Bearer) access token | ## Running the API @@ -111,7 +117,7 @@ This will return a JSON response (`Content-Type` `application/json`) of the form ### Authenticated endpoints -The rest of the endpoints in `dscp-api` require authentication in the form of a header `'Authorization: Bearer YOUR_ACCESS_TOKEN'`: +If `AUTH_TYPE` env is set to `JWT`, the rest of the endpoints in `dscp-api` require authentication in the form of a header `'Authorization: Bearer YOUR_ACCESS_TOKEN'`: 1. [GET /item/:id](#get-/item/:id) 2. [GET /item/:id/metadata/:metadataKey](#get-/item/:id/metadata/:metadataKey) diff --git a/app/api-v3/routes/item/{id}.js b/app/api-v3/routes/item/{id}.js index 975a467..fc4230f 100644 --- a/app/api-v3/routes/item/{id}.js +++ b/app/api-v3/routes/item/{id}.js @@ -1,6 +1,7 @@ const { validateTokenId } = require('../../../util/appUtil') const logger = require('../../../logger') const { getReadableMetadataKeys } = require('../../../util/appUtil') +const { getDefaultSecurity } = require('../../../util/auth') module.exports = function (apiService) { const doc = { @@ -82,7 +83,7 @@ module.exports = function (apiService) { }, }, }, - security: [{ bearerAuth: [] }], + security: getDefaultSecurity(), tags: ['item'], } diff --git a/app/api-v3/routes/item/{id}/metadata/{metadataKey}.js b/app/api-v3/routes/item/{id}/metadata/{metadataKey}.js index f57e6c6..7ae9b7a 100644 --- a/app/api-v3/routes/item/{id}/metadata/{metadataKey}.js +++ b/app/api-v3/routes/item/{id}/metadata/{metadataKey}.js @@ -1,4 +1,5 @@ const { getMetadataResponse } = require('../../../../../util/appUtil') +const { getDefaultSecurity } = require('../../../../../util/auth') module.exports = function () { const doc = { @@ -61,7 +62,7 @@ module.exports = function () { }, }, }, - security: [{ bearerAuth: [] }], + security: getDefaultSecurity(), tags: ['item'], } diff --git a/app/api-v3/routes/last-token.js b/app/api-v3/routes/last-token.js index 03a8570..fb8de3b 100644 --- a/app/api-v3/routes/last-token.js +++ b/app/api-v3/routes/last-token.js @@ -1,4 +1,5 @@ const logger = require('../../logger') +const { getDefaultSecurity } = require('../../util/auth') module.exports = function (apiService) { const doc = { @@ -51,7 +52,7 @@ module.exports = function (apiService) { }, }, }, - security: [{ bearerAuth: [] }], + security: getDefaultSecurity(), tags: ['system'], } diff --git a/app/api-v3/routes/members.js b/app/api-v3/routes/members.js index 15ba45e..348b998 100644 --- a/app/api-v3/routes/members.js +++ b/app/api-v3/routes/members.js @@ -1,5 +1,6 @@ const logger = require('../../logger') const { membershipReducer } = require('../../util/appUtil') +const { getDefaultSecurity } = require('../../util/auth') module.exports = function (apiService) { const doc = { @@ -47,7 +48,7 @@ module.exports = function (apiService) { }, }, }, - security: [{ bearerAuth: [] }], + security: getDefaultSecurity(), tags: ['system'], } diff --git a/app/api-v3/routes/run-process.js b/app/api-v3/routes/run-process.js index f6083e3..6c863e2 100644 --- a/app/api-v3/routes/run-process.js +++ b/app/api-v3/routes/run-process.js @@ -1,5 +1,6 @@ const logger = require('../../logger') const { validateInputIds, processRoles, processMetadata, validateProcess } = require('../../util/appUtil') +const { getDefaultSecurity } = require('../../util/auth') const { PROCESS_IDENTIFIER_LENGTH } = require('../../env') module.exports = function (apiService) { @@ -169,7 +170,7 @@ module.exports = function (apiService) { }, }, }, - security: [{ bearerAuth: [] }], + security: getDefaultSecurity(), tags: ['system'], } diff --git a/app/env.js b/app/env.js index 0cb5dcd..e5faa49 100644 --- a/app/env.js +++ b/app/env.js @@ -9,7 +9,22 @@ if (process.env.NODE_ENV === 'test') { dotenv.config({ path: '.env' }) } +const AUTH_ENVS = { + NONE: {}, + JWT: { + AUTH_JWKS_URI: envalid.url({ devDefault: 'https://inteli.eu.auth0.com/.well-known/jwks.json' }), + AUTH_AUDIENCE: envalid.str({ devDefault: 'inteli-dev' }), + AUTH_ISSUER: envalid.url({ devDefault: 'https://inteli.eu.auth0.com/' }), + AUTH_TOKEN_URL: envalid.url({ devDefault: 'https://inteli.eu.auth0.com/oauth/token' }), + }, +} + +const { AUTH_TYPE } = envalid.cleanEnv(process.env, { + AUTH_TYPE: envalid.str({ default: 'NONE', choices: ['NONE', 'JWT'] }), +}) + const vars = envalid.cleanEnv(process.env, { + ...AUTH_ENVS[AUTH_TYPE], PORT: envalid.port({ default: 3001 }), API_HOST: envalid.host({ devDefault: 'localhost' }), API_PORT: envalid.port({ default: 9944 }), @@ -17,10 +32,6 @@ const vars = envalid.cleanEnv(process.env, { USER_URI: envalid.str({ devDefault: '//Alice' }), IPFS_HOST: envalid.host({ devDefault: 'localhost' }), IPFS_PORT: envalid.port({ devDefault: 5001, default: 15001 }), - AUTH_JWKS_URI: envalid.url({ devDefault: 'https://inteli.eu.auth0.com/.well-known/jwks.json' }), - AUTH_AUDIENCE: envalid.str({ devDefault: 'inteli-dev' }), - AUTH_ISSUER: envalid.url({ devDefault: 'https://inteli.eu.auth0.com/' }), - AUTH_TOKEN_URL: envalid.url({ devDefault: 'https://inteli.eu.auth0.com/oauth/token' }), METADATA_KEY_LENGTH: envalid.num({ default: 32 }), METADATA_VALUE_LITERAL_LENGTH: envalid.num({ default: 32 }), PROCESS_IDENTIFIER_LENGTH: envalid.num({ default: 32 }), @@ -36,4 +47,5 @@ const vars = envalid.cleanEnv(process.env, { module.exports = { ...vars, + AUTH_TYPE, } diff --git a/app/server.js b/app/server.js index 2171c73..6fa74e8 100644 --- a/app/server.js +++ b/app/server.js @@ -7,13 +7,13 @@ const multer = require('multer') const path = require('path') const bodyParser = require('body-parser') const compression = require('compression') -const { PORT, API_VERSION, API_MAJOR_VERSION } = require('./env') +const { PORT, API_VERSION, API_MAJOR_VERSION, AUTH_TYPE } = require('./env') const logger = require('./logger') const apiDoc = require('./api-v3/api-doc') const apiService = require('./api-v3/services/apiService') const { startStatusHandlers } = require('./serviceStatus') const { serviceState } = require('./util/statusPoll') -const { verifyJwks } = require('./util/appUtil') +const { verifyJwks } = require('./util/auth') async function createHttpServer() { const requestLogger = pinoHttp({ logger }) @@ -57,6 +57,15 @@ async function createHttpServer() { }) const multerStorage = multer.diskStorage({}) + const securityHandlers = + AUTH_TYPE === 'JWT' + ? { + bearerAuth: (req) => { + return verifyJwks(req.headers['authorization']) + }, + } + : {} + initialize({ app, apiDoc: apiDoc, @@ -68,11 +77,7 @@ async function createHttpServer() { }) }, }, - securityHandlers: { - bearerAuth: (req) => { - return verifyJwks(req.headers['authorization']) - }, - }, + securityHandlers: securityHandlers, dependencies: { apiService: apiService, }, diff --git a/app/util/appUtil.js b/app/util/appUtil.js index 9f83d80..9cc0c08 100644 --- a/app/util/appUtil.js +++ b/app/util/appUtil.js @@ -5,8 +5,7 @@ const BASE58 = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' const bs58 = require('base-x')(BASE58) const fetch = require('node-fetch') const FormData = require('form-data') -const jwksRsa = require('jwks-rsa') -const jwt = require('jsonwebtoken') + const { types: { Role: { _enum: rolesEnum }, @@ -20,9 +19,6 @@ const { METADATA_KEY_LENGTH, METADATA_VALUE_LITERAL_LENGTH, MAX_METADATA_COUNT, - AUTH_AUDIENCE, - AUTH_JWKS_URI, - AUTH_ISSUER, PROCESS_IDENTIFIER_LENGTH, } = require('../env') const logger = require('../logger') @@ -456,49 +452,6 @@ const getMetadataResponse = async (tokenId, metadataKey, res) => { return } -const client = jwksRsa({ - cache: true, - rateLimit: true, - jwksRequestsPerMinute: 5, - jwksUri: AUTH_JWKS_URI, -}) - -async function getKey(header, cb) { - client.getSigningKey(header.kid, (err, key) => { - if (err) { - logger.warn(`An error occurred getting jwks key ${err}`) - cb(err, null) - } else if (key) { - const signingKey = key.publicKey || key.rsaPublicKey - cb(null, signingKey) - } - }) -} - -const verifyJwks = async (authHeader) => { - const authToken = authHeader ? authHeader.replace('Bearer ', '') : '' - - const verifyOptions = { - audience: AUTH_AUDIENCE, - issuer: [AUTH_ISSUER], - algorithms: ['RS256'], - header: authToken, - } - - return new Promise((resolve, reject) => { - jwt.verify(authToken, getKey, verifyOptions, (err, decoded) => { - if (err) { - resolve(false) - } else if (decoded) { - resolve(true) - } else { - logger.warn(`Error verifying jwks`) - reject({ message: 'An error occurred during jwks verification' }) - } - }) - }) -} - module.exports = { runProcess, getMembers, @@ -517,6 +470,5 @@ module.exports = { rolesEnum, containsInvalidMembershipRoles, getMetadataResponse, - verifyJwks, validateProcess, } diff --git a/app/util/auth.js b/app/util/auth.js new file mode 100644 index 0000000..2146174 --- /dev/null +++ b/app/util/auth.js @@ -0,0 +1,64 @@ +const jwksRsa = require('jwks-rsa') +const jwt = require('jsonwebtoken') + +const { AUTH_JWKS_URI, AUTH_AUDIENCE, AUTH_ISSUER, AUTH_TYPE } = require('../env') +const logger = require('../logger') + +const client = jwksRsa({ + cache: true, + rateLimit: true, + jwksRequestsPerMinute: 5, + jwksUri: AUTH_JWKS_URI, +}) + +async function getKey(header, cb) { + client.getSigningKey(header.kid, (err, key) => { + if (err) { + logger.warn(`An error occurred getting jwks key ${err}`) + cb(err, null) + } else if (key) { + const signingKey = key.publicKey || key.rsaPublicKey + cb(null, signingKey) + } + }) +} + +const verifyJwks = async (authHeader) => { + const authToken = authHeader ? authHeader.replace('Bearer ', '') : '' + + const verifyOptions = { + audience: AUTH_AUDIENCE, + issuer: [AUTH_ISSUER], + algorithms: ['RS256'], + header: authToken, + } + + return new Promise((resolve, reject) => { + jwt.verify(authToken, getKey, verifyOptions, (err, decoded) => { + if (err) { + resolve(false) + } else if (decoded) { + resolve(true) + } else { + logger.warn(`Error verifying jwks`) + reject({ message: 'An error occurred during jwks verification' }) + } + }) + }) +} + +const getDefaultSecurity = () => { + switch (AUTH_TYPE) { + case 'NONE': + return [] + case 'JWT': + return [{ bearerAuth: [] }] + default: + return [] + } +} + +module.exports = { + verifyJwks, + getDefaultSecurity, +} diff --git a/helm/dscp-api/Chart.yaml b/helm/dscp-api/Chart.yaml index 05b2111..7419964 100644 --- a/helm/dscp-api/Chart.yaml +++ b/helm/dscp-api/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v2 name: dscp-api -appVersion: '4.1.0' +appVersion: '4.2.0' description: A Helm chart for dscp-api -version: '4.1.0' +version: '4.2.0' type: application dependencies: - name: dscp-node diff --git a/helm/dscp-api/templates/configmap.yaml b/helm/dscp-api/templates/configmap.yaml index a3c2aed..df0e872 100644 --- a/helm/dscp-api/templates/configmap.yaml +++ b/helm/dscp-api/templates/configmap.yaml @@ -18,11 +18,14 @@ data: {{- else if .Values.dscpIpfs.enabled }} ipfsPort: {{ template "dscp-ipfs.ipfsApiPort" .Subcharts.dscpIpfs }} {{- end }} + {{- if eq .Values.config.auth.type "JWT" }} authJwksUri: {{ .Values.config.auth.jwksUri }} authAudience: {{ .Values.config.auth.audience }} authIssuer: {{ .Values.config.auth.issuer }} authTokenUrl: {{ .Values.config.auth.tokenUrl }} + {{- end }} substrateStatusPollPeriodMs: {{ .Values.config.substrateStatusPollPeriodMs | quote }} substrateStatusTimeoutMs: {{ .Values.config.substrateStatusTimeoutMs | quote }} ipfsStatusPollPeriodMs: {{ .Values.config.ipfsStatusPollPeriodMs | quote }} ipfsStatusTimeoutMs: {{ .Values.config.ipfsStatusTimeoutMs | quote }} + authType: {{ .Values.config.auth.type }} diff --git a/helm/dscp-api/templates/deployment.yaml b/helm/dscp-api/templates/deployment.yaml index 7ad0f5d..a0c5037 100644 --- a/helm/dscp-api/templates/deployment.yaml +++ b/helm/dscp-api/templates/deployment.yaml @@ -50,26 +50,6 @@ spec: configMapKeyRef: name: {{ include "dscp-api.fullname" . }}-config key: ipfsPort - - name: AUTH_JWKS_URI - valueFrom: - configMapKeyRef: - name: {{ include "dscp-api.fullname" . }}-config - key: authJwksUri - - name: AUTH_AUDIENCE - valueFrom: - configMapKeyRef: - name: {{ include "dscp-api.fullname" . }}-config - key: authAudience - - name: AUTH_ISSUER - valueFrom: - configMapKeyRef: - name: {{ include "dscp-api.fullname" . }}-config - key: authIssuer - - name: AUTH_TOKEN_URL - valueFrom: - configMapKeyRef: - name: {{ include "dscp-api.fullname" . }}-config - key: authTokenUrl - name: SUBSTRATE_STATUS_POLL_PERIOD_MS valueFrom: configMapKeyRef: @@ -90,11 +70,38 @@ spec: configMapKeyRef: name: {{ include "dscp-api.fullname" . }}-config key: ipfsStatusTimeoutMs + - name: AUTH_TYPE + valueFrom: + configMapKeyRef: + name: {{ include "dscp-api.fullname" . }}-config + key: authType - name: USER_URI valueFrom: secretKeyRef: name: {{ include "dscp-api.fullname" . }}-secret key: accountKey + {{- if eq .Values.config.auth.type "JWT" }} + - name: AUTH_JWKS_URI + valueFrom: + configMapKeyRef: + name: {{ include "dscp-api.fullname" . }}-config + key: authJwksUri + - name: AUTH_AUDIENCE + valueFrom: + configMapKeyRef: + name: {{ include "dscp-api.fullname" . }}-config + key: authAudience + - name: AUTH_ISSUER + valueFrom: + configMapKeyRef: + name: {{ include "dscp-api.fullname" . }}-config + key: authIssuer + - name: AUTH_TOKEN_URL + valueFrom: + configMapKeyRef: + name: {{ include "dscp-api.fullname" . }}-config + key: authTokenUrl + {{- end }} ports: - containerPort: {{ .Values.config.port }} name: http diff --git a/helm/dscp-api/values.yaml b/helm/dscp-api/values.yaml index bbc4c1f..225d2ca 100644 --- a/helm/dscp-api/values.yaml +++ b/helm/dscp-api/values.yaml @@ -12,6 +12,7 @@ config: ipfsStatusPollPeriodMs: 10000 ipfsStatusTimeoutMs: 2000 auth: + type: NONE jwksUri: https://inteli.eu.auth0.com/.well-known/jwks.json audience: inteli-dev issuer: https://inteli.eu.auth0.com/ @@ -28,7 +29,7 @@ replicaCount: 1 image: repository: ghcr.io/digicatapult/dscp-api pullPolicy: IfNotPresent - tag: 'v4.1.0' + tag: 'v4.2.0' dscpNode: enabled: false diff --git a/package-lock.json b/package-lock.json index 93c0205..401d9df 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "dscp-api", - "version": "4.1.0", + "version": "4.2.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "dscp-api", - "version": "4.1.0", + "version": "4.2.0", "license": "Apache-2.0", "dependencies": { - "@digicatapult/dscp-node": "^3.0.1", + "@digicatapult/dscp-node": "^3.6.0", "base-x": "^3.0.8", "body-parser": "^1.19.0", "compression": "^1.7.4", @@ -531,10 +531,10 @@ } }, "node_modules/@digicatapult/dscp-node": { - "version": "3.0.1", - "resolved": "https://npm.pkg.github.com/download/@digicatapult/dscp-node/3.0.1/379a28768ab59d9720baf704b74cc95a63b35a93cc701e38ef047ef23f8760b4", - "integrity": "sha512-HgEZZmLiR8lRWTexP85fbziAy6nJMFE//RKm3be5Klh5Gx5ZyBQfNSNN7sa2SnmRl40MvZODR8c7u/GjnRMmZA==", - "license": "ISC", + "version": "3.6.0", + "resolved": "https://npm.pkg.github.com/download/@digicatapult/dscp-node/3.6.0/2ddceea9b247c1ff340ad051cfc5601a1d476ac023d857b1b1efb8725d3dbee6", + "integrity": "sha512-hllmjFLbwGUz3JLhNyjoT52Ct4LT7fFAPXXvYBAJFty0JgKq+jKzMmmpXrbqH6JIuPutMCXXpVFNBa/GPo8k+A==", + "license": "Apache-2.0", "dependencies": { "@polkadot/api": "^5.9.1" } @@ -7401,9 +7401,9 @@ } }, "@digicatapult/dscp-node": { - "version": "3.0.1", - "resolved": "https://npm.pkg.github.com/download/@digicatapult/dscp-node/3.0.1/379a28768ab59d9720baf704b74cc95a63b35a93cc701e38ef047ef23f8760b4", - "integrity": "sha512-HgEZZmLiR8lRWTexP85fbziAy6nJMFE//RKm3be5Klh5Gx5ZyBQfNSNN7sa2SnmRl40MvZODR8c7u/GjnRMmZA==", + "version": "3.6.0", + "resolved": "https://npm.pkg.github.com/download/@digicatapult/dscp-node/3.6.0/2ddceea9b247c1ff340ad051cfc5601a1d476ac023d857b1b1efb8725d3dbee6", + "integrity": "sha512-hllmjFLbwGUz3JLhNyjoT52Ct4LT7fFAPXXvYBAJFty0JgKq+jKzMmmpXrbqH6JIuPutMCXXpVFNBa/GPo8k+A==", "requires": { "@polkadot/api": "^5.9.1" } diff --git a/package.json b/package.json index 30f315e..5452db6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dscp-api", - "version": "4.1.0", + "version": "4.2.0", "description": "DSCP API", "repository": { "type": "git", @@ -27,7 +27,7 @@ "coverage": "LOG_LEVEL=fatal NODE_ENV=development nyc mocha --recursive ./test/integration --timeout 60000 --slow 20000 --exit" }, "dependencies": { - "@digicatapult/dscp-node": "^3.0.1", + "@digicatapult/dscp-node": "^3.6.0", "base-x": "^3.0.8", "body-parser": "^1.19.0", "compression": "^1.7.4", diff --git a/test/test.env b/test/test.env index eb74d9c..9299359 100644 --- a/test/test.env +++ b/test/test.env @@ -9,4 +9,5 @@ IPFS_PORT=5001 AUTH_TOKEN_URL=https://mock-auth-service AUTH_JWKS_URI=https://mock-auth-service/.well-known/jwks.json AUTH_AUDIENCE=mock-audience -AUTH_ISSUER=https://mock-auth-service \ No newline at end of file +AUTH_ISSUER=https://mock-auth-service +AUTH_TYPE=JWT \ No newline at end of file