Skip to content

Commit 455b47d

Browse files
committed
feat(keychain-aws-sm): complete request handler and endpoint
Fixes hyperledger-cacti#967 Signed-off-by: Youngone Lee <[email protected]>
1 parent a0a08eb commit 455b47d

File tree

18 files changed

+10200
-86
lines changed

18 files changed

+10200
-86
lines changed

packages/cactus-core-api/src/main/json/openapi.json

+109-1
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,21 @@
540540
}
541541
},
542542
"GetKeychainEntryRequest": {
543+
"type": "object",
544+
"required": [
545+
"key"
546+
],
547+
"properties": {
548+
"key": {
549+
"type": "string",
550+
"description": "The key for the entry to delete from the keychain.",
551+
"minLength": 1,
552+
"maxLength": 1024,
553+
"nullable": false
554+
}
555+
}
556+
},
557+
"DeleteKeychainEntryRequest": {
543558
"type": "object",
544559
"required": [
545560
"key"
@@ -586,7 +601,7 @@
586601
"properties": {
587602
"key": {
588603
"type": "string",
589-
"description": "The key for the entry to set on the keychain.",
604+
"description": "The key for the entry to check on the keychain.",
590605
"minLength": 1,
591606
"maxLength": 1024,
592607
"nullable": false
@@ -614,6 +629,39 @@
614629
"nullable": false
615630
}
616631
}
632+
},
633+
"HasKeychainEntryRequest": {
634+
"type": "object",
635+
"required": [
636+
"key"
637+
],
638+
"properties": {
639+
"key": {
640+
"type": "string",
641+
"description": "The key for the entry to set on the keychain.",
642+
"minLength": 1,
643+
"maxLength": 1024,
644+
"nullable": false
645+
}
646+
}
647+
},
648+
"HasKeychainEntryResponse": {
649+
"type": "boolean"
650+
},
651+
"DeleteKeychainEntryResponse": {
652+
"type": "object",
653+
"required": [
654+
"key"
655+
],
656+
"properties": {
657+
"key": {
658+
"type": "string",
659+
"description": "The key of the entry that was deleted.",
660+
"minLength": 1,
661+
"maxLength": 1024,
662+
"nullable": false
663+
}
664+
}
617665
}
618666
},
619667
"requestBodies": {
@@ -671,6 +719,28 @@
671719
}
672720
}
673721
}
722+
},
723+
"keychain_delete_entry_request_body": {
724+
"description": "Request body to delete a keychain entry via its key",
725+
"required": true,
726+
"content": {
727+
"application/json": {
728+
"schema": {
729+
"$ref": "#/components/schemas/DeleteKeychainEntryRequest"
730+
}
731+
}
732+
}
733+
},
734+
"keychain_has_entry_request_body": {
735+
"description": "Request body for checking a keychain entry via its key",
736+
"required": true,
737+
"content": {
738+
"application/json": {
739+
"schema": {
740+
"$ref": "#/components/schemas/HasKeychainEntryRequest"
741+
}
742+
}
743+
}
674744
}
675745
},
676746
"responses": {
@@ -744,6 +814,44 @@
744814
},
745815
"keychain_set_entry_500": {
746816
"description": "Unexpected error."
817+
},
818+
"keychain_delete_entry_200": {
819+
"description": "OK",
820+
"content": {
821+
"application/json": {
822+
"schema": {
823+
"$ref": "#/components/schemas/DeleteKeychainEntryResponse"
824+
}
825+
}
826+
}
827+
},
828+
"keychain_delete_entry_400": {
829+
"description": "Bad request. Key must be a string and longer than 0, shorter than 1024 characters."
830+
},
831+
"keychain_delete_entry_401": {
832+
"description": "Authorization information is missing or invalid."
833+
},
834+
"keychain_delete_entry_500": {
835+
"description": "Unexpected error."
836+
},
837+
"keychain_has_entry_200": {
838+
"description": "OK",
839+
"content": {
840+
"application/json": {
841+
"schema": {
842+
"$ref": "#/components/schemas/HasKeychainEntryResponse"
843+
}
844+
}
845+
}
846+
},
847+
"keychain_has_entry_400": {
848+
"description": "Bad request. Key must be a string and longer than 0, shorter than 1024 characters."
849+
},
850+
"keychain_has_entry_401": {
851+
"description": "Authorization information is missing or invalid."
852+
},
853+
"keychain_has_entry_500": {
854+
"description": "Unexpected error."
747855
}
748856
}
749857
},

packages/cactus-core-api/src/main/typescript/generated/openapi/typescript-axios/api.ts

+41-2
Original file line numberDiff line numberDiff line change
@@ -258,14 +258,40 @@ export enum Constants {
258258
SocketIoConnectionPathV1 = '/api/v1/async/socket-io/connect'
259259
}
260260

261+
/**
262+
*
263+
* @export
264+
* @interface DeleteKeychainEntryRequest
265+
*/
266+
export interface DeleteKeychainEntryRequest {
267+
/**
268+
* The key for the entry to get from the keychain.
269+
* @type {string}
270+
* @memberof DeleteKeychainEntryRequest
271+
*/
272+
key: string;
273+
}
274+
/**
275+
*
276+
* @export
277+
* @interface DeleteKeychainEntryResponse
278+
*/
279+
export interface DeleteKeychainEntryResponse {
280+
/**
281+
* The key of the entry that was deleted.
282+
* @type {string}
283+
* @memberof DeleteKeychainEntryResponse
284+
*/
285+
key: string;
286+
}
261287
/**
262288
*
263289
* @export
264290
* @interface GetKeychainEntryRequest
265291
*/
266292
export interface GetKeychainEntryRequest {
267293
/**
268-
* The key for the entry to get from the keychain.
294+
* The key for the entry to delete from the keychain.
269295
* @type {string}
270296
* @memberof GetKeychainEntryRequest
271297
*/
@@ -322,6 +348,19 @@ export interface GetObjectResponseV1 {
322348
*/
323349
value: string;
324350
}
351+
/**
352+
*
353+
* @export
354+
* @interface HasKeychainEntryRequest
355+
*/
356+
export interface HasKeychainEntryRequest {
357+
/**
358+
* The key for the entry to set on the keychain.
359+
* @type {string}
360+
* @memberof HasKeychainEntryRequest
361+
*/
362+
key: string;
363+
}
325364
/**
326365
*
327366
* @export
@@ -506,7 +545,7 @@ export interface PluginInstance {
506545
*/
507546
export interface SetKeychainEntryRequest {
508547
/**
509-
* The key for the entry to set on the keychain.
548+
* The key for the entry to check on the keychain.
510549
* @type {string}
511550
* @memberof SetKeychainEntryRequest
512551
*/

0 commit comments

Comments
 (0)