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

delivering_security_products.pdf

ShaD
October 15, 2018

 delivering_security_products.pdf

Delivering security products without shooting in a foot

Talk about improving the infrastructure for developing, testing and delivering security tools. Our experience of smoothing the difference between security idealism and engineering friendliness.

ShaD

October 15, 2018
Tweet

More Decks by ShaD

Other Decks in Programming

Transcript

  1. We will talking about: — Approaches, not instruments — CI/CD

    — Infrastructure — Workflow — Usability
  2. What is the problem? Security teams create complex security products,

    developers want to have an easy way to use them
  3. Why developing is so hard? — ingenious ideas — chaotic

    strategy changing — do not care about compatibility — testing in hothouse conditions — hard to deploy — hard to use properly
  4. Our company specific: — we create crypthographic products — compact

    size of team — mostly engineering staff — horizontal structure — open-source products — multiple languages / platforms
  5. What is critical for us? — automation — clear, transparent

    processes — responsibility — openness — safety — use own products — write docs
  6. Let's divide solution into the parts: — architecture — workflow

    standards and rules — infrastructure — CI/CD
  7. — on what platforms should our application work? — how

    many and what are the types of the components? — usability bounds of the different components? — what are the possible topology variants?
  8. — how will they communicate? — how do we plan

    to scale? — what external dependencies will the product have? — what are possible vulnerabilities and risks in the planned architecture?
  9. What are the external systems and how do we plan

    to integrate with? — basic functional systems — an application in which we integrate — databases — libraries — auxiliary systems — monitoring — SIEM
  10. Logging — events — human-readable — standard output methods Formats

    and outputs File STDERR Syslog Plain text ✔ ✔ - JSON ✔ ✔ ✔ CEF ✔ ✔ ✔ syslog - - ✔
  11. Tracing — detail analyze of successive data processing — intrusion

    detection — performance tuning — deep debugging Output — OpenTracing — OpenCensus — JSON
  12. How will it be supported? — fast deploy scripts —

    troubleshooting information gathering tools
  13. Workflow standards and rules — synchronize all team members —

    unify approaches — make the development results more expected and clear for our customers — simplify automation
  14. The rules must: — be as simple and clear as

    possible — be kept actual — have a minimal impact on productivity — only correct, not break existing workflow
  15. Versioning Semantic Versioning https://semver.org Format: a.b.c, where: a — major

    version, increases with significant changes of product b — minor version, increases with current releases, backward compatibility may not be guaranteed c — build version, increases with bug hotfixes, minor features' improvements
  16. Git flow and CI/CD Name Usage CI/CD automation stable Releases

    all tests, packaging, delivering master Current state all tests, packaging, delivering username/ GH999_issue_des c Dev, fixes manual
  17. Infrastructure Part Requirements core safety, stable developing speed up, easy

    cross- communications CI/CD full automation, tests, packaging, delivery
  18. Buildbot — unit tests — multiple platforms — crossplatform tests

    — integration tests — pre-release checks — packages building
  19. CI/CD rules — emulate real customer environment — use system

    libraries — strict configurations — scenarios according to docs — easily maintained and extended — developers can add scenarios
  20. Docker image sizes — large image size is typical —

    most developers do not pay attention to the size — there are ways to significantly reduce the image — we reduced the size from ≈950MB to ≈15MB
  21. What technologies did we use? — multi-stage builds — build

    from scratch You can find all dockerfiles at: https://github.com/cossacklabs/acra/tree/master/docker
  22. Image tags Static tags — version tag — git commit

    tag Sliding tags — stable, latest — master, current
  23. What was uncomfortable? — generate and manually place keys —

    configure parameters inside docker-compose file manually — one very simple example of configuration — topology was unclear — security perimeter was not visible
  24. What now? — multiple demonstation stands — all stands can

    be launched in one action — confiurations can be easily extended and secured * — self-documented — topology described
  25. Summary — complex security products require careful and accurate handling

    — iplemented standards — built large testing platform — release cycle: from once a year to once a couple weeks — from burst developing to planned releases — increased flexibility of our team — from concept researching to implementing usable features