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

Signed-off-by: Youngone Lee <youngone.lee@accenture.com>
  • Loading branch information
Leeyoungone committed Jul 21, 2021
1 parent 291dd3b commit 47d8dd1
Show file tree
Hide file tree
Showing 32 changed files with 11,777 additions and 20 deletions.
108 changes: 108 additions & 0 deletions packages/cactus-core-api/src/main/json/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,21 @@
}
}
},
"DeleteKeychainEntryRequest": {
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The key for the entry to delete from the keychain.",
"minLength": 1,
"maxLength": 1024,
"nullable": false
}
}
},
"GetKeychainEntryResponse": {
"type": "object",
"required": [
Expand Down Expand Up @@ -614,6 +629,39 @@
"nullable": false
}
}
},
"HasKeychainEntryRequest": {
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The key for the entry to check on the keychain.",
"minLength": 1,
"maxLength": 1024,
"nullable": false
}
}
},
"HasKeychainEntryResponse": {
"type": "boolean"
},
"DeleteKeychainEntryResponse": {
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The key of the entry that was deleted.",
"minLength": 1,
"maxLength": 1024,
"nullable": false
}
}
}
},
"requestBodies": {
Expand Down Expand Up @@ -671,6 +719,28 @@
}
}
}
},
"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/DeleteKeychainEntryRequest"
}
}
}
},
"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/HasKeychainEntryRequest"
}
}
}
}
},
"responses": {
Expand Down Expand Up @@ -744,6 +814,44 @@
},
"keychain_set_entry_500": {
"description": "Unexpected error."
},
"keychain_delete_entry_200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DeleteKeychainEntryResponse"
}
}
}
},
"keychain_delete_entry_400": {
"description": "Bad request. Key must be a string and longer than 0, shorter than 1024 characters."
},
"keychain_delete_entry_401": {
"description": "Authorization information is missing or invalid."
},
"keychain_delete_entry_500": {
"description": "Unexpected error."
},
"keychain_has_entry_200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HasKeychainEntryResponse"
}
}
}
},
"keychain_has_entry_400": {
"description": "Bad request. Key must be a string and longer than 0, shorter than 1024 characters."
},
"keychain_has_entry_401": {
"description": "Authorization information is missing or invalid."
},
"keychain_has_entry_500": {
"description": "Unexpected error."
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,32 @@ export enum Constants {
SocketIoConnectionPathV1 = '/api/v1/async/socket-io/connect'
}

/**
*
* @export
* @interface DeleteKeychainEntryRequest
*/
export interface DeleteKeychainEntryRequest {
/**
* The key for the entry to delete from the keychain.
* @type {string}
* @memberof DeleteKeychainEntryRequest
*/
key: string;
}
/**
*
* @export
* @interface DeleteKeychainEntryResponse
*/
export interface DeleteKeychainEntryResponse {
/**
* The key of the entry that was deleted.
* @type {string}
* @memberof DeleteKeychainEntryResponse
*/
key: string;
}
/**
*
* @export
Expand Down Expand Up @@ -322,6 +348,19 @@ export interface GetObjectResponseV1 {
*/
value: string;
}
/**
*
* @export
* @interface HasKeychainEntryRequest
*/
export interface HasKeychainEntryRequest {
/**
* The key for the entry to check on the keychain.
* @type {string}
* @memberof HasKeychainEntryRequest
*/
key: string;
}
/**
*
* @export
Expand Down
3 changes: 3 additions & 0 deletions packages/cactus-plugin-keychain-aws-sm/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# `@hyperledger/cactus-plugin-keychain-aws-sm`

## TO-DO
Loading

0 comments on commit 47d8dd1

Please sign in to comment.