secure by default web applications with apache sling
play

Secure by Default Web Applications With Apache Sling Robert - PowerPoint PPT Presentation

Secure by Default Web Applications With Apache Sling Secure by Default Web Applications With Apache Sling Robert Munteanu, Adobe Systems ApacheCon Core 2016 http://robert.muntea.nu @rombert Who I am $DAYJOB Open Source Adobe


  1. Secure by Default Web Applications With Apache Sling Secure by Default Web Applications With Apache Sling Robert Munteanu, Adobe Systems ApacheCon Core 2016 http://robert.muntea.nu @rombert

  2. Who I am  $DAYJOB  Open Source  Adobe Experience  Apache Sling Manager  MantisBT  Apache Sling  Mylyn Connector for MantisBT  Apache Jackrabbit  Mylyn Connector for Review  Apache Felix Board http://robert.muntea.nu @rombert

  3. Purpose of the talk Scope Cost Schedule http://robert.muntea.nu @rombert

  4. Purpose of the talk Scope Cost Schedule http://robert.muntea.nu @rombert

  5. Purpose of the talk Scope Cost Schedule http://robert.muntea.nu @rombert

  6. Agenda ● Apache Sling ● Demo application review ● Threat model ● Security with Apache Sling ● Demo ● Conclusion ● Q&A http://robert.muntea.nu @rombert

  7. Apache Sling – Brief History 200x 2007 2009 2015 Pre-Apache Incubation TLP Version 8 http://robert.muntea.nu @rombert

  8. Apache Sling – Code Statistics http://robert.muntea.nu @rombert

  9. Apache Sling – Contributor activity http://robert.muntea.nu @rombert

  10. Apache Sling – Value proposition ● Content-oriented ● RESTful ● Lightweight ● Integrated authentication and authorization ● OSGi-powered ● Scripting inside ● Easily deployable http://robert.muntea.nu @rombert

  11. Apache Sling – Content-Oriented Blog posts Images Users and Groups http://robert.muntea.nu @rombert

  12. Apache Sling – Content-Oriented Server-side templates and scripts Configurations http://robert.muntea.nu @rombert

  13. Apache Sling – RESTful ↵ $ h t t p l o c a l h o s t : 8 0 8 0 / c o n t e n t / b l o g / p o s t s / h e l l o _ w o r l d . h t m l j s o n x m l t x t p d f p h p 3 http://robert.muntea.nu @rombert

  14. Apache Sling – RESTful http://robert.muntea.nu @rombert

  15. Apache Sling – Persistence via JCR http://robert.muntea.nu @rombert

  16. Apache Sling – Topologies Standalone High Availability http://robert.muntea.nu @rombert

  17. Agenda ● Apache Sling ● Demo application review ● Threat model ● Security with Apache Sling ● Demo ● Conclusion ● Q&A http://robert.muntea.nu @rombert

  18. Demo App – main page http://robert.muntea.nu @rombert

  19. Demo App – Article Page http://robert.muntea.nu @rombert

  20. Demo App – Submitting comments http://robert.muntea.nu @rombert

  21. Agenda ● Apache Sling ● Demo application review ● Threat model ● Security with Apache Sling ● Demo ● Conclusion ● Q&A http://robert.muntea.nu @rombert

  22. Threat modelling “Threat modeling is an engineering technique you can use to help you identify threats, attacks, vulnerabilities, and countermeasures that could afgect your application” Threat Modeling Web Applications on MSDN http://robert.muntea.nu @rombert

  23. Threat Modelling - Assets http://robert.muntea.nu @rombert

  24. Threat Modelling - Assets ● Availability ● Content ● User Credentials ● Ability to execute code on server ● Ability to execute code in the browser context http://robert.muntea.nu @rombert

  25. Threat Modelling - Trust Levels http://robert.muntea.nu @rombert

  26. Threat Modelling - Trust Levels 1. Anonymous 2. Author 3. Administrator http://robert.muntea.nu @rombert

  27. Threat Modelling - Threats OWASP http://robert.muntea.nu @rombert

  28. Threat Modelling - Threats 1. Denial of Service 2. Defacement / Deletion 3. Leaking credentials 4. SQL/Shell Injection 5. Stored/Reflected XSS http://robert.muntea.nu @rombert

  29. Threat Modelling - Mitigation http://robert.muntea.nu @rombert

  30. Agenda ● Apache Sling ● Demo application review ● Threat model ● Security with Apache Sling ● Demo ● Conclusion ● Q&A http://robert.muntea.nu @rombert

  31. Apache Sling Security – Natural layering of ACEs http://robert.muntea.nu @rombert

  32. Apache Sling Security – Security applied at the lowest level $ h t t p - - a u t h b o b : b o b l o c a l h o s t : 8 0 8 0 / c o n t e n t / b l o g / p o s t s / n e w _ b l o g _ p o s t ' j c r \ : t i t l e = N e w p o s t ' http://robert.muntea.nu @rombert

  33. Apache Sling Security – Context-aware templating language < d i v c l a s s = " c o m m e n t c l e a r f i x " > < i m g c l a s s = " a v a t a r i m g - r o u n d e d p u l l - l e f t " s r c = " $ { r e s o u r c e . v a l u e M a p [ ' a u t h o r A v a t a r ' ] } " / > < h 3 > $ { r e s o u r c e . v a l u e M a p [ ' j c r : t i t l e ' ] } < / h 3 > < p > $ { r e s o u r c e . v a l u e M a p [ ' j c r : d e s c r i p t i o n ' ] } < / p > < / d i v > http://robert.muntea.nu @rombert

  34. Apache Sling Security – Injection-safe APIs Children of /content/blog/posts http://robert.muntea.nu @rombert

  35. Apache Sling Security – Injection-safe APIs Children of /content/blog/comments/ hello_world http://robert.muntea.nu @rombert

  36. Agenda ● Apache Sling ● Demo application review ● Threat model ● Security with Apache Sling ● Demo ● Conclusion ● Q&A http://robert.muntea.nu @rombert

  37. Demo Application – Actual demo!!!!1oneone http://robert.muntea.nu @rombert

  38. Conclusions – Security ● Aim to be “Secure by Default” ● Build a threat model for your application ● Look for components that eliminate problems altogether http://robert.muntea.nu @rombert

  39. Conclusions – Apache Sling ● Simple to be “Secure by Default” ● Eventing, Thread Pooling, Job Management, Caching ● Scripting: Groovy, Scala, JSP, Sightly, Java, Ruby, Thymeleaf ● Flexible resource rendering with resource types ● Very extensible due to being internally powered by OSGi – most extension points available to clients http://robert.muntea.nu @rombert

  40. Resources ● Apache Sling – https://sling.apache.org ● Apache Jackrabbit ● https://jackrabbit.apache.org ● http://jackrabbit.apache.org/oak/ ● OWASP - https://www.owasp.org ● https://www.owasp.org/index.php/OWASP_Top_Ten _Cheat_Sheet ● https://www.owasp.org/index.php/Application_Thre at_Modeling http://robert.muntea.nu @rombert

Recommend


More recommend