{"id":2194,"date":"2023-04-15T19:02:17","date_gmt":"2023-04-15T10:02:17","guid":{"rendered":"https:\/\/manvscloud.com\/?p=2194"},"modified":"2023-04-15T19:02:18","modified_gmt":"2023-04-15T10:02:18","slug":"ncloud-key-management-service%eb%a5%bc-%ed%99%9c%ec%9a%a9%ed%95%9c-%eb%8d%b0%ec%9d%b4%ed%84%b0%eb%b2%a0%ec%9d%b4%ec%8a%a4-%ec%95%94%ed%98%b8%ed%99%94-%eb%b0%8f-%eb%b3%b5%ed%98%b8%ed%99%94-%ea%b0%80","status":"publish","type":"post","link":"https:\/\/manvscloud.com\/?p=2194","title":{"rendered":"[NCLOUD] Key Management Service\ub97c \ud65c\uc6a9\ud55c \ub370\uc774\ud130\ubca0\uc774\uc2a4 \uc554\ud638\ud654 \ubc0f \ubcf5\ud638\ud654 \uac00\uc774\ub4dc"},"content":{"rendered":"\n<p>\uc548\ub155\ud558\uc138\uc694. MANVSCLOUD \uae40\uc218\ud604\uc785\ub2c8\ub2e4.<\/p>\n\n\n\n<p>\ucd5c\uadfc\uc5d0 \uc554\ud638\ud654 \uc54c\uace0\ub9ac\uc998\uc5d0 \ub300\ud55c \ud3ec\uc2a4\ud305\uc744 \uc791\uc131\ud588\uc5c8\ub294\ub370\uc694. \uc554\ud638\ud654\ud558\uba74 \ub370\uc774\ud130 \uc554\ud638\ud654\uc640 \uad00\ub828\ud558\uc5ec \ud0a4 \uad00\ub9ac \uc11c\ube44\uc2a4\ub97c \ube7c\ub193\uc744 \uc218 \uc5c6\uc744 \uac83\uac19\uc2b5\ub2c8\ub2e4.<br>\uadf8\ub7ec\ubbc0\ub85c \uc624\ub298\uc740 Key Management Service\uc5d0 \ub300\ud55c \uc8fc\uc81c\ub85c \ud3ec\uc2a4\ud305\uc744 \uc9c4\ud589\ud558\uaca0\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"has-white-color has-vivid-green-cyan-background-color has-text-color has-background wp-block-heading\"> Key Management Service<\/h3>\n\n\n\n<p>Key Management Service(KMS)\ub294 \uc554\ud638\ud654 \ud0a4\ub97c \uc0dd\uc131, \uc800\uc7a5, \uad00\ub9ac, \ud0a4 \ud68c\uc804 \ubc0f \ud0a4 \ud3d0\uae30\uc640 \uac19\uc740 \ud0a4 \uc218\uba85\uc8fc\uae30 \uad00\ub9ac\ub97c \ub2f4\ub2f9\ud558\ub294 \uc11c\ube44\uc2a4\uc785\ub2c8\ub2e4. \uc774\ub97c \ud1b5\ud574 \uc0ac\uc6a9\uc790\ub294 \ubbfc\uac10\ud55c \ub370\uc774\ud130\ub97c \uc548\uc804\ud558\uac8c \uc554\ud638\ud654\ud558\uace0 \ubcf5\ud638\ud654\ud560 \uc218 \uc788\uc73c\uba70, \uad8c\ud55c\uc774 \uc788\ub294 \uc0ac\uc6a9\uc790\ub9cc \ud574\ub2f9 \ud0a4\uc5d0 \uc561\uc138\uc2a4\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. <\/p>\n\n\n\n<h4 class=\"has-vivid-red-color has-text-color wp-block-heading\">\u203b \uc8fc\uc694 \uae30\ub2a5<\/h4>\n\n\n\n<ul><li>\uac15\ub825\ud55c \uc554\ud638\ud654 \ud0a4 \uc0dd\uc131<\/li><li>\uc548\uc804\ud55c \ud0a4 \uc800\uc7a5\uc18c\uc5d0 \uc554\ud638\ud654 \ud0a4\ub97c \ubcf4\uad00<\/li><li>\uad8c\ud55c\uc774 \uc788\ub294 \uc0ac\uc6a9\uc790 \ubc0f \uc751\uc6a9 \ud504\ub85c\uadf8\ub7a8\ub9cc \uc0ac\uc6a9\ud560 \uc218 \uc788\ub3c4\ub85d \uc554\ud638\ud654 \ud0a4 \uc561\uc138\uc2a4\ub97c \uc81c\uc5b4<\/li><li>\uc815\uae30\uc801\uc73c\ub85c \ud0a4\ub97c \uc790\ub3d9\uc73c\ub85c \uad50\uccb4\ud558\uc5ec \ubcf4\uc548 \uc720\uc9c0<\/li><li>\ud544\uc694\ud558\uc9c0 \uc54a\uc740 \ud0a4\ub97c \uc548\uc804\ud558\uac8c \ud3d0\uae30<\/li><\/ul>\n\n\n\n<p>\uc554\ud638\ud654 \ud0a4 \uad00\ub9ac\uac00 \uc911\uc694\ud55c \ub370\uc774\ud130 \ubcf4\uc548 \uc694\uc18c \uc911 \ud558\ub098\uc778 \ub9cc\ud07c, Key Management Service(KMS)\ub294 \uae30\uc5c5 \ubc0f \uac1c\uc778\uc758 \ub370\uc774\ud130\ub97c \ubcf4\ud638\ud558\ub294 \ub370 \ud544\uc218\uc801\uc778 \ub3c4\uad6c\uc785\ub2c8\ub2e4.<br>KMS\ub97c \uc0ac\uc6a9\ud558\uba74 \uc554\ud638\ud654 \ud0a4\uc758 \uc0dd\uc131, \uc800\uc7a5, \uad00\ub9ac \ubc0f \ud3d0\uae30\uc640 \uac19\uc740 \uc911\uc694\ud55c \uc791\uc5c5\uc744 \uc548\uc804\ud558\uace0 \ud6a8\uc728\uc801\uc73c\ub85c \uc218\ud589\ud560 \uc218 \uc788\uae30\ub54c\ubb38\uc5d0 \ubcf4\uc548 \uc694\uad6c \uc0ac\ud56d\uc5d0 \ub530\ub77c \ub370\uc774\ud130 \ubcf4\uc548\uc744 \uac15\ud654\ud558\uace0 \uac10\uc0ac \uc694\uad6c \uc0ac\ud56d \ucda9\uc871 \ubc0f \uad00\ub9ac\uc758 \ud3b8\uc758\uc131\uc744 \ub192\uc77c \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"has-white-color has-vivid-green-cyan-background-color has-text-color has-background wp-block-heading\"> NAVER CLOUD PLATFORM &#8211; KMS<\/h3>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"710\" src=\"https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2023\/04\/14165413\/image-11-1024x710.png\" alt=\"\" class=\"wp-image-2211\" srcset=\"https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2023\/04\/14165413\/image-11-1024x710.png 1024w, https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2023\/04\/14165413\/image-11-300x208.png 300w, https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2023\/04\/14165413\/image-11-768x532.png 768w, https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2023\/04\/14165413\/image-11-1080x749.png 1080w, https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2023\/04\/14165413\/image-11.png 1200w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\ub124\uc774\ubc84 \ud074\ub77c\uc6b0\ub4dc \ud50c\ub7ab\ud3fc\uc5d0\uc11c\ub3c4 \uad00\ub9ac\ud615 Key Management Service\uac00 \uc874\uc7ac\ud569\ub2c8\ub2e4.<br>\uad00\ub9ac\ud615 \uc11c\ube44\uc2a4\ub97c \uc0ac\uc6a9\ud558\uc9c0 \uc54a\uace0 \uc9c1\uc811 Vault, OpenKeychain, EJBCA \ub4f1\uc744 \uc624\ud508 \uc18c\uc2a4\ub97c \ud65c\uc6a9\ud558\uc5ec \ud2b9\uc815 \uc694\uad6c \uc0ac\ud56d\uc5d0 \ub9de\ub294 \uc0ac\uc6a9\uc790 \uc815\uc758 KMS \uc194\ub8e8\uc158\uc744 \uad6c\ucd95\ud560 \uc218\ub3c4 \uc788\uc73c\ub098 \uc774\ub97c \uc704\ud574\uc11c\ub294 \uc554\ud638\ud654 \ubc0f \ud0a4 \uad00\ub9ac\uc5d0 \ub300\ud55c \uae4a\uc740 \uc774\ud574\uc640 \uc548\uc804\ud55c \ud0a4 \uc800\uc7a5, \ud0a4 \uc0dd\uc131, \ud0a4 \ud68c\uc804 \ubc0f \ud0a4 \ud3d0\uae30\uc640 \uac19\uc740 \uae30\ub2a5\uc744 \uad6c\ud604\ud558\ub294 \ub370 \ud544\uc694\ud55c \uc804\ubb38 \uc9c0\uc2dd\uc774 \ud544\uc694\ud569\ub2c8\ub2e4.<\/p>\n\n\n\n<p>\uadf8\ub807\ub2e4\uba74 KMS\ub294 \uc5b4\ub5a4 \uc0ac\ub840\uc5d0\uc11c \uc5b4\ub5bb\uac8c \uc0ac\uc6a9\ud560 \uc218 \uc788\uc744\uae4c\uc694?<br>\uc544\ub9c8 \ub9ce\uc740 \uc0ac\uc6a9\uc790\ub4e4\uc774 \ud604\uc7ac KMS  \uc0ac\uc6a9 \uac00\uc774\ub4dc\ub9cc \ubcf4\uace0 \uac1c\ub150\uc740 \ud130\ub4dd\ud588\uc9c0\ub9cc \uc5b4\ub5bb\uac8c \uc0ac\uc6a9\ud574\uc57c\ud560\uc9c0 \ubab0\ub77c\uc11c \uc0ac\uc6a9\ud558\uc9c0 \ubabb\ud558\ub294 \uacbd\uc6b0\uac00 \ub9ce\uc744 \uac83\uc774\ub77c \uc0dd\uac01\ub429\ub2c8\ub2e4. <\/p>\n\n\n\n<p>KMS\ub97c \uc0ac\uc6a9\ud558\ub294 \uba87 \uac00\uc9c0 \uc77c\ubc18\uc801\uc778 \uc0ac\ub840\ub294 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<ul><li><strong>\ud30c\uc77c \uc800\uc7a5\uc18c \uc554\ud638\ud654 :<\/strong> Object Storage \ub610\ub294 \ub85c\uceec \ud30c\uc77c \uc2dc\uc2a4\ud15c\uc5d0\uc11c \uc800\uc7a5\ub418\ub294 \ud30c\uc77c\uc744 \uc554\ud638\ud654\ud560 \ub54c KMS\ub97c \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/li><li><strong>\uc560\ud50c\ub9ac\ucf00\uc774\uc158 \ub808\ubca8 \uc554\ud638\ud654 : <\/strong>\uc0ac\uc6a9\uc790 \ub370\uc774\ud130, \uba54\uc2dc\uc9c0, \ub610\ub294 \ud2b9\uc815 \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc5d0 \ud544\uc694\ud55c \uae30\ud0c0 \ubbfc\uac10 \uc815\ubcf4\ub97c \uc554\ud638\ud654\ud558\ub294 \ub370 KMS\ub97c \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc774\ub97c \ud1b5\ud574 \ub370\uc774\ud130\ub97c \ubcf4\ud638\ud558\uace0, \ub370\uc774\ud130 \uc720\ucd9c \ub610\ub294 \ubb34\ub2e8 \uc811\uadfc \uc2dc\ub3c4\ub97c \ubc29\uc9c0\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/li><li><strong>IoT \ubc0f \ub514\ubc14\uc774\uc2a4 \ubcf4\uc548:<\/strong> IoT \ub514\ubc14\uc774\uc2a4 \ubc0f \uae30\ud0c0 \uc5f0\uacb0\ub41c \uc2dc\uc2a4\ud15c\uc5d0\uc11c \uc0ac\uc6a9\ub418\ub294 \uc554\ud638\ud654 \ud0a4\ub97c \uc548\uc804\ud558\uac8c \uc0dd\uc131, \uc800\uc7a5 \ubc0f \uad00\ub9ac\ud558\uae30 \uc704\ud574 KMS\ub97c \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/li><li><strong>\ub514\uc9c0\ud138 \uc11c\uba85 \ubc0f \uc778\uc99d:<\/strong> KMS\ub97c \uc0ac\uc6a9\ud558\uc5ec \ub514\uc9c0\ud138 \uc11c\uba85 \ubc0f \uc778\uc99d\uc5d0 \uc0ac\uc6a9\ub418\ub294 \ud0a4\ub97c \uc548\uc804\ud558\uac8c \uc0dd\uc131 \ubc0f \uc800\uc7a5\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc774\ub97c \ud1b5\ud574 \uc804\uc790 \ubb38\uc11c, \uc774\uba54\uc77c, \uc18c\ud504\ud2b8\uc6e8\uc5b4 \ud328\ud0a4\uc9c0 \ub4f1\uc758 \ubb34\uacb0\uc131 \ubc0f \ucd9c\ucc98\ub97c \uac80\uc99d\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/li><\/ul>\n\n\n\n<p>\uadf8 \uc678\uc5d0\ub3c4 \ub2e4\uc591\ud55c \ubc29\ud5a5\uc73c\ub85c KMS \uc11c\ube44\uc2a4\ub97c \ud65c\uc6a9\ud560 \uc218 \uc788\ub294\ub370\uc694. \uc608\ub97c \ub4e4\uc5b4 \uc544\ub798\uc640 \uac19\uc740 \uc0ac\ub840\ub97c \uc608\uc2dc\ub85c \ub4e4\uc5b4\ubd05\uc2dc\ub2e4.<\/p>\n\n\n\n<p>\ubcd1\uc6d0\uc5d0\uc11c \ud658\uc790\uc758 \uac1c\uc778\uc815\ubcf4\ub97c \uc548\uc804\ud558\uac8c \ubcf4\ud638\ud558\ub824\uba74 \uc5b4\ub5bb\uac8c \ud574\uc57c \ud560\uae4c\uc694?<br>\ubcd1\uc6d0\uc740 \ud658\uc790\uc758 \ubbfc\uac10\ud55c \uac1c\uc778\uc815\ubcf4\uc640 \uc758\ub8cc \ub370\uc774\ud130\ub97c \ub2e4\ub8e8\uae30 \ub54c\ubb38\uc5d0 \ub370\uc774\ud130 \ubcf4\uc548\uc5d0 \ud2b9\ud788 \uc2e0\uacbd\uc744 \uc368\uc57c \ud569\ub2c8\ub2e4. \ub370\uc774\ud130\ubca0\uc774\uc2a4 \ub0b4\uc758 \ud658\uc790 \uc815\ubcf4\ub97c \ubcf4\ud638\ud558\ub294 \ubc29\ubc95\uc73c\ub85c Key Management Service(KMS)\ub97c \uc0ac\uc6a9\ud558\uc5ec \ub370\uc774\ud130\ub97c \uc554\ud638\ud654\ud558\ub294 \uac83\uc740 \ud6a8\uacfc\uc801\uc778 \ubc29\ubc95\uc774 \ub420 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<p>KMS\ub97c \uc0ac\uc6a9\ud558\uc5ec \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc5d0 \uc800\uc7a5\ub418\ub294 \ubaa8\ub4e0 \ud658\uc790 \ub370\uc774\ud130\ub97c \uc554\ud638\ud654\ud558\uace0 \uc758\uc0ac\uac00 \ud658\uc790\uc758 \uc815\ubcf4\ub97c \uc870\ud68c\ud560 \ub54c \uc2dc\uc2a4\ud15c\uc740 \ud658\uc790 \ub370\uc774\ud130\ub97c \ubcf5\ud638\ud654\ud558\uace0 \uc758\uc0ac\uc5d0\uac8c \ubcf4\uc5ec\uc8fc\ub3c4\ub85d \uc0ac\uc6a9\ud560 \uc218 \uc788\uaca0\uc8e0.<\/p>\n\n\n\n<p>\uc774\uc81c \ub124\uc774\ubc84 \ud074\ub77c\uc6b0\ub4dc \ud50c\ub7ab\ud3fc\uc758 Key Management Service\ub97c \uc9c1\uc811 \uc0ac\uc6a9\ud574\ubcf4\ub3c4\ub85d \ud558\uaca0\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"has-white-color has-vivid-green-cyan-background-color has-text-color has-background wp-block-heading\"> Data Encryption\/Decryption<\/h3>\n\n\n\n<p>\uba3c\uc800 Security &#8211; Key Management Service \uc5d0\uc11c [+ \ud0a4 \uc0dd\uc131]\uc744 \uc774\uc6a9\ud558\uc5ec \ud0a4\ub97c \uc0dd\uc131\ud558\ub3c4\ub85d \ud558\uaca0\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"541\" src=\"https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2023\/04\/14171104\/kms-01.png\" alt=\"\" class=\"wp-image-2213\" srcset=\"https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2023\/04\/14171104\/kms-01.png 969w, https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2023\/04\/14171104\/kms-01-300x167.png 300w, https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2023\/04\/14171104\/kms-01-768x429.png 768w\" sizes=\"(max-width: 969px) 100vw, 969px\" \/><\/figure>\n\n\n\n<p>\uc0dd\uc131\ub41c \ud0a4\ub294 \uc544\ub798 \uadf8\ub9bc\uacfc \uac19\uc774 Object Storage\ub97c \uc0dd\uc131\ud560 \ub54c\ub3c4 KMS \ub9c8\uc2a4\ud130 \ud0a4\ub97c \uc124\uc815\ud558\uc5ec \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"220\" src=\"https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2023\/04\/15175959\/obj-kms-1024x220.png\" alt=\"\" class=\"wp-image-2216\" srcset=\"https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2023\/04\/15175959\/obj-kms-1024x220.png 1024w, https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2023\/04\/15175959\/obj-kms-300x64.png 300w, https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2023\/04\/15175959\/obj-kms-768x165.png 768w, https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2023\/04\/15175959\/obj-kms-1536x330.png 1536w, https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2023\/04\/15175959\/obj-kms-1080x232.png 1080w, https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2023\/04\/15175959\/obj-kms.png 1552w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\ud558\uc9c0\ub9cc  KMS\uac00 \uc624\uc9c1 Object Storage\ub098 Private CA\uc640 \uac19\uc740 \uc11c\ube44\uc2a4\uc640 \uc5f0\ub3d9\ud558\uc5ec \uc0ac\uc6a9\ub418\ub294 \uac83\uc744 \ubaa9\uc801\uc73c\ub85c \ub9cc\ub4e4\uc5b4\uc9c4 \uac83\uc740 \uc544\ub2d9\ub2c8\ub2e4. \uadf8\ub7ec\ubbc0\ub85c Key Management Service\uc758 API\ub97c \uc774\uc6a9\ud558\uc5ec \ud65c\uc6a9 \ubc94\uc704\ub97c \ub113\ud600\ubcf4\ub3c4\ub85d \ud558\uaca0\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n<div class=\"vlp-link-container vlp-layout-basic wp-block-visual-link-preview-link\"><a href=\"https:\/\/api.ncloud-docs.com\/docs\/security-kms\" class=\"vlp-link\" title=\"KMS \uac1c\uc694\" rel=\"nofollow\" target=\"_blank\"><\/a><div class=\"vlp-layout-zone-side\"><div class=\"vlp-block-2 vlp-link-image\"><img loading=\"lazy\" decoding=\"async\" style=\"max-width: 150px;\" width=\"150\" height=\"150\" src=\"https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2022\/08\/22130310\/ncloud.png\" class=\"attachment-150x999 size-150x999\" alt=\"\" srcset=\"https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2022\/08\/22130310\/ncloud.png 161w, https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2022\/08\/22130310\/ncloud-150x150.png 150w\" sizes=\"(max-width: 150px) 100vw, 150px\" \/><\/div><\/div><div class=\"vlp-layout-zone-main\"><div class=\"vlp-block-0 vlp-link-title\">KMS \uac1c\uc694<\/div><div class=\"vlp-block-1 vlp-link-summary\">KMS API\ub294 RESTful \ud615\ud0dc\ub85c \uc81c\uacf5\ub429\ub2c8\ub2e4. KMS Rest API\ub97c \ud638\ucd9c\ud558\uae30 \uc704\ud574\uc11c\ub294 API Gateway\uc640 Sub Account \uc778\uc99d\uc744 \uc218\ud589\ud574\uc57c \ud569\ub2c8\ub2e4.<\/div><\/div><\/div>\n\n\n<p>\uc544\ub798 \ucf54\ub4dc\ub294 \uc554\/\ubcf5\ud638\ud654\ub97c \uac04\ub2e8\ud558\uac8c \ud14c\uc2a4\ud2b8 \ud574\ubcfc \uc218 \uc788\ub294 \ud14c\uc2a4\ud2b8 \ucf54\ub4dc\uc785\ub2c8\ub2e4.<br><em><span style=\"text-decoration: underline;\">ACCESS_KEY, SECRET_KEY, KMS_KEY_TAG\uc640 \uac19\uc774 \ubbfc\uac10\ud55c \uc815\ubcf4\ub294 \ubcf4\uc548\uc0c1 \ud658\uacbd \ubcc0\uc218\ub098 \ubcc4\ub3c4\uc758 \uc124\uc815 \ud30c\uc77c\uc744 \ud65c\uc6a9\ud558\uc5ec \uad00\ub9ac\uac00 \ud544\uc694<\/span><\/em>\ud569\ub2c8\ub2e4.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\ud83d\udd12 Encrypt<\/h4>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">import hashlib\nimport hmac\nimport base64\nimport requests\nimport time\nimport json\nfrom datetime import datetime\n\ndef main():\n\n    timestamp = int(time.time() * 1000)\n    timestamp = str(timestamp)\n\n    access_key = \"{ACCESS_KEY}\"\n    secret_key = \"{SECRET_KEY}\"\n    secret_key = bytes(secret_key, 'UTF-8')\n\n    method = \"POST\"\n    key_tag = \"{KMS_KEY_TAG}\"\n\n    api_server = \"https:\/\/kms.apigw.ntruss.com\"\n    uri = \"\/keys\/v2\/\" + key_tag + \"\/encrypt\"\n    uri = uri + \"?responseFormatType=json\"\n\n    message = method + \" \" + uri + \"\\n\" + timestamp + \"\\n\" + access_key\n    message = bytes(message, 'UTF-8')\n    signingKey = base64.b64encode(hmac.new(secret_key, message, digestmod=hashlib.sha256).digest())\n\n    http_header = {\n        'Content-Type': 'application\/json',\n        'x-ncp-apigw-signature-v2': signingKey,\n        'x-ncp-apigw-timestamp': timestamp,\n        'x-ncp-iam-access-key': access_key\n        }\n\n    # \uc554\ud638\ud654\ud560 \ud14d\uc2a4\ud2b8 \uc785\ub825 \ubc0f Base64 \ud615\ud0dc\ub85c \uc778\ucf54\ub529\n    text_to_encrypt = 'MANVSCLOUD'\n    text_to_encrypt_base64 = base64.b64encode(text_to_encrypt.encode('utf-8')).decode('utf-8')\n\n    payload = {\n        \"plaintext\": text_to_encrypt_base64\n    }\n\n    response = requests.post(api_server + uri, headers=http_header, json=payload)\n\n    data = json.loads(response.text)\n    ciphertext = data['data']['ciphertext']\n\n    print(ciphertext)\n\nif __name__ == '__main__':\n    main()<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">\ud83d\udd13 Decrypt<\/h4>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">import hashlib\nimport hmac\nimport base64\nimport requests\nimport time\nimport json\nfrom datetime import datetime\n\ndef main():\n\n    timestamp = int(time.time() * 1000)\n    timestamp = str(timestamp)\n\n    access_key = \"{ACCESS_KEY}\"\n    secret_key = \"{SECRET_KEY}\"\n    secret_key = bytes(secret_key, 'UTF-8')\n\n    method = \"POST\"\n    key_tag = \"{KMS_KEY_TAG}\"\n\n    api_server = \"https:\/\/kms.apigw.ntruss.com\"\n    uri = \"\/keys\/v2\/\" + key_tag + \"\/decrypt\"\n    uri = uri + \"?responseFormatType=json\"\n\n    message = method + \" \" + uri + \"\\n\" + timestamp + \"\\n\" + access_key\n    message = bytes(message, 'UTF-8')\n    signingKey = base64.b64encode(hmac.new(secret_key, message, digestmod=hashlib.sha256).digest())\n\n    http_header = {\n        'Content-Type': 'application\/json',\n        'x-ncp-apigw-signature-v2': signingKey,\n        'x-ncp-apigw-timestamp': timestamp,\n        'x-ncp-iam-access-key': access_key\n        }\n\n\n    payload = {\n        \"ciphertext\": \"{CIPHERTEXT}\"\n    }\n\n    response = requests.post(api_server + uri, headers=http_header, json=payload)\n\n    data = json.loads(response.text)\n    origintext = data['data']['plaintext']\n\n    encoded_string = origintext\n    decoded_bytes = base64.b64decode(encoded_string)\n    decoded_string = decoded_bytes.decode(\"utf-8\")\n\n    print(decoded_string)\n\n\nif __name__ == '__main__':\n    main()<\/pre>\n\n\n\n<ul><li><strong>ACCESS_KEY : <\/strong>Sub Account\uc5d0\uc11c \ucd94\uac00\ud55c Access Key Id (Main \uacc4\uc815\uc758 \uc778\uc99d\ud0a4\ub85c\ub3c4 \uc0ac\uc6a9\uac00\ub2a5\ud558\uc9c0\ub9cc \uad8c\uc7a5\ud558\uc9c0 \uc54a\uc74c)<\/li><li><strong>SECRET_KEY : <\/strong>Sub Account\uc5d0\uc11c \uc0dd\uc131\ub41c Access Key\uc758 Secret Key<\/li><li><strong>KMS_KEY_TAG :<\/strong> Key Management Service \ucf58\uc194\uc5d0\uc11c \uc0dd\uc131 \ud6c4 \ud0a4\ub97c \uc120\ud0dd\ud558\uc5ec &#8216;\ud0a4 Tag&#8217; \ud655\uc778 \uac00\ub2a5<\/li><li><strong>CIPHERTEXT : <\/strong>KMS\ub97c \uc774\uc6a9\ud574 \ud3c9\ubb38\uc744 \uc554\ud638\ud654\ud55c \uc554\ud638\ubb38<\/li><\/ul>\n\n\n\n<p>Key Management Service\ub97c \uc774\uc6a9\ud558\uc5ec \ud0a4\ub97c \ubc1c\uae09\ud558\uace0 \uc704 \ud14c\uc2a4\ud2b8 \ucf54\ub4dc\ub97c \ud1b5\ud574 \ucda9\ubd84\ud788 \uc554\/\ubcf5\ud638\ud654\ub97c \uc9c4\ud589\ud574\ubcf4\uc558\ub2e4\uba74 \uc774\uc81c \uc704\uc5d0\uc11c \uc0ac\uc6a9\ub41c API\ub97c \ud65c\uc6a9\ud558\uc5ec \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc5d0 \uc800\uc7a5\ub418\ub294 \ub370\uc774\ud130\ub97c KMS\ub97c \ud65c\uc6a9\ud558\uc5ec \uc554\ud638\ud654\ud558\uace0 \uc6f9\uc5d0\uc11c \ubcf4\uc5ec\uc9c0\ub294 \ubd80\ubd84\uc740 \ubcf5\ud638\ud654\ud558\uc5ec \ubcf4\uc5ec\uc9c8 \uc218 \uc788\ub3c4\ub85d \ud574\ubcf4\uaca0\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"has-white-color has-vivid-green-cyan-background-color has-text-color has-background wp-block-heading\"> A to Z<\/h3>\n\n\n\n<p><span style=\"text-decoration: underline;\"># VPC, Server \uc0dd\uc131\uc5d0 \ub300\ud55c \uac00\uc774\ub4dc\ub294 \uc0dd\ub7b5\ud569\ub2c8\ub2e4.<br># ACG \uc124\uc815\uc740 (Inbound) 22, 10000 \/ (Outbound) 80, 443\uc774 \ud5c8\uc6a9\ub418\uc5c8\uc2b5\ub2c8\ub2e4.<br># Python\uc740 3.7.13 \ubc84\uc804\uc774 \uc0ac\uc6a9\ub418\uc5c8\uc2b5\ub2c8\ub2e4.<\/span><br><span style=\"text-decoration: underline;\"># MySQL 8\ubc84\uc804\uc774 \uc0ac\uc6a9\ub418\uc5c8\uc2b5\ub2c8\ub2e4.<br># \ud574\ub2f9 A to Z\ub294 Python \uac1c\ubc1c \ud658\uacbd \uad6c\uc131\uc774 \uc644\ub8cc\ub418\uc5c8\ub2e4\ub294 \uac00\uc815\ud558\uc5d0 \uc9c4\ud589\ub429\ub2c8\ub2e4.<\/span><\/p>\n\n\n\n<p>\ud574\ub2f9 A to Z \uacfc\uc815\uc740 Flask\uc640 MySQL\uc744 \uc774\uc6a9\ud558\uc5ec \uc9c4\ud589\ud569\ub2c8\ub2e4.<br>\ub2e4\ub9cc Flask, MySQL \uc124\uce58 \ubc0f \uc124\uc815\uc5d0 \ub300\ud55c \ub0b4\uc6a9\uc740 \uc8fc\uc81c\uc5d0\uc11c \ubc97\uc5b4\ub098\ubbc0\ub85c \uc138\ubd80\uc801\uc778 \uc124\uba85\uc740 \uc0dd\ub7b5\ud569\ub2c8\ub2e4.<\/p>\n\n\n\n<p>MySQL\uc774 \uc124\uce58\ub418\uc5c8\ub2e4\ub294 \uac00\uc815\ud558\uc5d0 DB \uc811\uc18d \ud6c4 \uc544\ub798\uc640 \uac19\uc774 \uacc4\uc815 \ubc0f \ud14c\uc774\ube14\uc744 \uc0dd\uc131\ud574\uc8fc\uc5c8\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">mysql> use mysql;\nmysql> CREATE DATABASE manvscloud default CHARACTER SET UTF8;\nmysql> create user 'manvscloud'@'localhost' identified by 'PASSWORD';\nmysql> grant all privileges on manvscloud.* to 'manvscloud'@'localhost'\nmysql> flush privileges;\nmysql> use manvscloud;\nmysql> CREATE TABLE mvsc (\n    id INT AUTO_INCREMENT PRIMARY KEY,\n    secret VARCHAR(255) NOT NULL\n);\n\nmysql> describe mvsc;\n+--------+--------------+------+-----+---------+----------------+\n| Field  | Type         | Null | Key | Default | Extra          |\n+--------+--------------+------+-----+---------+----------------+\n| id     | int          | NO   | PRI | NULL    | auto_increment |\n| secret | varchar(255) | NO   |     | NULL    |                |\n+--------+--------------+------+-----+---------+----------------+\n2 rows in set (0.00 sec)<\/pre>\n\n\n\n<p>Flask\uc640 MySQL\uc744 \uc5f0\ub3d9\ud558\uae30 \uc704\ud574 flask-mysqldb\ub3c4 \ud568\uaed8 \uc124\uce58\ud574\uc8fc\uc5c8\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">pip install requests flask flask-mysqldb<\/pre>\n\n\n\n<p>Flask\uc640 MySQL\uc774 \uc798 \uc5f0\ub3d9\ub418\uc5c8\ub294\uc9c0 \ud655\uc778\uacfc \ud568\uaed8 \uae30\ubcf8\uc801\uc73c\ub85c \ud14c\uc2a4\ud2b8\ud560 \ud658\uacbd\uc744 \uad6c\uc131\ud558\uace0 \uc6f9 \uc0ac\uc774\ud2b8\uc5d0 \uc811\uc18d\ud558\uc5ec \uac12\uc744 \uc785\ub825\ud558\uace0 \uc870\ud68c\uae4c\uc9c0 \ud560 \uc218 \uc788\ub3c4\ub85d \ud574\ubcf4\uaca0\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<ul><li><strong>app.py<\/strong><\/li><\/ul>\n\n\n\n<p>\uc544\ub798 \ucf54\ub4dc\uc5d0\uc11c MySQL\uc758 User, Password, DB\uc774\ub984, \ud14c\uc774\ube14 \uba85\uc740 \uc124\uc815\ud55c\ub300\ub85c \ubcc0\uacbd\ud574\uc8fc\uc790!<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">from flask import Flask, render_template, request, redirect, url_for\nfrom flask_mysqldb import MySQL\n\napp = Flask(__name__)\n\n# \ub370\uc774\ud130\ubca0\uc774\uc2a4 \uc124\uc815\napp.config['MYSQL_HOST'] = 'localhost'\napp.config['MYSQL_USER'] = 'manvscloud'\napp.config['MYSQL_PASSWORD'] = 'PASSWORD'\napp.config['MYSQL_DB'] = 'manvscloud'\n\nmysql = MySQL(app)\n\n@app.route('\/')\ndef index():\n    cur = mysql.connection.cursor()\n    cur.execute(\"SELECT * FROM mvsc\")\n    data = cur.fetchall()\n    cur.close()\n    return render_template('index.html', data=data)\n\n@app.route('\/submit', methods=['POST'])\ndef submit():\n    if request.method == 'POST':\n        user_input = request.form['data']\n        cur = mysql.connection.cursor()\n        cur.execute(\"INSERT INTO mvsc (secret) VALUES (%s)\", (user_input,))\n        mysql.connection.commit()\n        cur.close()\n        return redirect(url_for('index'))\n\nif __name__ == '__main__':\n    app.run(host='0.0.0.0', port=10000)\n<\/pre>\n\n\n\n<ul><li><strong>templates\/index.html<\/strong><\/li><\/ul>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;!DOCTYPE html>\n&lt;html lang=\"ko\">\n&lt;head>\n    &lt;meta charset=\"UTF-8\">\n    &lt;meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    &lt;title>Key Management Service\ub97c \uc774\uc6a9\ud55c DB \ub370\uc774\ud130 \uc554\/\ubcf5\ud638\ud654&lt;\/title>\n&lt;\/head>\n&lt;body>\n    &lt;h1>DB\uc5d0 \uc800\uc7a5\ud560 \ub370\uc774\ud130 \uc785\ub825&lt;\/h1>\n    &lt;form action=\"{{ url_for('submit') }}\" method=\"post\">\n        &lt;label for=\"data\">\ub370\uc774\ud130:&lt;\/label>\n        &lt;input type=\"text\" id=\"data\" name=\"data\" required>\n        &lt;button type=\"submit\">Submit&lt;\/button>\n    &lt;\/form>\n\n    &lt;h2>\uc800\uc7a5\ub41c \ub370\uc774\ud130 \ubaa9\ub85d&lt;\/h2>\n    &lt;ul>\n        {% for row in data %}\n            &lt;li>{{ row[1] }}&lt;\/li>\n        {% endfor %}\n    &lt;\/ul>\n&lt;\/body>\n&lt;\/html>\n<\/pre>\n\n\n\n<p>\ucf54\ub4dc\uac00 \uc791\uc131\ub418\uc5c8\ub2e4\uba74 python app.py\ub85c \uc571\uc744 \uc2e4\ud589\uc2dc\ucf1c \uc6f9\uc5d0 \uc811\uc18d\ud574\ubd05\ub2c8\ub2e4.<br>\ub370\uc774\ud130 : \ubd80\ubd84\uc5d0 &#8220;\ud14c\uc2a4\ud2b8\uc785\ub2c8\ub2e4.&#8221;\ub77c\uace0 \uc785\ub825 \ud6c4 [Submit] \ubc84\ud2bc\uc744 \ud074\ub9ad\ud558\uac8c\ub418\uba74 \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc5d0 \uc800\uc7a5\ub41c &#8220;\ud14c\uc2a4\ud2b8\uc785\ub2c8\ub2e4.&#8221;\ub77c\ub294 \uac12\uc774 \ub9ac\uc2a4\ud2b8 \ud615\ud0dc\ub85c \uc870\ud68c\ub418\uc5b4 \ub098\uc635\ub2c8\ub2e4.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"530\" height=\"395\" src=\"https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2023\/04\/12141522\/app-01.png\" alt=\"\" class=\"wp-image-2202\" srcset=\"https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2023\/04\/12141522\/app-01.png 530w, https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2023\/04\/12141522\/app-01-300x224.png 300w\" sizes=\"(max-width: 530px) 100vw, 530px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"275\" height=\"134\" src=\"https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2023\/04\/12141535\/app-02.png\" alt=\"\" class=\"wp-image-2203\"\/><figcaption>Database \uba85\ub839\uc5b4\ub85c \uc870\ud68c\ud574\ub3c4 \uc785\ub825\ub41c \uac12\uc744 \ud655\uc778\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/figcaption><\/figure>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">mysql> delete from mvsc where id = 1;\nQuery OK, 1 row affected (0.01 sec)<\/pre>\n\n\n\n<p>\uc774\uc81c \ud14c\uc2a4\ud2b8\ub85c \uc785\ub825\ud55c \uac12\uc744 \uc0ad\uc81c\ud574\uc8fc\uace0 \ub370\uc774\ud130 \uc785\ub825 \uc2dc KMS\ub97c \uc774\uc6a9\ud558\uc5ec \uc554\ud638\ud654\ub418\uace0 \uc870\ud68c \uc2dc\uc5d0\ub294 \ubcf5\ud638\ud654\ud558\uc5ec \ubcfc \uc218 \uc788\ub3c4\ub85d \ucf54\ub4dc\ub97c \ubcc0\uacbd\ud574\ubd05\uc2dc\ub2e4.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-dots\"\/>\n\n\n\n<ul><li><strong>\ubcc0\uacbd\ub41c app.py<\/strong><\/li><\/ul>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">import hashlib\nimport hmac\nimport base64\nimport requests\nimport time\nimport json\nfrom datetime import datetime\nfrom flask import Flask, render_template, request, redirect, url_for\nfrom flask_mysqldb import MySQL\n\napp = Flask(__name__)\n\n# \ub370\uc774\ud130\ubca0\uc774\uc2a4 \uc124\uc815\napp.config['MYSQL_HOST'] = 'localhost'\napp.config['MYSQL_USER'] = 'manvscloud'\napp.config['MYSQL_PASSWORD'] = 'PASSWORD'\napp.config['MYSQL_DB'] = 'manvscloud'\n\nmysql = MySQL(app)\n\ndef get_api_config():\n    access_key = \"{ACCESS_KEY}\"\n    secret_key = \"{SECRET_KEY}\"\n    secret_key = bytes(secret_key, 'UTF-8')\n    key_tag = \"{KMS_KEY_TAG}\"\n    api_server = \"https:\/\/kms.apigw.ntruss.com\"\n\n    return access_key, secret_key, key_tag, api_server\n\n\n# \ubcf5\ud638\ud654 \ud568\uc218\ndef decrypt_text(ciphertext):\n\n    access_key, secret_key, key_tag, api_server = get_api_config()\n\n    timestamp = int(time.time() * 1000)\n    timestamp = str(timestamp)\n\n    method = \"POST\"\n\n    uri = \"\/keys\/v2\/\" + key_tag + \"\/decrypt\"\n    uri = uri + \"?responseFormatType=json\"\n\n    message = method + \" \" + uri + \"\\n\" + timestamp + \"\\n\" + access_key\n    message = bytes(message, 'UTF-8')\n    signingKey = base64.b64encode(hmac.new(secret_key, message, digestmod=hashlib.sha256).digest())\n\n    http_header = {\n        'Content-Type': 'application\/json',\n        'x-ncp-apigw-signature-v2': signingKey,\n        'x-ncp-apigw-timestamp': timestamp,\n        'x-ncp-iam-access-key': access_key\n        }\n\n    payload = {\n        \"ciphertext\": ciphertext\n    }\n\n    response = requests.post(api_server + uri, headers=http_header, json=payload)\n    data = json.loads(response.text)\n\n    if 'data' not in data or 'plaintext' not in data['data']:\n        print(\"Error: Unable to retrieve the plaintext from the API response.\")\n        print(data)\n        return None\n\n    origintext = data['data']['plaintext']\n    decoded_bytes = base64.b64decode(origintext)\n    decoded_string = decoded_bytes.decode(\"utf-8\")\n\n    return decoded_string\n\n\n# \uc554\ud638\ud654 \ud568\uc218\ndef encrypt_text(plaintext):\n\n    access_key, secret_key, key_tag, api_server = get_api_config()\n\n    timestamp = int(time.time() * 1000)\n    timestamp = str(timestamp)\n\n    method = \"POST\"\n\n    uri = \"\/keys\/v2\/\" + key_tag + \"\/encrypt\"\n    uri = uri + \"?responseFormatType=json\"\n\n    message = method + \" \" + uri + \"\\n\" + timestamp + \"\\n\" + access_key\n    message = bytes(message, 'UTF-8')\n    signingKey = base64.b64encode(hmac.new(secret_key, message, digestmod=hashlib.sha256).digest())\n\n    http_header = {\n        'Content-Type': 'application\/json',\n        'x-ncp-apigw-signature-v2': signingKey,\n        'x-ncp-apigw-timestamp': timestamp,\n        'x-ncp-iam-access-key': access_key\n        }\n\n    text_to_encrypt_base64 = base64.b64encode(plaintext.encode('utf-8')).decode('utf-8')\n\n    payload = {\n        \"plaintext\": text_to_encrypt_base64\n    }\n\n    response = requests.post(api_server + uri, headers=http_header, json=payload)\n    data = json.loads(response.text)\n\n    ciphertext = data['data']['ciphertext']\n    return ciphertext\n\n\n# \uba54\uc778 \ud398\uc774\uc9c0\n@app.route('\/')\ndef index():\n\n    cur = mysql.connection.cursor()\n    cur.execute(\"SELECT * FROM mvsc\")\n    data = cur.fetchall()\n    cur.close()\n\n    # \ub370\uc774\ud130 \ubcf5\ud638\ud654\n    decrypted_data = []\n    for row in data:\n        decrypted_text = decrypt_text(row[1])\n        if decrypted_text is not None:\n            decrypted_data.append((row[0], decrypted_text))\n\n    return render_template('index.html', data=decrypted_data)\n\n# \ub370\uc774\ud130 SUBMIT\n@app.route('\/submit', methods=['POST'])\ndef submit():\n    if request.method == 'POST':\n        user_input = request.form['data']\n        encrypted_data = encrypt_text(plaintext=user_input) \n        cur = mysql.connection.cursor()\n        cur.execute(\"INSERT INTO mvsc (secret) VALUES (%s)\", (encrypted_data,))\n        mysql.connection.commit()\n        cur.close()\n        return redirect(url_for('index'))\n\n\nif __name__ == '__main__':\n    app.run(host='0.0.0.0', port=10000)<\/pre>\n\n\n\n<p>\uae30\uc874 \ucf54\ub4dc\uc5d0\uc11c KMS API\ub85c \uc554\ud638\ud654 \ubc0f \ubcf5\ud638\ud654\ud558\ub294 \ucf54\ub4dc\uac00 \ucd94\uac00\ub418\uc5c8\uc2b5\ub2c8\ub2e4.<br>\uc774\uc81c \ub2e4\uc2dc python app.py\ub85c \uc571\uc744 \uc2e4\ud589\ud558\uc5ec \ub370\uc774\ud130\ub97c \uc785\ub825\ud574\ubcf4\uace0 \uacb0\uacfc\ub97c \ud655\uc778\ud574\ubd05\uc2dc\ub2e4.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"670\" height=\"490\" src=\"https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2023\/04\/15183848\/kms-11.png\" alt=\"\" class=\"wp-image-2217\" srcset=\"https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2023\/04\/15183848\/kms-11.png 670w, https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2023\/04\/15183848\/kms-11-300x219.png 300w\" sizes=\"(max-width: 670px) 100vw, 670px\" \/><\/figure>\n\n\n\n<p>\uc6f9\uc5d0\uc11c \ub370\uc774\ud130 \uc785\ub825 \uc2dc \ub370\uc774\ud130\ub294 \uc554\ud638\ud654\ub418\uc5b4 \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc5d0 \uc800\uc7a5\ub429\ub2c8\ub2e4. <br>\ud558\uc9c0\ub9cc \uc6f9\uc5d0\uc11c \uc870\ud68c\ub418\ub294 \uac12\uc740 \ubcf5\ud638\ud654\ub41c \ud3c9\ubb38 \uac12\uc744 \uc870\ud68c\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"880\" height=\"428\" src=\"https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2023\/04\/15183856\/kms-12.png\" alt=\"\" class=\"wp-image-2218\" srcset=\"https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2023\/04\/15183856\/kms-12.png 880w, https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2023\/04\/15183856\/kms-12-300x146.png 300w, https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2023\/04\/15183856\/kms-12-768x374.png 768w\" sizes=\"(max-width: 880px) 100vw, 880px\" \/><\/figure>\n\n\n\n<p>\uc5ec\uae30\uae4c\uc9c0 \uc798 \ub530\ub77c\uc624\uc168\ub2e4\uba74 Key Management Service\uc758 API\ub97c \uc774\uc6a9\ud558\uc5ec \ub370\uc774\ud130\ub97c \uc554\ud638\ud654\ud558\uace0 \ubcf5\ud638\ud654\ud558\ub294 \ubc29\ubc95\uc744 \ubc30\uc6b0\uc168\uc744 \uac83\uc785\ub2c8\ub2e4.<\/p>\n\n\n\n<p>\uc774\uc81c \uc774\ub7ec\ud55c \ubc29\ubc95\uc744 \ub2e4\uc591\ud55c \uce21\uba74\uc73c\ub85c \uace0\ub824\ud558\uc5ec \uc11c\ube44\uc2a4\uc5d0 \ud1b5\ud569\ud574\ubcf4\uc2dc\uae38 \ubc14\ub78d\ub2c8\ub2e4.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"has-white-color has-cyan-bluish-gray-background-color has-text-color has-background wp-block-heading\"> Personal Comments<\/h3>\n\n\n\n<p>\ubcf4\uc548\uc740 \ud604\ub300\uc758 \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \uac1c\ubc1c\uc5d0\uc11c \ub9e4\uc6b0 \uc911\uc694\ud569\ub2c8\ub2e4.\ub370\uc774\ud130 \ubcf4\uc548\uc740 \uc0ac\uc6a9\uc790\ub4e4\uc758 \uc2e0\ub8b0\ub97c \uc5bb\uace0 \ube44\uc988\ub2c8\uc2a4\uc5d0 \uae0d\uc815\uc801\uc778 \uc601\ud5a5\uc744 \ubbf8\uce58\ub294 \ub370 \uacb0\uc815\uc801\uc778 \uc694\uc18c\uac00 \ub429\ub2c8\ub2e4.<\/p>\n\n\n\n<p>\uc774 \uae00\uc744 \ud1b5\ud574 \ub370\uc774\ud130\ub97c \uc554\ud638\ud654 \ubc0f \ubcf5\ud638\ud654 \ud574\ubcf4\uc558\uace0 \ud074\ub77c\uc6b0\ub4dc \uae30\ubc18\uc758 \uad00\ub9ac\ud615 Key Management Service\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc554\ud638\ud654 \ud0a4\ub97c \uc5c4\uaca9\ud558\uace0 \uc548\uc804\ud558\uac8c \ubcf4\ud638\ud558\uba70 \ud3b8\ub9ac\ud558\uac8c \uc0ac\uc6a9\ud560 \uc218 \uc788\ub294 \uac83\uc744 \uc54c \uc218 \uc788\uc5c8\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<p>\uae34 \uae00 \uc77d\uc5b4\uc8fc\uc154\uc11c \uac10\uc0ac\ud569\ub2c8\ub2e4.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"137\" src=\"https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2021\/08\/25143135\/ncloud-master-1.png\" alt=\"\" class=\"wp-image-1265\" srcset=\"https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2021\/08\/25143135\/ncloud-master-1.png 800w, https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2021\/08\/25143135\/ncloud-master-1-300x51.png 300w, https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2021\/08\/25143135\/ncloud-master-1-768x132.png 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\uc548\ub155\ud558\uc138\uc694. MANVSCLOUD \uae40\uc218\ud604\uc785\ub2c8\ub2e4. \ucd5c\uadfc\uc5d0 \uc554\ud638\ud654 \uc54c\uace0\ub9ac\uc998\uc5d0 \ub300\ud55c \ud3ec\uc2a4\ud305\uc744 \uc791\uc131\ud588\uc5c8\ub294\ub370\uc694. \uc554\ud638\ud654\ud558\uba74 \ub370\uc774\ud130 \uc554\ud638\ud654\uc640 \uad00\ub828\ud558\uc5ec \ud0a4 \uad00\ub9ac \uc11c\ube44\uc2a4\ub97c \ube7c\ub193\uc744 \uc218 \uc5c6\uc744 \uac83\uac19\uc2b5\ub2c8\ub2e4.\uadf8\ub7ec\ubbc0\ub85c \uc624\ub298\uc740 Key Management Service\uc5d0 \ub300\ud55c \uc8fc\uc81c\ub85c \ud3ec\uc2a4\ud305\uc744 \uc9c4\ud589\ud558\uaca0\uc2b5\ub2c8\ub2e4. Key Management Service Key Management Service(KMS)\ub294 \uc554\ud638\ud654 \ud0a4\ub97c \uc0dd\uc131, \uc800\uc7a5, \uad00\ub9ac, \ud0a4 \ud68c\uc804 \ubc0f \ud0a4 \ud3d0\uae30\uc640 \uac19\uc740 \ud0a4 \uc218\uba85\uc8fc\uae30 \uad00\ub9ac\ub97c \ub2f4\ub2f9\ud558\ub294 \uc11c\ube44\uc2a4\uc785\ub2c8\ub2e4. \uc774\ub97c \ud1b5\ud574 \uc0ac\uc6a9\uc790\ub294 \ubbfc\uac10\ud55c \ub370\uc774\ud130\ub97c \uc548\uc804\ud558\uac8c \uc554\ud638\ud654\ud558\uace0 \ubcf5\ud638\ud654\ud560 \uc218 \uc788\uc73c\uba70, \uad8c\ud55c\uc774 \uc788\ub294 \uc0ac\uc6a9\uc790\ub9cc \ud574\ub2f9 \ud0a4\uc5d0 \uc561\uc138\uc2a4\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \u203b \uc8fc\uc694 \uae30\ub2a5 \uac15\ub825\ud55c \uc554\ud638\ud654 \ud0a4 \uc0dd\uc131 \uc548\uc804\ud55c \ud0a4 \uc800\uc7a5\uc18c\uc5d0 \uc554\ud638\ud654 \ud0a4\ub97c \ubcf4\uad00 \uad8c\ud55c\uc774 \uc788\ub294 \uc0ac\uc6a9\uc790 \ubc0f \uc751\uc6a9 \ud504\ub85c\uadf8\ub7a8\ub9cc \uc0ac\uc6a9\ud560 \uc218 \uc788\ub3c4\ub85d \uc554\ud638\ud654 \ud0a4 \uc561\uc138\uc2a4\ub97c \uc81c\uc5b4 \uc815\uae30\uc801\uc73c\ub85c \ud0a4\ub97c \uc790\ub3d9\uc73c\ub85c \uad50\uccb4\ud558\uc5ec \ubcf4\uc548 \uc720\uc9c0 \ud544\uc694\ud558\uc9c0 \uc54a\uc740 \ud0a4\ub97c \uc548\uc804\ud558\uac8c \ud3d0\uae30 \uc554\ud638\ud654 \ud0a4 \uad00\ub9ac\uac00 \uc911\uc694\ud55c \ub370\uc774\ud130 \ubcf4\uc548 \uc694\uc18c \uc911 \ud558\ub098\uc778 \ub9cc\ud07c, Key Management Service(KMS)\ub294 \uae30\uc5c5 \ubc0f \uac1c\uc778\uc758 \ub370\uc774\ud130\ub97c \ubcf4\ud638\ud558\ub294 \ub370 \ud544\uc218\uc801\uc778 \ub3c4\uad6c\uc785\ub2c8\ub2e4.KMS\ub97c \uc0ac\uc6a9\ud558\uba74 \uc554\ud638\ud654 \ud0a4\uc758 \uc0dd\uc131, \uc800\uc7a5, \uad00\ub9ac \ubc0f \ud3d0\uae30\uc640 \uac19\uc740 \uc911\uc694\ud55c \uc791\uc5c5\uc744 \uc548\uc804\ud558\uace0 \ud6a8\uc728\uc801\uc73c\ub85c \uc218\ud589\ud560 \uc218 \uc788\uae30\ub54c\ubb38\uc5d0 \ubcf4\uc548 \uc694\uad6c \uc0ac\ud56d\uc5d0 \ub530\ub77c \ub370\uc774\ud130 \ubcf4\uc548\uc744 \uac15\ud654\ud558\uace0 \uac10\uc0ac \uc694\uad6c \uc0ac\ud56d \ucda9\uc871 \ubc0f \uad00\ub9ac\uc758 \ud3b8\uc758\uc131\uc744 \ub192\uc77c \uc218 \uc788\uc2b5\ub2c8\ub2e4. NAVER CLOUD PLATFORM &#8211; KMS \ub124\uc774\ubc84 \ud074\ub77c\uc6b0\ub4dc \ud50c\ub7ab\ud3fc\uc5d0\uc11c\ub3c4 \uad00\ub9ac\ud615 Key Management Service\uac00 \uc874\uc7ac\ud569\ub2c8\ub2e4.\uad00\ub9ac\ud615 \uc11c\ube44\uc2a4\ub97c \uc0ac\uc6a9\ud558\uc9c0 \uc54a\uace0 \uc9c1\uc811 Vault, OpenKeychain, EJBCA \ub4f1\uc744 \uc624\ud508 \uc18c\uc2a4\ub97c \ud65c\uc6a9\ud558\uc5ec \ud2b9\uc815 \uc694\uad6c \uc0ac\ud56d\uc5d0 \ub9de\ub294 \uc0ac\uc6a9\uc790 \uc815\uc758 KMS \uc194\ub8e8\uc158\uc744 \uad6c\ucd95\ud560 \uc218\ub3c4 \uc788\uc73c\ub098 \uc774\ub97c \uc704\ud574\uc11c\ub294 \uc554\ud638\ud654 \ubc0f \ud0a4 \uad00\ub9ac\uc5d0 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"[NCLOUD] Key Management Service\ub97c \ud65c\uc6a9\ud55c \ub370\uc774\ud130\ubca0\uc774\uc2a4 \uc554\ud638\ud654 \ubc0f \ubcf5\ud638\ud654 \uac00\uc774\ub4dc","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3],"tags":[845,249,9,843,833,842,770,840,839,32,80,87,91,17,90,16,126,817,89,202,398,844,841,818],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/manvscloud.com\/index.php?rest_route=\/wp\/v2\/posts\/2194"}],"collection":[{"href":"https:\/\/manvscloud.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/manvscloud.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/manvscloud.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/manvscloud.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2194"}],"version-history":[{"count":12,"href":"https:\/\/manvscloud.com\/index.php?rest_route=\/wp\/v2\/posts\/2194\/revisions"}],"predecessor-version":[{"id":2221,"href":"https:\/\/manvscloud.com\/index.php?rest_route=\/wp\/v2\/posts\/2194\/revisions\/2221"}],"wp:attachment":[{"href":"https:\/\/manvscloud.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2194"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/manvscloud.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2194"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/manvscloud.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2194"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}