Skip to content

Commit

Permalink
Feature/mowdev 5099 jws signing (#409)
Browse files Browse the repository at this point in the history
* added the JWS signing feature

* fixed config

* linting fixes

* added unit tests

* added error message

* bumped up the version

* added default private key

* audit fix

* audit fix

* added coverage test

* added coverage test

* fixed the intergrationg and fucntional tests

* audit fix

* not modify request in jwsSigner

* not modify request in jwsSigner

* updage packages

* disable jws by default

* fixed dockerfile

* fixed coverage tests

Co-authored-by: Shashi <[email protected]>
  • Loading branch information
shashi165 and Shashi authored May 19, 2020
1 parent c595702 commit 9698981
Show file tree
Hide file tree
Showing 14 changed files with 1,301 additions and 891 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ RUN npm install

COPY src /opt/ml-api-adapter/src
COPY config /opt/ml-api-adapter/config
COPY secrets /opt/ml-api-adapter/secrets

FROM node:12.16.0-alpine

Expand Down
8 changes: 4 additions & 4 deletions audit-resolve.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@
},
"1179|faucet>minimist": {
"decision": "ignore",
"madeAt": 1588343035169,
"expiresAt": 1588947816746
"madeAt": 1589294375966,
"expiresAt": 1591886352434
},
"1500|npm-audit-resolver>audit-resolve-core>yargs-parser": {
"decision": "ignore",
"madeAt": 1588343045019,
"expiresAt": 1588947816746
"madeAt": 1589294387969,
"expiresAt": 1591886352434
}
},
"rules": {},
Expand Down
5 changes: 5 additions & 0 deletions config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
"ENDPOINT_SECURITY":{
"TLS": {
"rejectUnauthorized": true
},
"JWS": {
"JWS_SIGN": false,
"FSPIOP_SOURCE_TO_SIGN": "switch",
"JWS_SIGNING_KEY_PATH": "secrets/jwsSigningKey.key"
}
},
"MAX_CALLBACK_TIME_LAG_DILATION_MILLISECONDS": 200,
Expand Down
5 changes: 5 additions & 0 deletions docker/ml-api-adapter/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
"ENDPOINT_SECURITY": {
"TLS": {
"rejectUnauthorized": true
},
"JWS": {
"JWS_SIGN": false,
"FSPIOP_SOURCE_TO_SIGN": "switch",
"JWS_SIGNING_KEY_PATH": "secrets/jwsSigningKey.key"
}
},
"MAX_CALLBACK_TIME_LAG_DILATION_MILLISECONDS": 200,
Expand Down
Loading

0 comments on commit 9698981

Please sign in to comment.