Skip to content

Instantly share code, notes, and snippets.

@abrader
Last active July 28, 2017 13:42
Show Gist options
  • Save abrader/24ebfdafb4db8f31d9ffd420616ee36c to your computer and use it in GitHub Desktop.
Save abrader/24ebfdafb4db8f31d9ffd420616ee36c to your computer and use it in GitHub Desktop.
TAPP Review: Barracuda WAF Module

barracuda-logo

Reference documentation:

General Notes:

  • Modules written do not make use of Puppet DSL
    • All modules should be rewritten to take advantage of capabilities within Puppet DSL rather than relying on Ruby scripts
  • Adherence to Puppet Style
  • Puppet types have weak to no validation
    • Should bolster your types by providing constraints on user provided data and conformance standards
  • Puppet manifest classes are not documented in known standards
  • Data types should be used for parameters in Puppet DSL classes
  • Puppet DSL should contain data validation
    • Should provide proper validation of data provided by module users
      • Use data types where possible as this will provide basic validation
      • Provide additonal validation via custom functions
  • Modules folder should not be included in module
    • Each module owned by Barracuda should be submitted to the Forge separately or should be managed within this module
    • Any module not owned by Barracuda but on Puppet Forge should be listed as a dependency in the metadata.json file
  • Hieradata folder should not exist in module
  • Environment.conf should not exist in repository exposed for customer use
    • Remove file

README.md

  • README should be written out to follow a similar style used by Puppet

manifests/site.pp.example

  • File should not exist in customer facing repository as it can cause confusion

manifests/site.pp

  • Node definitions should not exist in customer facing repository (site.pp)

modules/aws

  • Should be removed as this can be listed as a dependency in metadata.json of a respective module

modules/awscudawafconfig/manifests/init.pp

  • Class contains no code
    • Remove unnecessary init.pp since it is not required

modules/awscudawafconfig/manifests/config.pp

  • Resource attributes should be exposed as parameters to make modules as flexible as possible for customer use
  • Word style ordering metaparameters preferred for linking resource types

modules/awscudawafconfig/cuda-wafconfig

  • Not sure why file exists

modules/awscudawafconfig/files/config_full_new.rb

  • Running a script to accomplish what is possible within Puppet is an antipattern

modules/vrsinaws/manifests/init.pp

  • Class contains no code
    • Remove unnecessary init.pp since it is not required

modules/vrsinaws/manifests/vrsconfig.pp

  • Resource attributes should be exposed as parameters to make modules as flexible as possible for customer use
  • Word style ordering metaparameters preferred for linking resource types

modules/vrsinaws/files/configure_vrs.rb

  • Running a script to accomplish what is possible within Puppet is an antipattern

modules/wafloginforaws/manifests/init.pp

  • Resource attributes should be exposed as parameters to make modules as flexible as possible for customer use
  • Word style ordering metaparameters preferred for linking resource types

modules/wafloginforaws/files/waflogintoken.rb

  • Running a script to accomplish what is possible within Puppet is an antipattern

modules/ntp

  • Should be removed as this can be listed as a dependency in metadata.json of a respective module

modules/profiles

  • Should be provided in GitHub Markdown since Puppet is a supported language)
  • Design pattern for Profiles indicates classes should be namespaced as child classes only
    • profile::cuda_aws vs profile or profiles

modules/roles

  • Should be provided in GitHub Markdown since Puppet is a supported language)
  • Design pattern for Profiles indicates classes should be namespaced as child classes only
    • role::cuda_aws vs role or roles

modules/stdlib

  • Should be removed as this can be listed as a dependency in metadata.json of a respective module
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment