lisa 11 fine grained access control for the puppet
play

LISA 11 Fine-grained access-control for the Puppet configuration - PowerPoint PPT Presentation

LISA 11 Fine-grained access-control for the Puppet configuration language Bart Vanbrabant, Joris Peeraer and Wouter Joosen DistriNet, Dept. of Computer Science, K.U.Leuven, Belgium December 7, 2011 1 / 27 Outline Systems configuration


  1. LISA ’11 Fine-grained access-control for the Puppet configuration language Bart Vanbrabant, Joris Peeraer and Wouter Joosen DistriNet, Dept. of Computer Science, K.U.Leuven, Belgium December 7, 2011 1 / 27

  2. Outline Systems configuration Context Problems Our solution: ACHEL Authorising Puppet Conclusion 2 / 27

  3. Outline Systems configuration Context Problems Our solution: ACHEL Authorising Puppet Conclusion 3 / 27

  4. System configuration tools 4 / 27

  5. System configuration tools 5 / 27

  6. System configuration tools 6 / 27

  7. System configuration tools 7 / 27

  8. System configuration tools M a l i c i o u s c o n f i g u r a t i o n 8 / 27

  9. System configuration tools 9 / 27

  10. System configuration tools 10 / 27

  11. Outline Systems configuration Context Problems Our solution: ACHEL Authorising Puppet Conclusion 11 / 27

  12. What is ACHEL? ACHEL manages access to repositories of configuration specification by implementing access control and enforcing workflows • fine-grained access control interpreting the semantics of changes • The actions that needs authorisation are derived automatically • access control is applied at the abstraction level of the configuration specification • support for workflow in federated infrastructures • a (configuration) language agnostic solution 12 / 27

  13. Generating meaningful changes with ACHEL 13 / 27

  14. Outline Systems configuration Context Problems Our solution: ACHEL Authorising Puppet Conclusion 14 / 27

  15. Puppet Authorise changes to the configuration model of a real tool: • System management tool used in production environment • Puppet has an expressive and complex configuration language • Manifests organised in modules • Authorisation based on modules and their file path • Link between contents of module and its name is not enforced 15 / 27

  16. Applying ACHEL to Puppet Steps to authorise changes the ACHEL way: • Aquire the AST from Puppet • AST contains syntax so normalisation is required • Derive to be authorised actions • Submit request to XACML policy engine • Report result of authorisation 16 / 27

  17. AST normalisation Define three users with one statement: user {["bart", "joris", "wouter"]: } Define three users with three statements: user {"bart": } user {"joris": } user {"wouter": } 17 / 27

  18. Prototype Challenges for prototype: • Not all language features supported, some are impossible to support • Prototype extracts AST from Puppet compiler and normalises it • The AST is serialised to XML so XPath can be used in policies • Prototype is integrated in a DVCS (Bazaar) to enforce access control 18 / 27

  19. Example: Adding vhosts Puppet manifest: # Apache-class class apache { ... } # vhost definition define apache::vhost ($document_root) { file {"/etc/apache2/vhosts-available/${name}": ensure => present, docroot => $document_root, } } node a { include apache } 19 / 27

  20. Example: Adding vhosts User Jdoe adds a virtual host: # Apache-class class apache { apache::vhost {"www.example.com": docroot => "/home/jdoe/public_html", } ... } # vhost definition define apache::vhost ($document_root) { file {"/etc/apache2/vhosts-available/${name}": ensure => present, docroot => $document_root, } ... 20 / 27

  21. Example: Adding vhosts Result from matching: * Updated: none * Inserted: Add member: Resource (title:www.example.com, type:apache::vhost) Add parameter: ResourceParam (param:docroot) Add value: String () => /home/jdoe/public_html * Removed: none 21 / 27

  22. Example: Adding vhosts XAMCL policy extract (without the namespace clutter) <Policy> <Description>Apache permissions for webuser</Description> <Target><Subjects><Subject><SubjectMatch> <AttributeValue>webuser</AttributeValue> <SubjectAttributeDesignator AttributeId="subject:role" /> </SubjectMatch></Subject></Subjects></Target> <Rule Effect="Permit"> <Description>Add or remove a vhost</Description> <Target><Resources><Resource><ResourceMatch> <AttributeValue>//pup:*[@type="apache::vhost"]</AttributeValue> <ResourceAttributeDesignator AttributeId="resource-id" DataType="xpath-expression" /> </ResourceMatch></Resource></Resources></Target> </Rule> <Rule Effect="Permit"> <Target><Resources><Resource><ResourceMatch> <AttributeValue>//pup:*[@type="apache::vhost"]/pup:*[@param="docroot"]</AttributeValue> <ResourceAttributeDesignator AttributeId="resource-id" DataType="xpath-expression" /> </ResourceMatch></Resource></Resources></Target> <Condition> <Apply FunctionId="string-starts-with"><Apply FunctionId="string-one-and-only"> <AttributeSelector RequestContextPath="//pup:*[@param=’docroot’]/pup:value/text()" /> </Apply> <Apply FunctionId="string-concatenate"> <AttributeValue>/home/</AttributeValue> <Apply FunctionId="string-one-and-only"> <SubjectAttributeDesignator AttributeId="subject-id" /> </Apply> </Apply></Apply> </Condition> </Rule> </Policy> 22 / 27

  23. Example: Adding vhosts First rule from extract: <Policy> ... <Rule Effect="Permit"> <Description>Add or remove a vhost</Description> <Target><Resources><Resource><ResourceMatch> <AttributeValue>//pup:*[@type="apache::vhost"] </AttributeValue> <ResourceAttributeDesignator AttributeId="resource-id" DataType="xpath-expression" /> </ResourceMatch></Resource></Resources></Target> </Rule> ... </Policy> 23 / 27

  24. Example: Adding vhosts Second rule from extract: <Policy> ... <Rule Effect="Permit"> <Target><Resources><Resource><ResourceMatch> <AttributeValue>//pup:*[@type="apache::vhost"]/pup:*[@param="docroot"]</AttributeValue> <ResourceAttributeDesignator AttributeId="resource-id" DataType="xpath-expression" /> </ResourceMatch></Resource></Resources></Target> <Condition> <Apply FunctionId="string-starts-with"><Apply FunctionId="string-one-and-only"> <AttributeSelector RequestContextPath="//pup:*[@param=’docroot’]/pup:value/text()" /> </Apply> <Apply FunctionId="string-concatenate"> <AttributeValue>/home/</AttributeValue> <Apply FunctionId="string-one-and-only"> <SubjectAttributeDesignator AttributeId="subject-id" /> </Apply> </Apply></Apply> </Condition> </Rule> </Policy> 24 / 27

  25. Use unsupported language constructions • Policy defines what is allowed • Usage of defines or classes can be authorised • Encapsulate unsupported or complex Puppet constructions • Authorise on the container of the unsupported statements 25 / 27

  26. Outline Systems configuration Context Problems Our solution: ACHEL Authorising Puppet Conclusion 26 / 27

  27. Conclusion • ACHEL method supports complex languages • Unsupported languages features using encapsulation • Clean AST required • XACML is powerful but hard to use 27 / 27

Recommend


More recommend