Effective Firestore Security

Effective Firestore Security

Cookpad Tech Kitchen #16 コメルコテックバナシ〜新規事業開発のリアル〜
https://cookpad.connpass.com/event/92325/
での登壇資料です。
---------------------------
Firestoreのrulesのサンプルコードは
https://github.com/sgr-ksmt/firebase-ec-demo
に公開しています

47addc68d5b643d7ee875059b42404eb?s=128

Suguru Kishimoto

July 19, 2018
Tweet

Transcript

  1. 2.

    Cookpad Inc. All Rights Reserved. ͸ͬͽΐ͏͢Δͻͱ w,PNFSDPͰΤϯδχΞ͍ͯ͠·͢ w։ൃॳظ͔Βݱࡏ΋ wJ04ͱ'JSFCBTFͷೋ଍ͷΘΒ͡ wΫοΫύουʹೖࣾͯ͠ϲ݄͘Β͍

    w4/4తͳ΋ͷ w5XJUUFS!THS@LTNU@EFW w(JU)VCTHSLTNU w'JSFCBTFʹؔͯ͠هࣄॻ͍ͨΓϒϩάॻ͍ͨΓ w2JJUBIUUQTRJJUBDPNTHSLTNU w#MPHIUUQTUFDICMPHTHSLTNUPSH
  2. 18.

    Cookpad Inc. All Rights Reserved. ى͜Γ͏Δࣄ wಡΈग़͠ w೚ҙͷ%#ͷ৘ใΛಡΈऔΒΕͯ͠·͏ wඇެ։ʹ͍ͯ͠Δ͸ͣͷσʔλΛऔಘ͞Εͯ͠·͏
 wॻ͖ࠐΈ

    wಛఆͷEBUB pFME͕ॻ͖׵͑ΒΕͯ͠·͏ wαʔϏεͰҙਤ͠ͳ͍pFME͕ॻ͖ࠐ·Εͯ͠·͏ wಛఆͷpMF͕ҙਤ͠ͳ͍pMFʹ্ॻ͖͞Εͯ͠·͏
  3. 22.

    Cookpad Inc. All Rights Reserved. ͳʹ͕·͍ͣͷ͔ w'JSFCBTFϓϩδΣΫτͷ8FC"1*LFZΛجʹ֤छػೳͷ3&45"1* ͕ୟ͚Δ w'JSFCBTFͷ"VUI͸3&45"1*ͰϢʔβʔ࡞੒ͨ͠Γ΋Ͱ͖Δ w

    IUUQTpSFCBTFHPPHMFDPNEPDTSFGFSFODFSFTUBVUITFDUJPOTJHOJO BOPOZNPVTMZ w$MPVE'JSFTUPSF͸3&45"1*Ͱୟ͚Δ w IUUQTpSFCBTFHPPHMFDPNEPDTpSFTUPSFVTFSFTUBQJ IMKB
  4. 42.

    Cookpad Inc. All Rights Reserved. SVMFTͷγϛϡϨʔλ w1SPT wSVMFTͷEFQMPZલʹಈ࡞Λͬ͞ͱ֬ೝͰ͖Δ w%#ʹ͸࣮ࡍʹॻ͖ࠐ·Εͳ͍ͷͰԚછ͢Δ͜ͱ΋ͳ͍ wطଘͷ%#ΛಡΈग़ͯ͠νΣοΫ͢Δ͜ͱ΋Մೳ

    w$POT wݱঢ়ɺਖ਼͘͠ಈ͔ͳ͍৚݅΋͋ΔͷͰɺશͯΛ໢ཏతʹγϛϡϨʔτ͔ͯ֬͠ ΊΔͷʹ͸ෆ޲͖ wӨڹൣғͷ޿͍ॻ͖׵͑ͱ͔͢ΔͱγϛϡϨʔλʹͯ͠΋BQQͰ֬ೝʹͯ͠΋ ਓͷखͰ͔ͭͭ֬Ί͍ͯ͘ͷ͸ඇݱ࣮త
  5. 45.

    Cookpad Inc. All Rights Reserved. %FWFMPQNFOU 5FTU $ yarn run

    firebase use test $ yarn run firebase deploy --only firestore:rules $ yarn run test 13 NBTUFSϒϥϯν΁ͷ Ϛʔδ࣌ʹςετΛ࣮ߦ $ yarn run firebase use development $ yarn run firebase deploy …