Skip to content

Commit 1ea7775

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 63e639e commit 1ea7775

File tree

21 files changed

+10215
-885
lines changed

21 files changed

+10215
-885
lines changed

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

+71-71
Original file line numberDiff line numberDiff line change
@@ -522,46 +522,38 @@
522522
}
523523
}
524524
},
525-
"GetKeychainEntryRequest": {
525+
"GetKeychainEntryRequestV1": {
526526
"type": "object",
527527
"required": [
528528
"key"
529529
],
530530
"properties": {
531531
"key": {
532532
"type": "string",
533-
"description": "The key for the entry to get from the keychain.",
533+
"description": "The key for the entry to delete from the keychain.",
534534
"minLength": 1,
535535
"maxLength": 1024,
536536
"nullable": false
537537
}
538538
}
539539
},
540-
"GetKeychainEntryResponse": {
540+
"DeleteKeychainEntryRequestV1": {
541541
"type": "object",
542542
"required": [
543-
"key",
544-
"value"
543+
"key"
545544
],
546545
"additionalProperties": false,
547546
"properties": {
548547
"key": {
549548
"type": "string",
550-
"description": "The key that was used to retrieve the value from the keychain.",
549+
"description": "The key for the entry to get from the keychain.",
551550
"minLength": 1,
552551
"maxLength": 1024,
553552
"nullable": false
554-
},
555-
"value": {
556-
"type": "string",
557-
"description": "The value associated with the requested key on the keychain.",
558-
"minLength": 0,
559-
"maxLength": 10485760,
560-
"nullable": false
561553
}
562554
}
563555
},
564-
"SetKeychainEntryRequest": {
556+
"GetKeychainEntryResponseV1": {
565557
"type": "object",
566558
"required": [
567559
"key",
@@ -571,51 +563,44 @@
571563
"properties": {
572564
"key": {
573565
"type": "string",
574-
"description": "The key for the entry to set on the keychain.",
566+
"description": "The key that was used to retrieve the value from the keychain.",
575567
"minLength": 1,
576568
"maxLength": 1024,
577569
"nullable": false
578570
},
579571
"value": {
580572
"type": "string",
581-
"description": "The value that will be associated with the key on the keychain.",
573+
"description": "The value associated with the requested key on the keychain.",
582574
"minLength": 0,
583575
"maxLength": 10485760,
584576
"nullable": false
585577
}
586578
}
587579
},
588-
"SetKeychainEntryResponse": {
580+
"SetKeychainEntryRequestV1": {
589581
"type": "object",
590582
"required": [
591-
"key"
583+
"key",
584+
"value"
592585
],
593586
"properties": {
594587
"key": {
595588
"type": "string",
596-
"description": "The key that was used to set the value on the keychain.",
589+
"description": "The key for the entry to check on the keychain.",
597590
"minLength": 1,
598591
"maxLength": 1024,
599592
"nullable": false
600-
}
601-
}
602-
},
603-
"DeleteKeychainEntryRequestV1": {
604-
"type": "object",
605-
"required": [
606-
"key"
607-
],
608-
"properties": {
609-
"key": {
593+
},
594+
"value": {
610595
"type": "string",
611-
"description": "The key for the entry to check the presence of on the keychain.",
612-
"minLength": 1,
613-
"maxLength": 1024,
596+
"description": "The value that will be associated with the key on the keychain.",
597+
"minLength": 0,
598+
"maxLength": 10485760,
614599
"nullable": false
615600
}
616601
}
617602
},
618-
"DeleteKeychainEntryResponseV1": {
603+
"SetKeychainEntryResponseV1": {
619604
"type": "object",
620605
"required": [
621606
"key"
@@ -624,13 +609,13 @@
624609
"properties": {
625610
"key": {
626611
"type": "string",
627-
"description": "The key that was deleted from the keychain.",
612+
"description": "The key that was used to set the value on the keychain.",
628613
"minLength": 1,
629614
"maxLength": 1024,
630615
"nullable": false
631616
}
632617
}
633-
},
618+
},
634619
"HasKeychainEntryRequestV1": {
635620
"type": "object",
636621
"required": [
@@ -640,7 +625,7 @@
640625
"properties": {
641626
"key": {
642627
"type": "string",
643-
"description": "The key to check for presence in the keychain.",
628+
"description": "The key to check for presence in the keychain",
644629
"minLength": 1,
645630
"maxLength": 1024,
646631
"nullable": false
@@ -669,6 +654,21 @@
669654
"nullable": false
670655
}
671656
}
657+
},
658+
"DeleteKeychainEntryResponseV1": {
659+
"type": "object",
660+
"required": [
661+
"key"
662+
],
663+
"properties": {
664+
"key": {
665+
"type": "string",
666+
"description": "The key that was deleted from the keychain.",
667+
"minLength": 1,
668+
"maxLength": 1024,
669+
"nullable": false
670+
}
671+
}
672672
}
673673
},
674674
"requestBodies": {
@@ -711,7 +711,7 @@
711711
"content": {
712712
"application/json": {
713713
"schema": {
714-
"$ref": "#/components/schemas/GetKeychainEntryRequest"
714+
"$ref": "#/components/schemas/GetKeychainEntryRequestV1"
715715
}
716716
}
717717
}
@@ -722,29 +722,29 @@
722722
"content": {
723723
"application/json": {
724724
"schema": {
725-
"$ref": "#/components/schemas/SetKeychainEntryRequest"
725+
"$ref": "#/components/schemas/SetKeychainEntryRequestV1"
726726
}
727727
}
728728
}
729-
},
730-
"keychain_has_entry_request_body": {
731-
"description": "Request body for checking a keychain entry via its key",
729+
},
730+
"keychain_delete_entry_request_body": {
731+
"description": "Request body to delete a keychain entry via its key",
732732
"required": true,
733733
"content": {
734734
"application/json": {
735735
"schema": {
736-
"$ref": "#/components/schemas/HasKeychainEntryRequestV1"
736+
"$ref": "#/components/schemas/DeleteKeychainEntryRequestV1"
737737
}
738738
}
739739
}
740-
},
741-
"keychain_delete_entry_request_body": {
742-
"description": "Request body to delete a keychain entry via its key",
740+
},
741+
"keychain_has_entry_request_body": {
742+
"description": "Request body for checking a keychain entry via its key",
743743
"required": true,
744744
"content": {
745745
"application/json": {
746746
"schema": {
747-
"$ref": "#/components/schemas/DeleteKeychainEntryRequestV1"
747+
"$ref": "#/components/schemas/HasKeychainEntryRequestV1"
748748
}
749749
}
750750
}
@@ -784,11 +784,11 @@
784784
"keychain_get_entry_200": {
785785
"description": "OK",
786786
"content": {
787-
"application/json": {
788-
"schema": {
789-
"$ref": "#/components/schemas/GetKeychainEntryResponse"
790-
}
791-
}
787+
"application/json": {
788+
"schema": {
789+
"$ref": "#/components/schemas/GetKeychainEntryResponseV1"
790+
}
791+
}
792792
}
793793
},
794794
"keychain_get_entry_400": {
@@ -807,9 +807,9 @@
807807
"description": "OK",
808808
"content": {
809809
"application/json": {
810-
"schema": {
811-
"$ref": "#/components/schemas/SetKeychainEntryResponse"
812-
}
810+
"schema": {
811+
"$ref": "#/components/schemas/SetKeychainEntryResponseV1"
812+
}
813813
}
814814
}
815815
},
@@ -822,42 +822,42 @@
822822
"keychain_set_entry_500": {
823823
"description": "Unexpected error."
824824
},
825-
"keychain_has_entry_200": {
825+
"keychain_delete_entry_200": {
826826
"description": "OK",
827827
"content": {
828828
"application/json": {
829-
"schema": {
830-
"$ref": "#/components/schemas/HasKeychainEntryResponseV1"
831-
}
829+
"schema": {
830+
"$ref": "#/components/schemas/DeleteKeychainEntryResponseV1"
831+
}
832832
}
833-
}
833+
}
834834
},
835-
"keychain_has_entry_400": {
835+
"keychain_delete_entry_400": {
836836
"description": "Bad request. Key must be a string and longer than 0, shorter than 1024 characters."
837837
},
838-
"keychain_has_entry_401": {
838+
"keychain_delete_entry_401": {
839839
"description": "Authorization information is missing or invalid."
840840
},
841-
"keychain_has_entry_500": {
841+
"keychain_delete_entry_500": {
842842
"description": "Unexpected error."
843-
},
844-
"keychain_delete_entry_200": {
843+
},
844+
"keychain_has_entry_200": {
845845
"description": "OK",
846846
"content": {
847847
"application/json": {
848-
"schema": {
849-
"$ref": "#/components/schemas/DeleteKeychainEntryResponseV1"
850-
}
848+
"schema": {
849+
"$ref": "#/components/schemas/HasKeychainEntryResponseV1"
850+
}
851851
}
852-
}
852+
}
853853
},
854-
"keychain_delete_entry_400": {
854+
"keychain_has_entry_400": {
855855
"description": "Bad request. Key must be a string and longer than 0, shorter than 1024 characters."
856856
},
857-
"keychain_delete_entry_401": {
857+
"keychain_has_entry_401": {
858858
"description": "Authorization information is missing or invalid."
859859
},
860-
"keychain_delete_entry_500": {
860+
"keychain_has_entry_500": {
861861
"description": "Unexpected error."
862862
}
863863
}

0 commit comments

Comments
 (0)