IPå¶éãæ¸ããåãçµã¿
ã¢ã³ã¹ãäºæ¥æ¬é¨SREã°ã«ã¼ãã®ä¼è¤ã§ãã
æ®æ®µã¯ã¢ã³ã¹ãã«é¢ããã·ã¹ãã ã®æ¹åã»éç¨ãæ§ã
ãªé¢ããè¡ã£ã¦ãã¾ãã
ä»åããµã¼ãã¹ã®ç´æ¥çãªæ¹åã§ã¯ãªãã§ããããã¼ã«çã®IPå¶éãæ¸ããåãçµã¿ã«ã¤ãã¦ãç´¹ä»ãã¾ãã
ãµã¼ãã¹ã®ç´æ¥çãªæ¹åããã¤ãæ¸ããã°ãªã¨æã£ã¦ããã¾ãã
çããã¯IPå¶éããã¦ãããã¼ã«çã¯ããã¤ãããããã¾ãã§ããããï¼
ã¢ã³ã¹ãã«ãæ´å²ççµç·¯ã§IPå¶éããããã¼ã«ããç¹ã«å¶éããã¦ããªããã¼ã«ï¼ï¼ï¼ã¾ã§ããã¤ãããã¾ããã
èªä½ã®ãã¼ã«ä»¥å¤ã«ãéçºãéç¨ã§ä½¿ã£ã¦ãããã¼ã«ã®ããã³ãã¨ã³ããªã©ãåãããã¨30以ä¸ã®ãã¼ã«ãããã¾ãã
éç¨ã§ä½¿ããã¼ã«ã¯ã¢ã©ã¼ã対å¿ãªã©ã§ãªãã£ã¹ã«ããªãæã§ãã©ãããã§ãã¹ãã¼ãã«è¦ããã¨å¬ããã§ãã
ç¹ã«ãµã¼ãã¼ã®ã¡ããªã¯ã¹ã¯ç§»åä¸ã«è¦ããã¨å¯¾å¿ãã¦ããã¡ã³ãã¼ã«ã¢ããã¤ã¹ãã§ãããé常ã«å©ããã¾ãã
ããã¾ã§ã¯ãªãã£ã¹ã®IPããã®ã¿ã¢ã¯ã»ã¹ã§ããããã«ãã¦ãããVPNæ¥ç¶ãããããsshã§ãã©ã¯ã¼ãã£ã³ã°ãããã®ã©ã¡ããããã¦ãã¾ããã
ããã§ã¯ç§»åä¸ã«ç°¡åã«è¦ãã¾ããããè¦ããããã«ãªãã¾ã§æéããããã¾ãã
ãªã®ã§é大ãããªã¢ã©ã¼ã対å¿ã«ç§»åä¸ã«ééããå ´åã¯ã¹ã¯ãªã¼ã³ã·ã§ãããSlackã§å
±æãã¦ããããªã©ãã¦ãã¾ããã
ä»ã¯ãã®ç ©ãããã解æ¶ããããã«å ¨ã¦ã®ãã¼ã«ãã¤ã³ã¿ã¼ãããããã¢ã¯ã»ã¹ã§ããããã«ãã¦ãã¾ãã
ãã¡ããèªè¨¼ããªãã¤ã³ã¿ã¼ãããã«å
¬éãã¦ãã¾ã£ã¦ã¯æ
å ±ã®æ¼æ´©ã«ãããªãã¾ããã
ã§ãã®ã§é©åã«èªè¨¼ãè¡ãå®å
¨ã«ã¤ã³ã¿ã¼ãããã®ã©ãããã§ãã¢ã¯ã»ã¹ã§ããããã«ãã¦ãã¾ãã
IPå¶éã®ãããªãã¨ãã
ã¨ã«ããæ´æ°ãå¿ãã¾ãã
è¤æ°ã®ãã¼ã«ãããã¨ä¸ç®æã«ã¾ã¨ãããã¨ãä¸å¯è½ã ã£ãããç´°ããå¶å¾¡ãè¡ãããã«ãã©ãã©ã«è¨è¿°ããããã¨ãããããã¾ãã
ããããã¨å¤§ä½ã©ããã®æ´æ°ãå¿ãã¾ãã
å¶éãããIPããã®ã¢ã¯ã»ã¹ã¯ç¡æ¡ä»¶ã§ä¿¡é ¼ã§ãããã®ã¨ãã¦æ±ã£ã¦ãã¾ããã¡ã¨ããåé¡ãããã¾ãã
ãªãã£ã¹ã«ãã端æ«ã¯å
¨ã¦ä¼ç¤¾ã«ãã管çããã¦ãã¾ããããã ãã§æ¬å½ã«å
¨ã¦ã®ã¢ã¯ã»ã¹ãä¿¡é ¼ã§ãããã®ã§ããããï¼
åããªãã£ã¹ã§ãé¨éãéãã°è¦ãã¦æ¬²ãããªãå ´åãããã¾ãã
IPå¶éã§ã¯ãã®ãã㪠誰ãã©ã®æ
å ±ã«ã¢ã¯ã»ã¹ã§ããã ãã³ã³ããã¼ã«ãããã¨ãã§ãã¾ããã
ã¾ããªãã£ã¹å¤ã®ç¹å®ã®å ´æããã®ã¢ã¯ã»ã¹ã許å¯ãããå ´åããã®å ´æãåºå®IPã«ãªã£ã¦ããå¿
è¦ãããã¾ãã
ããã¯å ´åã«ãã£ã¦ã¯é£ããæ¡ä»¶ã¨ãªãéç¨ã大å¤ã«ãªããã¨ããã°ãã°ããã¾ãã
ä»ã¾ã§ã®ãããã·
ä»ã¾ã§ããã¼ã«çãã»ãã¥ãªãã£ã°ã«ã¼ãã®å¾ãã§ç´æ¥æä¾ãã¦ããããã§ã¯ãªããä¸æ®µå¥ã®ãããã·ãæãæ§æã«ãªã£ã¦ãã¾ããã
ãã®ãããã·ã§IPå¶éãå®æ½ãã¦ãã¾ããã
ãã®ãããã·ã«èªè¨¼æ©è½ãããã°å®å ¨ã«ã¤ã³ã¿ã¼ãããã®ã©ãããã§ãã¢ã¯ã»ã¹ã§ãã¦ããããã§ãã
BeyondCorp
çãã㯠BeyondCorp ã¨ããåèªãèãããã¨ãããã¾ããï¼
BeyondCorpã¨ã¯Googleãæå±ãã¦ããã»ãã¥ãªãã£ã¢ãã«ã§ãã
ãªãã£ã¹ã®ãããã¯ã¼ã¯ã¯å®å
¨ããªãã£ã¹ã®ãããã¯ã¼ã¯ã ããå®å
¨ã¨ããåæãæ¨ã¦ã¢ã¯ã»ã¹å
ãä¿¡é ¼ããããã¤ã¹ãã¦ã¼ã¶ã®èªè¨¼ãè¡ããã¨ã§çµæçã«ã¦ã¼ã¶ï¼å¾æ¥å¡ï¼ã¯ã©ãããã§ãã¢ã¯ã»ã¹ã§ããã¼ã«å´ãããå®å
¨ã«ãªããã¨ãããã®ã§ãã
ãã®èãæ¹ã大ãã«åèã«ãã¦ããã®ãããªãããã·ã èªä½ãããã¨ã«ãã¾ããã
èªä½ããªãå ´å
å®ã¯ãã®ãããªãããã·ã¯èªä½ããªãããããã¯å®è£ éãå¤§å¹ ã«æ¸ããã¦ãå®ç¾ãããã¨ãã§ãã¾ãã
ä¾ãã° nginx ã® ngx_http_auth_request_module ã¯ãããã·é¨åã大å¹
ã«ç°¡åã«å®è£
ã§ããã§ãããã
ãã®ãããªæ©æ§ã¯nginxã ãã§ã¯ãªãApacheãCaddy Serverã«ãããã¾ãã
ã¯ã©ã¦ãã®ããã¼ã¸ããµã¼ãã¹ã§å®ç¾ããã¨ããæ¹æ³ãããã¾ãã
GCPã§ããã° Cloud Identity-Aware Proxy ããAWSã§ããã° Application Load Balancer ã§å®ç¾ã§ããã§ãããã
ä»ã«ãOktaãæä¾ãããã®ãSaaSçãããã¾ãã
ã§ãããããã§ã¯æ±ããè¦ä»¶ãå ¨ã¦æºãããã¨ãã§ãã¾ããã§ããã
ãããã·ã®èªä½
ãã°ããåããèªè¨¼ãè¡ããããã·ã«ã¤ãã¦ã¯èãã¦ããã®ã§å®è£ ããã«ã¯ããã¿ã¤ãã³ã°ã¨ãããã¨ã§èªä½ãã¾ããã
å®è£ ããã«ããã£ã¦
- å ¨ã¢ã¯ã»ã¹ãTLSã§æå·åãã
- 権éã®ç®¡çã楽ã«ãã
- 人é以å¤ã®ã¢ã¯ã»ã¹ããµãã¼ããã
- èªè¨¼å±ã¯èªä½ããªã
ã®4ã¤ã¯å¿ ãå®ç¾ãããè¦ä»¶ã§ãã
ããã§ä»¥ä¸ã®ãããªèªä½ã®ãããã·ãå®è£ ãã¦ãã¾ãã
èªä½ãããã·ã®é¨åã¯L7ã®ãªãã¼ã¹ãããã·ã¨ãã¦æ¯ãèãããã©ã¤ãã¼ããããã¯ã¼ã¯å¤ã¸ãããã·ããéã¯ãã©ã¯ã¼ããããã·ãéãã¾ãã
ãã©ã¯ã¼ããããã·ã¯ã¢ãã¬ã¹ãåºå®ã«ããããã«å
¥ãã¦ãããããã¯ã¨ã³ãå´ã¯ãã®IPããã®ã¢ã¯ã»ã¹ã®ã¿è¨±å¯ããã°èªä½ãããã·çµç±ããã®ã¢ã¯ã»ã¹ã«çµãã¾ãã
ãã®ãã©ã¯ã¼ããããã·ã使ããã©ããã¯ãªãã¼ã¹ãããã·ã®è¨å®ã«è¨è¿°ãããã¨ãã§ããå¿
è¦ãªæã ã使ããã¨ãã§ããããã«ãªã£ã¦ãã¾ãã
èªä½ãããã·ã¯å ¨ã¦Goã§å®è£ ããã¦ããåã³ã³ãã¼ãã³ãã¨ãã«Kubernetesä¸ã§åä½ãã¦ãã¾ããï¼ããã¯ã¨ã³ãã®åãã¼ã«ã¯é¤ãï¼
SSL/TLS
ã¤ã³ã¿ã¼ãããã®ã©ãããã§ãã¢ã¯ã»ã¹ã§ããããã«ããã¨ãããã¨ã¯éä¿¡çµè·¯ãå ¨ã¦ä¿¡é ¼ã§ããªããã®ã§ãããããE2Eã®æå·åã¯å¿ é ã§ãã
æ代ã®æµãã¨ãã¦ãå¤ãã®ãµã¤ãã§SSL/TLSéä¿¡ãããããã«ãªã£ã¦ãã¦ããã®ã§ããã¯è¿·ããªãå¿ é è¦ä»¶ã§ãã
ã¾ãå ãã¦ãµã¼ãã¼è¨¼ææ¸ã®æ´æ°ã®èªååãå¿
é è¦ä»¶ã§ãã
ACMEãããã³ã«ã§å®¹æã«è¨¼ææ¸ã®çºè¡ã¨æ´æ°ãã§ããããã«ãªã£ãã®ã§æåãã対å¿ã§ãã¦ããã¨ãããã·èªä½ã®éç¨ã楽ã«ãªãã¾ãã
å¾è¿°ãã¾ããããã¼ã¸ããªãã¼ããã©ã³ãµã¼ã«ããTLSçµç«¯ã¯ä»åã¯ä½¿ãã¾ããã
èªä½ãããããã·ãæå·åã解ãå¿
è¦ãããã¾ãã
OpenID Connect
ã¦ã¼ã¶ã¼ã®èªè¨¼ã¯OpenID Connectã§è¡ããã¨ã«ãã¾ããã
èªè¨¼ããã¦ã¼ã¶ã¼ã®ç®¡çãå°ãã§ã楽ã«ããããã«ä¼ç¤¾ã®ã¢ã«ã¦ã³ã管çã¨ç´ä»ããããã§ãã
ç´ä»ãã¦ãã¾ãã°éè·ãããéã§ãç¹å¥ãªä½æ¥ãå¿
è¦ãªããä¸æ¬ã§ã¢ã¯ã»ã¹ãã§ããªããªãã¾ãã
æ¢åã®ãã¼ã«ã§ã¯èªåã§ã¢ã«ã¦ã³ã管çããã¦ãããéè·å¦çã®ç
©éããæ¼ããªã©ãæ°ã«ãªã£ã¦ãã¾ããã
ããã解決ããããã«ãOpenID Connectã«ããèªè¨¼ã¯å¤ãã¾ããã
RBAC
é¨ç½²ãªã©ä¼ç¤¾çµç¹ã権é管çã®ãã¼ã¹ã¨ãã¦ãã¾ãã¨çµç¹å¤æ´ã®ãã³ã«å¤§ããæ¹ä¿®ããå¿
è¦ãããç¾å®çã§ã¯ããã¾ããã
ä¸æ¹ä½ããã®ã¢ãã«ããªãå ´åã権é管çãç
©éã«ãªã£ã¦ãã¾ãæéãçµã¤ã«ã¤ã誰ãåãããªãã¨ããç¶æ
ã«ãªã£ã¦ãã¾ãã¾ãã
ããã§æ¨©é管çã«ã¯Role-based access control(RBAC)ãå®è£ ãã¦ãã¾ãã
人é以å¤ã®ã¢ã¯ã»ã¹
人éããã©ã¦ã¶ã§ã¢ã¯ã»ã¹ããå ´å㯠人éãèªè¨¼ ããã°ããã®ã§ããã¾ã§å¤§å¤ã§ã¯ããã¾ããã
ã§ããæã
ã®åº§å¸ã®è¿ãã«ã¯ã¡ããªã¯ã¹ã常ã«è¡¨ç¤ºãã¦ãããã£ã¹ãã¬ã¤ãããããã®ãããªãã·ã³ã§ã¯ã¢ã¯ã»ã¹ãã¦ãã人éãèªè¨¼ãããã¨ãã§ãã¾ããã
ä»ã«ãbotçããã°ã©ã ããã¢ã¯ã»ã¹ãããã¨ãååã«èãããã¾ãã
ãã®ãããªäººéãèªè¨¼ã§ããªãå ´åã¯ããã¤ã¹ã¨ãã¦èªè¨¼ãããã¨ã«ãã¾ããã
ã¯ã©ã¤ã¢ã³ã証ææ¸èªè¨¼ã§å®è£
ãããã¨ã§OpenID Connectã使ããªãèªè¨¼ãå®ç¾ãã¦ãã¾ãã
ãã ã大åã®ã¦ã¼ã¶ã¯ã¯ã©ã¤ã¢ã³ã証ææ¸èªè¨¼ã使ããªãã®ã§ãªãã¹ã証ææ¸ã®é¸æç»é¢çãè¦ããªãããã«ãä½è¨ãªã¯ãªãã¯çãããªãã¦ãæ¸ãããã«ãã¦ãã¾ãã
ããã¯ãããã·ãä»ãã¦ã¢ã¯ã»ã¹ããã®ããªãã©ã·ã®é«ãã¨ã³ã¸ãã¢ã ãã§ã¯ãªããã©ã®ãããªäººã§ã説æãªãã«ä½¿ããããã«ããããã§ãã
ãã®ããã«TLSã® Server Hello ã®å¾ã«éããã Certificate Request ã¡ãã»ã¼ã¸ã«CAã®Subjectãå
¥ãã¦ãã¾ãã
Subjectãå
¥ã£ã¦ããã¨æè¿ã®ãã©ã¦ã¶ï¼macOSã ã¨High Sierra以ä¸ã®Safari 12以ä¸ï¼ã§ããã°ã該å½ãã証ææ¸ãå
¥ã£ã¦ãªãå ´åä½ã表示ãããã®ã¾ã¾ç¶ç¶ãã¾ãã
ï¼è©¦ããéãã§ã¯ãã®ãããªæåããã¾ãããæ®æ®µTLSã¨ãã©ã¦ã¶ã®ä»æ§ãç´°é¨ã¾ã§è¿½ãããã¦ããããã§ã¯ãªãã®ã§ééã£ã¦ããå¯è½æ§ãããã¾ããä»ã«ãChromeãIEã»Edgeçã§ã試ãã¦ãã¾ãï¼
ããã§å¤§åã®ã¦ã¼ã¶ã«ã¯ã¯ã©ã¤ã¢ã³ã証ææ¸èªè¨¼ãããã¨ãããã¨ãç¥ãããªãã¦æ¸ã¿ã¾ãã
ï¼æ¥µä¸é¨ã®ã¦ã¼ã¶ã¯éä¿¡ããã£ããã£ãã¦Certificate Requestã¡ãã»ã¼ã¸ãçºè¦ããããããã¾ãããããããããªãã©ã·ããã人ã§ããã°ãã¡ãã®æå³ãå¯ãã¦ãããã ããã¨æå¾
ã§ãã¾ãããããã£ã¦æ°ãä»ãããã¨ãã¦ãåé¡ã§ã¯ããã¾ãããï¼
æ¬æ¥ã§ããã°ãã®ã¯ã©ã¤ã¢ã³ã証ææ¸èªè¨¼ã第ä¸ã®èªè¨¼æ¹æ³ã¨ãã¦ä½¿ãæ¹ããã¹ãã§ãããã
ãããã¢ã¯ã»ã¹ãã人ã®ããã¤ã¹ã«è¨¼ææ¸ãå
¥ããããã管çããªãã¨ãããªãã¨ãã大å¤ããèæ
®ããããããã©ã¤ããªã®èªè¨¼æ¹æ³ã¨ãã¦ãã¾ããã
èªè¨¼å±ãå®è£
ãããã¯ãªãã£ãã®ã§ããããã°ããã¯ä»æ¹ããã¾ããã
ã¯ã©ã¤ã¢ã³ã証ææ¸èªè¨¼ã«éãèªè¨¼å±ãå®è£
ãã¦ãã¾ãã
Webhook
ãã®ãããã·ã¯GitHubã®Webhookãéãã¾ãã
Webhookã®å ´åãã¯ã©ã¤ã¢ã³ã証ææ¸èªè¨¼ãã§ããªãã®ã§ããã ãã¯ãããã¼ã®ç½²åãæ¤è¨¼ãããã§ã¢ã¯ã»ã¹ã許å¯ãã¦ãã¾ãã
Webhookã¯ç¹å®ã®ãã¹ã«ããããªãã®ã§ãããã¼ã®ç½²åãæ¤è¨¼ãã¦ã¢ã¯ã»ã¹ã§ããã®ã¯ãã®ãã¹ã ãã«éå®ãã¦ãã¾ãã
ãã®ããã·ã¼ã¯ã¬ãããæ¼ãä»»æã®ç½²åãä½ããããã«ãªã£ãã¨ãã¦ãWebhookã®ã¨ã³ããã¤ã³ãã®ã¿ãã¢ã¯ã»ã¹ã§ããããã«ãªãã ãã§ãã
ãã ããã®ã¨ã³ããã¤ã³ãã«èå¼±æ§ããããä»»æã®æ
å ±ãæãåºãããããããããã¾ããã
ãã®å ´åãWebhookã®ã¨ã³ããã¤ã³ãã«ã¢ã¯ã»ã¹ã§ããéããªã¹ã¯ãæé¤ã§ããªãã®ã§ããã¯å©ä¾¿æ§ãåããã®ãªã¹ã¯ã¯åãå
¥ãã¦ãã¾ãã
SSH
ãµã¼ãã¼ã«SSHã§ãã°ã¤ã³ãã¦è¡ãä½æ¥ã¨ããã®ã¯ãªããªããªããã¾ãããã¢ã³ã¹ãã«ããã£ã±ãããã¾ãã
ãªããã¦ããæ¹ãããã®ã¯ééããªãã®ã§ããå®å
¨ã«ãªããã«ã¯ã¾ã ãã°ããæéãããããã¨ã§ãããã
ããã¾ã§ã®éãSSHããããã·ãéãã¦ã¤ã³ã¿ã¼ãããã®ã©ãããã§ãã¢ã¯ã»ã¹ã§ããããã«ãªã£ã¦ããæ¹ã便å©ã§ãã
ããã§SSHããããã·ãéãããã«ãã¾ããã
ãã®ä»çµã¿ã«ã¤ãã¦ã¯èª¬æããã¨ããªãé·ããªãã®ã§å²æãã¾ãããã¦ã¼ã¶ã¼ã¯ãã¼ã«ã«ã«CLIãã¼ã«ãã¤ã³ã¹ãã¼ã«ãããã¨ã§SSHããããã·ãéãã¦ã¤ã³ã¿ã¼ãããã®ã©ãããã§ãè¡ããã¨ãã§ããããã«ãªãã¾ãã
CLIãã¼ã«ã®ã¤ã³ã¹ãã¼ã«ã¯Goã§æ¸ããããã¤ããªãä¸ã¤ã ããªã®ã§ãã¹ã®éã£ãã¨ããã«ç½®ãã ãã§ããç°¡åã§ãã
å°å ¥ããå¾ã®å¤å
ã©ãããã§ããã¼ã«ã«å¹³çã«ã¢ã¯ã»ã¹ã§ããã¨ããã®ã¯èãã¦ãã以ä¸ã«å¿«é©ã«ãªãã¾ãã
èªåãä»ã©ãã®ãããã¯ã¼ã¯ã«ç¹ãã£ã¦ããã®ãèããªãã¦ããããªãã¾ãã
Slackã§å
±æããããªã³ã¯ããã®ã¾ã¾ä½ãããã«éãã¾ãããããèªè¨¼æ
å ±ã®æå¹æéãåãã¦ãããèªè¨¼ç»é¢ã¸ãªãã¤ã¬ã¯ããããã®å¾ã¡ããã¨æ»ã£ã¦ãã¾ãã
èªä½ã®ãã¼ã«ã¯èªè¨¼æ©æ§ããããã·ã«å
¨ã¦é ããããã®ããã¼ã«å´ã®å®è£
ãå°ãªãã¦æ¸ãã®ã§ä¾¿å©ã§ãã
ãããã·ããã¦ãããªã¯ã¨ã¹ãã®ãããã¼ã«ã¯ã¦ã¼ã¶ã¼ã®æ
å ±ãä»å ããã¦ãããããããã³ã¼ãããã°ãã®ã¾ã¾ä½¿ããã®ã§ãã¾ãé£ãããã¨ãèããªãã¦ãæ¸ã¿ã¾ãã
ï¼ãããã¼ã®ç½²åãæ¤è¨¼ããã«ã¯ãããªãã«ç¥èãå¿
è¦ã§ããããã«ã¦ã§ã¢çã§1åå®è£
ããã°ä½¿ãã¾ããã¾ãï¼
ã¾ã¨ã
社å
ãã¼ã«ã«ã¤ã³ã¿ã¼ãããã®ã©ãããã§ãã¢ã¯ã»ã¹ã§ããããã«ããããã®å·¥å¤«ã«ã¤ãã¦ç°¡åã«ãç´¹ä»ãã¾ããã
ãããã·ã®å®è£
ã®è©³ç´°ã説æãã¦ããã¨ã¨ã¦ãé·ããªã£ã¦ãã¾ãã¾ãã®ã§ä»åã¯ç°¡åãªç´¹ä»ã«ã¨ã©ãã¾ãã
ã»ãã¥ãªãã£å¯¾çã ããã¨ãã£ã¦å©ä¾¿æ§ãè½ã¨ãã¦ãã¾ãã¨ã¦ã¼ã¶ã¼ã¯ããããã¤ãã¹ããæ¹æ³ãè¦ã¤ãã¦ãã¾ã£ãã使ããªãæ¹åã«åãåãã¦ãã¾ãã¾ãã
ãªã®ã§ å©ä¾¿æ§ãåä¸ããã»ãã¥ãªãã£ãåä¸ããã ãã¨ã大äºã ã¨æããããå®ç¾ã§ããããã«å®è£
ããããæ°ãã¤ãã¦ãã¾ãã
ãããã·ã®å
é¨ã§ããããªãã«é¢ç½ããã¨ããã£ã¦ãã¾ããããããã·å
¨ä½ã¨ãã¦ããããªãã«é¢ç½ããã®ã«ãªãã¤ã¤ããã®ã§ã¯ãªãããªã¨æã£ã¦ãã¾ãã
æ´ã«æ·±ãé¨åã§ã®å·¥å¤«ã¨ãã¯ãã¤ãã©ããã§ã話ããæ©ä¼ãããã°ãç´¹ä»ãããã¾ãã