Upgrade to Pro — share decks privately, control downloads, hide ads and more …

knockrd / kichijojipm23

knockrd / kichijojipm23

FUJIWARA Shunichiro

July 21, 2020
Tweet

More Decks by FUJIWARA Shunichiro

Other Decks in Technology

Transcript

  1. ͳͥ VPN ͕ඞཁ͔ 1. ࣾ಺ωοτϫʔΫͷαʔόʹΞΫηε͢ΔͨΊ • ࢓ํͳ͍ • Ͱ΋ฐࣾʹ͸΋͏΄΅ଘࡏ͠ͳ͍ (AWS,

    G Suite...) 2. ֎෦ͷαʔό͕઀ଓݩIPΞυϨεΛ੍ݶ͍ͯ͠Δ • Θ͔Δ • Ͱ΋ਏ͍ɻͰ͖Ε͹΍Ί͍ͨ
  2. nginx auth_request ͱ૊Έ߹ΘͤΔ 1. /allow ΛͳΜΒ͔ͷํ๏(OAuthͱ͔)Ͱอޢ 2. POST /allow →

    IPΞυϨεΛ DynamoDB ʹه࿥ 3. ଞͷ URL ͷΞΫηεͰ͸ nginx auth_request ͕ GET /auth 4. DynamoDB ʹ͋ΔIPΞυϨεͳΒ 200 OK 5. ͳ͔ͬͨΓ Expire ͢Δͱ 401 Unauthorized
  3. AWS WAFv2 / SecurityGroupͱ૊Έ߹ΘͤΔ 1. /allow ΛͳΜΒ͔ͷํ๏(OAuthͱ͔)Ͱอޢ 2. POST /allow

    → IPΞυϨεΛ DynamoDB ʹه࿥ 3. DynamoDB Stream ͔Β Lambda ͕ىಈ 4. WAF IP Set / Security Group ʹ IPΞυϨεΛొ࿥ 5. Disallow / Expire ͢Δͱ Lambda ͕ىಈ 6. WAF IP Set / Security Group ͔Β IPΞυϨεΛ࡟আ