Skip to content

Commit 4f99fc3

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 539a801 commit 4f99fc3

File tree

32 files changed

+11791
-21
lines changed

32 files changed

+11791
-21
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

+52
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,32 @@ 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 that was used to set the value on the keychain.
282+
* @type {string}
283+
* @memberof DeleteKeychainEntryResponse
284+
*/
285+
key: string;
286+
}
261287
/**
262288
*
263289
* @export
@@ -290,6 +316,32 @@ export interface GetKeychainEntryResponse {
290316
*/
291317
value: string;
292318
}
319+
/**
320+
*
321+
* @export
322+
* @interface HasKeychainEntryRequest
323+
*/
324+
export interface HasKeychainEntryRequest {
325+
/**
326+
* The key for the entry to set on the keychain.
327+
* @type {string}
328+
* @memberof HasKeychainEntryRequest
329+
*/
330+
key: string;
331+
}
332+
/**
333+
*
334+
* @export
335+
* @interface HasKeychainEntryResponse
336+
*/
337+
export interface HasKeychainEntryResponse {
338+
/**
339+
* The key that was used to set the value on the keychain.
340+
* @type {string}
341+
* @memberof HasKeychainEntryResponse
342+
*/
343+
key: string;
344+
}
293345
/**
294346
*
295347
* @export
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# `@hyperledger/cactus-plugin-keychain-aws-sm`
2+
3+
## TO-DO

0 commit comments

Comments
 (0)