Skip to content

Commit

Permalink
feat(keychain-aws-sm): complete request handler and endpoint
Browse files Browse the repository at this point in the history
Fixes hyperledger-cacti#967
Depends on hyperledger-cacti#1349

Signed-off-by: Youngone Lee <youngone.lee@accenture.com>
  • Loading branch information
Leeyoungone committed Sep 21, 2021
1 parent 51792a9 commit 5fa0342
Show file tree
Hide file tree
Showing 19 changed files with 959 additions and 304 deletions.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
},
"scripts": {
"run-ci": "./tools/ci.sh",
"reset": "git clean -f -X && yarn run configure",
"reset:node-modules": "del-cli --dry-run '**/node_modules'",
"reset:git": "git clean -f -X",
"reset:yarn-lock": "del-cli yarn.lock && yarn install --update-checksums --force",
"reset": "run-s reset:git reset:node-modules reset:yarn-lock configure",
"configure": "yarn install --frozen-lockfile --non-interactive && yarn run build:dev:backend",
"install-yarn": "npm install --global yarn@1.19.0",
"custom-checks": "TS_NODE_PROJECT=./tools/tsconfig.json node --trace-deprecation --experimental-modules --abort-on-uncaught-exception --loader ts-node/esm --experimental-specifier-resolution=node ./tools/custom-checks/run-custom-checks.ts",
Expand Down
142 changes: 71 additions & 71 deletions packages/cactus-core-api/src/main/json/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -522,46 +522,38 @@
}
}
},
"GetKeychainEntryRequest": {
"GetKeychainEntryRequestV1": {
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The key for the entry to get from the keychain.",
"description": "The key for the entry to delete from the keychain.",
"minLength": 1,
"maxLength": 1024,
"nullable": false
}
}
},
"GetKeychainEntryResponse": {
"DeleteKeychainEntryRequestV1": {
"type": "object",
"required": [
"key",
"value"
"key"
],
"additionalProperties": false,
"properties": {
"key": {
"type": "string",
"description": "The key that was used to retrieve the value from the keychain.",
"description": "The key for the entry to get from the keychain.",
"minLength": 1,
"maxLength": 1024,
"nullable": false
},
"value": {
"type": "string",
"description": "The value associated with the requested key on the keychain.",
"minLength": 0,
"maxLength": 10485760,
"nullable": false
}
}
},
"SetKeychainEntryRequest": {
"GetKeychainEntryResponseV1": {
"type": "object",
"required": [
"key",
Expand All @@ -571,51 +563,44 @@
"properties": {
"key": {
"type": "string",
"description": "The key for the entry to set on the keychain.",
"description": "The key that was used to retrieve the value from the keychain.",
"minLength": 1,
"maxLength": 1024,
"nullable": false
},
"value": {
"type": "string",
"description": "The value that will be associated with the key on the keychain.",
"description": "The value associated with the requested key on the keychain.",
"minLength": 0,
"maxLength": 10485760,
"nullable": false
}
}
},
"SetKeychainEntryResponse": {
"SetKeychainEntryRequestV1": {
"type": "object",
"required": [
"key"
"key",
"value"
],
"properties": {
"key": {
"type": "string",
"description": "The key that was used to set the value on the keychain.",
"description": "The key for the entry to check on the keychain.",
"minLength": 1,
"maxLength": 1024,
"nullable": false
}
}
},
"DeleteKeychainEntryRequestV1": {
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
},
"value": {
"type": "string",
"description": "The key for the entry to check the presence of on the keychain.",
"minLength": 1,
"maxLength": 1024,
"description": "The value that will be associated with the key on the keychain.",
"minLength": 0,
"maxLength": 10485760,
"nullable": false
}
}
},
"DeleteKeychainEntryResponseV1": {
"SetKeychainEntryResponseV1": {
"type": "object",
"required": [
"key"
Expand All @@ -624,13 +609,13 @@
"properties": {
"key": {
"type": "string",
"description": "The key that was deleted from the keychain.",
"description": "The key that was used to set the value on the keychain.",
"minLength": 1,
"maxLength": 1024,
"nullable": false
}
}
},
},
"HasKeychainEntryRequestV1": {
"type": "object",
"required": [
Expand All @@ -640,7 +625,7 @@
"properties": {
"key": {
"type": "string",
"description": "The key to check for presence in the keychain.",
"description": "The key to check for presence in the keychain",
"minLength": 1,
"maxLength": 1024,
"nullable": false
Expand Down Expand Up @@ -669,6 +654,21 @@
"nullable": false
}
}
},
"DeleteKeychainEntryResponseV1": {
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The key that was deleted from the keychain.",
"minLength": 1,
"maxLength": 1024,
"nullable": false
}
}
}
},
"requestBodies": {
Expand Down Expand Up @@ -711,7 +711,7 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetKeychainEntryRequest"
"$ref": "#/components/schemas/GetKeychainEntryRequestV1"
}
}
}
Expand All @@ -722,29 +722,29 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SetKeychainEntryRequest"
"$ref": "#/components/schemas/SetKeychainEntryRequestV1"
}
}
}
},
"keychain_has_entry_request_body": {
"description": "Request body for checking a keychain entry via its key",
},
"keychain_delete_entry_request_body": {
"description": "Request body to delete a keychain entry via its key",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HasKeychainEntryRequestV1"
"$ref": "#/components/schemas/DeleteKeychainEntryRequestV1"
}
}
}
},
"keychain_delete_entry_request_body": {
"description": "Request body to delete a keychain entry via its key",
},
"keychain_has_entry_request_body": {
"description": "Request body for checking a keychain entry via its key",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DeleteKeychainEntryRequestV1"
"$ref": "#/components/schemas/HasKeychainEntryRequestV1"
}
}
}
Expand Down Expand Up @@ -784,11 +784,11 @@
"keychain_get_entry_200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetKeychainEntryResponse"
}
}
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetKeychainEntryResponseV1"
}
}
}
},
"keychain_get_entry_400": {
Expand All @@ -807,9 +807,9 @@
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SetKeychainEntryResponse"
}
"schema": {
"$ref": "#/components/schemas/SetKeychainEntryResponseV1"
}
}
}
},
Expand All @@ -822,42 +822,42 @@
"keychain_set_entry_500": {
"description": "Unexpected error."
},
"keychain_has_entry_200": {
"keychain_delete_entry_200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HasKeychainEntryResponseV1"
}
"schema": {
"$ref": "#/components/schemas/DeleteKeychainEntryResponseV1"
}
}
}
}
},
"keychain_has_entry_400": {
"keychain_delete_entry_400": {
"description": "Bad request. Key must be a string and longer than 0, shorter than 1024 characters."
},
"keychain_has_entry_401": {
"keychain_delete_entry_401": {
"description": "Authorization information is missing or invalid."
},
"keychain_has_entry_500": {
"keychain_delete_entry_500": {
"description": "Unexpected error."
},
"keychain_delete_entry_200": {
},
"keychain_has_entry_200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DeleteKeychainEntryResponseV1"
}
"schema": {
"$ref": "#/components/schemas/HasKeychainEntryResponseV1"
}
}
}
}
},
"keychain_delete_entry_400": {
"keychain_has_entry_400": {
"description": "Bad request. Key must be a string and longer than 0, shorter than 1024 characters."
},
"keychain_delete_entry_401": {
"keychain_has_entry_401": {
"description": "Authorization information is missing or invalid."
},
"keychain_delete_entry_500": {
"keychain_has_entry_500": {
"description": "Unexpected error."
}
}
Expand Down
Loading

0 comments on commit 5fa0342

Please sign in to comment.