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

サーバ構成管理について

 サーバ構成管理について

Yusuke Matsuura

July 06, 2016
Tweet

More Decks by Yusuke Matsuura

Other Decks in Programming

Transcript

  1. どのように書くの? describe service('h-pd') do it { should be_enabled } it

    { should be_running } end 3VCZͰར༻͞Ε͍ͯΔ3TQFDͷه๏Ͱॻ͚ ·͢ɻ ·ͨςετ͸44)઀ଓΛ͓͜ͳ࣮ͬͯࡍͷՔ ಇαʔόʹରͯ͠ઃఆνΣοΫΛߦ͍·͢ɻ
  2. •  JQpMUFS •  JQOBU •  JQUBCMFT •  LFSOFM@NPEVMF •  MJOVY@BVEJU@TZTUFN

    •  MJOVY@LFSOFM@QBSBNFUFS •  MYD •  NBJM@BMJBT •  NZTRM@DPOpH •  QBDLBHF •  QIQ@DPOpH •  QPSU •  QQB •  QSPDFTT •  SPVUJOH@UBCMF リソースタイプ •  CPOE •  CSJEHF •  DHSPVQ •  DPNNBOE •  DSPO •  EFGBVMU@HBUFXBZ •  EPDLFS@DPOUBJOFS •  EPDLFS@JNBHF •  pMF •  HSPVQ •  IPTU •  JJT@BQQ@QPPM •  JJT@XFCTJUF •  JOUFSGBDF •  JQUBCMFT •  TFMJOVY •  TFMJOVY@NPEVMF •  TFSWJDF •  VTFS •  Y@DFSUJpDBUF •  Y@QSJWBUF@LFZ •  XJOEPXT@GFBUVSF •  XJOEPXT@SFHJTUSZ@LFZ •  ZVNSFQP •  [GT
  3. •  HMJCDͷ੬ऑੑ͕ݟ͔ͭͬͨޙʹςετΛ ௥Ճ テストを追加したケース # CVE-2015-0235 describe command("curl -fsSL https://example.com/GHOST.c

    | gcc - o /tmp/GHOST -xc - ; /tmp/GHOST") do it { should return_stdout /not vulnerable/ } end # CVE-2015-7547 describe package("glibc") do glibc = "2.17-106.166.amzn1" glibc = property['glibc'] if property['glibc'] it { should be_installed.with_version(glibc) } end
  4. •  TTMͷ੬ऑੑ͕ݟ͔ͭͬͨޙʹςετΛ௥ Ճ テストを追加したケース # CVE-2015-1793 ( for Amazon Linux

    package https:// alas.aws.amazon.com/ALAS-2015-564.html ) describe package("openssl") do it { should be_installed } it { should_not be_installed.with_version("1.0.1k-10.86.amzn1") } end
  5. •  &$$MBTTJDͰىಈ͍ͯ͠ΔΠϯελϯ εͷ$MBTTJD-JOLઃఆΛνΣοΫ͢Δ テストを追加したケース describe ec2('i-11111111') do it { should

    have_classiclink(vpc-22222222) } it { should have_classiclink_security_group(sg-33333333) } it { should have_classiclink_security_group(sg-44444444) } it { should have_classiclink_security_group(sg-55555555) } end
  6. •  ՔಇதαʔόʹӨڹΛ༩͑ͣςετ͢Δ͜ͱ͕Ͱ ͖·͢ •  αʔόߏ੒ΛίʔυͰ؅ཧ͓ͯ͘͠ͱઃఆ͕೺Ѳ ͠΍͍͢ •  ςετۦಈͰαʔόߏங͍ͯ͘͠ͷ͸ͳ͔ͳ͔೉ ͍͠ • 

    αʔόͷߏஙɺϝϯςφϯεʹΑΔఀࢭ͕ࣗ৴ ࣋ͬͯߦ͑ΔΑ͏ʹͳΔ •  ౓ൃੜͨ͠໰୊ʹର͢ΔςετΛ௥Ճ͍ͯ͘͠ ͜ͱͰ͏͔ͬΓϛεΛ๷͛Δ まとめ