Giter VIP home page Giter VIP logo

ecryptfs's Introduction

ecryptfs Cookbook

Ecryptfs cookbook for encrypting a file system RHEL/CentOS only

Requirements

Cookbook requirements needs a file system directory name to mount. For true security allow the :passphrase to be auto generated with OpenSSL Chef secure_passphrase call.

(Future enhancements will be options like ecryptfs_key_bytes other than default 16)

cookbooks

  • openssl

packages

  • ecryptfs-utils - ecryptfs needs this package installed for RHEL/CentOS

Attributes

  • node['ecryptfs']['mount'] - System directory and mount point which is encrypted.
  • node['ecryptfs']['lower_directory'] - System file system or directory to house mount point. If nil, uses node['ecryptfs']['mount']
  • node['ecryptfs']['passphrase'] - Choose your own, or chef will create a secure one for you.
    • highly recommend remove it from your role, or node and replace it only when you need to reboot your system.
  • node['ecryptfs']['reboot'] - Set this node variable in the role immediately before you want to reboot your system to allow for the auto mount of the file system to take place. Must manually remove the variable for the secure data to be removed from system.
  • node['ecryptfs']['active'] - Default = true. So other cookbooks know ecrypfs file system is available to the node.

Recipes

ecryptfs::default

ecryptfs file system mount created, mounted, encrypted passphrase defined if one not given. See http://ecryptfs.org

ecryptfs::mount

Prepares the secure passphrase and signature cache key in /root/ directory for auto-mount to take place when system is manually rebooted. If the system crashes, file /root/.ecryptfsrc will have to be removed or the variable node['ecryptfs]['reboot'] = true must be set, and then run chef-client for auto-mount to work. If the file system becomes unmounted without the ['reboot'] variable set, remove the file /root/.ecryptfsrc and re-run the chef-client, and it will automount. If the file /root/.ecryptfsrc is there, next chef run will fail - unable to mount with bogus data in the .ecryptfsrc file.

Usage

ecryptfs

{
  "name":"my_node",
  "run_list": [
    "recipe[ecryptfs]"
  ]
}
override_attributes(
   :ecryptfs => {  
     :mount => "/var/SecureDir",
     :lower_directory "/var" 
    }
)

ecryptfs with system ready to be rebooted

{
  "name":"my_node",
  "run_list": [
    "recipe[ecryptfs]"
   ]
}   
override_attributes (
  :ecryptfs => {
    :mount => "/var/SecureDir",
    :lower_directory "/var", 
    :reboot => true
  }
)  

Contributing

  • Fork the repository on Github
  • Create a named feature branch (like add_component_x)
  • Write your change
  • Write tests for your change (if applicable)
  • Run the tests, ensuring they all pass
  • Submit a Pull Request using Github

License and Authors

Authors: Melinda Moran

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.