All Articles

Caddy๋ฅผ ์ด์šฉํ•ด์„œ AWS Elasticsearch์— ๊ฐ„๋‹จํ•œ ์ธ์ฆ์„ ๋ถ™์ด๊ธฐ

AWS ES ์— ์ธ์ฆ์„ ๋ถ™์ด๊ณ  ์‹ถ์€๋ฐ, IAM ๊ฐ™์€ ๊ฑธ ์“ฐ๋Š”๊ฑด ๋ณต์žกํ•˜๊ณ  ์•„์ด๋””๋‚˜ ๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ์จ์„œ ์ธ์ฆ์„ ํ•˜๊ณ  ์‹ถ์„ ๋•Œ.

Caddy ๋กœ ๊ทธ๋ƒฅ proxy ๋ฅผ ๋ถ™์ด๋ฉด basicauth ๋•Œ๋ฌธ์— ์ƒ๊ธด Authorization Header ๊ฐ€ AWS ES ์— ๊ทธ๋Œ€๋กœ ๋“ค์–ด๊ฐ€์„œ ์—๋Ÿฌ๊ฐ€ ๋‚œ๋‹ค.

kibana.hyeungshikjung.com {
     gzip
     basicauth / id pass
     proxy / https://search-lol-rcx7zrououmaytn3wngmyy7bwm.ap-northeast-2.es.amazonaws.com/_plugin/kibana/ {
       transparent
     }
 }

์—ญ์‹œ๋‚˜ ๋ˆ„๊ตฐ๊ฐ€ GitHub Issue#1508๋ฅผ ๋‚จ๊ธฐ์…”์„œ ์ž˜ ๋”ฐ๋ผํ–ˆ๋‹ค. ์ด๋Ÿฌ๋ฉด Authorization ํ—ค๋”๋Š” ๋”ฑ Caddy ์—์„œ ์ธ์ฆ์šฉ์œผ๋กœ๋งŒ ์‚ฌ์šฉ๋˜๊ณ  AWS ES ๊นŒ์ง€ ์ „๋‹ฌ๋˜์ง€ ์•Š๋Š”๋‹ค.

kibana.hyeungshikjung.com {
     gzip
     basicauth / id pass
     proxy / https://search-lol-rcx7zrououmaytn3wngmyy7bwm.ap-northeast-2.es.amazonaws.com/_plugin/kibana/ {
         header_upstream -Authorization
     }
 }

์˜ค๋Š˜๋„ ๋‚จ๋“ค ๋•๋ถ„์— ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ–ˆ๋‹ค -0-

Published Apr 20, 2018

If I keep marking the dots, someday they will ๐Ÿ”—๐Ÿ”—