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 Aug 20, 2021
1 parent 57afe15 commit b8d7d62
Show file tree
Hide file tree
Showing 21 changed files with 10,255 additions and 89 deletions.
110 changes: 109 additions & 1 deletion packages/cactus-core-api/src/main/json/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,21 @@
}
},
"GetKeychainEntryRequest": {
"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
}
}
},
"DeleteKeychainEntryRequest": {
"type": "object",
"required": [
"key"
Expand Down Expand Up @@ -586,7 +601,7 @@
"properties": {
"key": {
"type": "string",
"description": "The key for the entry to set on the keychain.",
"description": "The key for the entry to check on the keychain.",
"minLength": 1,
"maxLength": 1024,
"nullable": false
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 set 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,14 +258,40 @@ export enum Constants {
SocketIoConnectionPathV1 = '/api/v1/async/socket-io/connect'
}

/**
*
* @export
* @interface DeleteKeychainEntryRequest
*/
export interface DeleteKeychainEntryRequest {
/**
* The key for the entry to get 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
* @interface GetKeychainEntryRequest
*/
export interface GetKeychainEntryRequest {
/**
* The key for the entry to get from the keychain.
* The key for the entry to delete from the keychain.
* @type {string}
* @memberof GetKeychainEntryRequest
*/
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 set on the keychain.
* @type {string}
* @memberof HasKeychainEntryRequest
*/
key: string;
}
/**
*
* @export
Expand Down Expand Up @@ -506,7 +545,7 @@ export interface PluginInstance {
*/
export interface SetKeychainEntryRequest {
/**
* The key for the entry to set on the keychain.
* The key for the entry to check on the keychain.
* @type {string}
* @memberof SetKeychainEntryRequest
*/
Expand Down
Loading

0 comments on commit b8d7d62

Please sign in to comment.