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

金融機関の(システムの)作り方

free_world21
December 13, 2019

 金融機関の(システムの)作り方

https://ginza-rails.connpass.com/event/155467/
銀座Rails#16 @リンクアンドモチベーション
で発表したスライドです。

free_world21

December 13, 2019
Tweet

More Decks by free_world21

Other Decks in Technology

Transcript

  1. ▪ ±ľ cLv 35 ▪ „: ƇĪ ½2lIz_ĿŇàÐ ▪ Œ„:

    jxOtm – RVGMLP?8P>E3 – ÎVQYi ▪ 2008: hu tzVLzUaG/"-į¢ – flash/C#/rails/iOS/Android ▪ 2009: |¸ëŅŧ çÔ²é¸ŅĈ ▪ 2009: IPAŐœˆ„2ōŬ!CB ▪ 2016: LotZòă~‰2Čÿ ▪ 2018: ”‰ű†Ĕ© ▪ 2019: hu tzV~‰©/"-÷¹€ @free_world21
  2. LotZòă~‰ ▪ 2016}Ũ„ ▪ ‡×Ÿ.3„Ĺ3ńİD"1„Ĺ4ф – 2017: EMERADA EQUITY ▪

    уĹĊûàŪć»Ů„Š ‡×ēþ»Ë„Š – 2018: EMERADA BANK ▪ ş‡„Š – 2019: EMERADA MARKETPLACE ▪ à£ÚŖ·†„ 2Ŕ
  3. ‡×„4čÀ„ ▪ ūŕÀ – hÙÒŸ - ,z–0Æ%w¦“¬!W] , – }WV}Wh

    – o©Vo©Vh ▪ ńİÀ – hÙÒ - ,z–0Æ**W]!ÇÁ0‡¤ !  – ž³VX®£v†h – ×XV×XVh – ”dfŽÒtWV}Wh – à¾g˝ÈVmXfŽh
  4. ðʄDĬ2Ĥ¦"8$ ▪ ‡×ēþ»Ë§ ▪ ‡×ēþ»Ë§ü†ť ▪ ‡×ēþ»Ë§ü†čŘ ▪  ▪

    Ø~čŘ ĥ ý Ō « › https://www.fsa.go.jp/common/law/guide/kinyushoh in/index.html
  5. ;3$ ů28/:8$ ▪ ºó¿æ›1Ð – §a ޚ'—‹0[-,S0ç+#( ƒµ¸q – §z—‹'ޚÀ¹S—‹

    ëè0,` ▪ ĵijŢè3?1jxXVDğŤ"8"> ▪ '3ƀš;*<E/ę"8"> – z—‹!æÑn00ì ¸q0ßÖ#( ▪ çÔ/”#ŽÄ2*<ž¬ – ÝÅ zޚ0,`!ID/Passˆ ˜ž%#( OTP ▪ Ŋºó¿æ›1Ð – U`G25N ´Ä0ßÖ#( – Ï.O:0 #( – ^ ceT _Œ ’Õ²Ðá0#( – OS'IDN673 ïۀº~#( – u…39@? ã^•™Ì$#( – ­Í°â « ) #( ▪ '3Ŏ – j\B?Cœr‘¥0 +Ók|0Yc&1·Ø#( – ½ #  ¶*éÃÝÅ'x±pÜ#( – j\eÊ!¢eÊ),Zyb‚•ª„0#( – ;PB4P>7P=HLP0ŒaåÓ0#(
  6. 4,3RailsjxUKN_ userrails adminrails DB common_models common_models useröcontrollers admin_models useröviews adminöcontrollers

    adminöviews rails Žšł_models Žšłcontrollers ŽšłDB ▪ user³railsGju ▪ admin³railsGju ▪ common engine ▪ ŽšłrailsGju database - common_comments - common_posts - common_users - ads - admin_users - payments
  7. ŸŔ¯2,- AWS KMS ▪ Customer Master KeyCMKDܚ"-data key ž"ŸŔƃ D¿ê$

    B – A ▪ Í¥3;3KMS@Ģ+-B – A: ‰¡ æÑì – B: A æÑn-% ▪ A.ŸŔ¯"-'C4ĚĺBDDB102°Ľ"- ▪ BDKMS2Ó,B/īŔ¯"-Ģ"-CB ADå@CB 3.^ Y «DA.īŔ¯$B CMK has_many :data_keys
  8. Űą›2Ů( ▪ attr_encrypted /gemŠÒ)+( ▪ ċmodel3attributeDŰą›2ŮB personal_info.first_name = ”cLv” personal_info.last_name

    = “±ľ” personal_info.save! personal_info = PersonalInfo.find(1) puts personal_info.first_name # => “cLv” puts personal_info.last_name # => “±ľ”
  9. áŶ³d[Tq ▪ ŸŔ¯"( && áŶ;"( => áŶ³2Hash¯"(ıDý] iv.°Ľ ▪ ŸŔ¸›Hash¡Ì4/A%BCrypt,+/.

    ▪ after_save /.PersonalInfo3wQ `/ƒŴ2ìB3ě/ñ Class PersonalInfo has_many :personal_info_hashes after_save :save_hashes def save_hashes save_name_hash save_tel_hash save_address_hash …… end def save_name_hash raw_value = last_name + first_name pi_hash = personal_info_hashes.find_or_initialize_by(field_name: 'last_name_and_first_name') pi_hash.hash_value = BCrypt::Engine.hash_secret(raw_value, ENV['HASH_SALT']) pi_hash.save! end
  10. Ş 3 ŀ ▪ ºó¿æ›1Ð – §a ޚ'—‹0[-,S0ç+#( ƒµ¸q –

    §z—‹'ޚÀ¹S—‹ ëè0,` ▪ ĵijŢè3?1jxXVDğŤ"8"> ▪ '3ƀš;*<E/ę"8"> – z—‹!æÑn00ì ¸q0ßÖ#( ▪ çÔ/”#ŽÄ2*<ž¬ – ÝÅ zޚ0,`!ID/Passˆ ˜ž%#( OTP ▪ Ŋºó¿æ›1Ð – U`G25N ´Ä0ßÖ#( – Ï.O:0 #( – ^ ceT _Œ ’Õ²Ðá0#( – OS'IDN673 ïۀº~#( – u…39@? ã^•™Ì$#( – ­Í°â « ) #( ▪ '3Ŏ – j\B?Cœr‘¥0 +Ók|0Yc&1·Ø#( – ½ #  ¶*éÃÝÅ'x±pÜ#( – j\eÊ!¢eÊ),Zyb‚•ª„0#( – ;PB4P>7P=HLP0ŒaåÓ0#( ▪ ºó¿æ›1Ð – Rails.roleºóD­ř – ĵijèðºóD­ř ▪ ĵij/Ţè.B34ý3role ▪ Ɓ,0²ĉ.Ţèŕđ"(;°Ľ – AWS KMS/attr_encrypted gem.ŸŔ¯"-DB2°Ľ – •‚‡=Ó®­†˜3»ËfVy `ºóD­ř ▪ Ŋºó¿æ›1Ð – tmpfsDõ+-carrierwave gemƒ˜›2hFIvDĀŽÄ4tmpfsœ/$B – AWS3ċQzl bz_3xOD°Ľ – WAF=security groupcontainer¯DB3CB] ivDŹB – š¼›2IzVYzV /Ł$ ('-')╮ =͟͟͞͞!⸉ – WAF.ňǛ2E5A8$" – Autoscaling ▪ '3Ŏ – ċĹª\ vDżħ+-õ – Lt k UDCDN.ġÉ"-ĩ;C1/ˆĜ4 Ŝ – """ – Terraform2?BIzht3Q `¯ŷś4"""
  11. ƅÐĠ2)"-ƈ9(†‘ùŵ ▪ B{ďĻĂ ’÷¾´Ė… 3â3¥Í¥3?1ƂùôċÖÙÕÊď…Ɖ 2ĝ@CB ▪ 3. ĸĦ3ßĒãĄ –

    1¼Ú îÒ – 5äíÒ https://www.npa.go.jp/laws/notification/seian/ hoan/hoan20180921-1.pdf
  12. 8/:Ćý1/4ĩ;"-1 ▪ čÀ„¥2BR gV3ú:— ▪ §›¿æ3µ7—Ŧ9— ▪ 'C2–$B ŀĬ3 źĮ

    – §¢!,¨z!/+UÔb011  – s›Éê¿Â600l5J> ▪ î  – rspecDBOA90B?C,Š – RubybinaryF?,Š – Railsserverless¯»100{K<0"Š ŻĴ~.4Æŝ2Ġ-)!# https://github.com/f-world21/encryption_sample