Chef SSH Key Wrapper

Chef cookbook LWRP to Manage SSH Key & Wrapper

ssh_key_wrapper Cookbook

Build Status

This is a Chef cookbook for Managing SSH Private Key file using Chef Data Bag and SSH Wrapper file (primarily for GIT).

All SSH Private Keys are stored in a Databag as a Databag item to maintain simplicity.

TODO

Cookbook Recipes

Repository

https://github.com/vkhatri/chef-ssh-key-wrapper

Cookbook LWRP

LWRP - ssh_key_wrapper_private

ssh_key_wrapper_private LWRP is used to manage ssh private key file as well as ssh wrapper file for the ssh private key.

LWRP example

via node attribute:

"default_attributes": {
  "ssh_key_wrapper": {
    "private_keys": {
      "test": {
        "user": "foo",
        "group": "foo",
        "key_name": "databag item name",
        "enable_wrapper": true,
        "wrapper_file": "wrapper file path",
        "key_file" "ssh private key file path",
        "databag": "databag name",
        "action": "create"
      }
    }
  }
}

Create a RR using LWRP

ssh_key_wrapper_private "foo" do
  option value ...
end

Delete a RR using LWRP

ssh_key_wrapper_private "key name" do
  option value
  action :delete ...
end

LWRP Options

Parameters:

Cookbook Core Attributes

Contributing

  1. Fork the repository on Github
  2. Create a named feature branch (like add_component_x)
  3. Write your change
  4. Write tests for your change (if applicable)
  5. Run the tests (rake), ensuring they all pass
  6. Write new resource/attribute description to README.md
  7. Write description about changes to PR
  8. Submit a Pull Request using Github

Copyright & License

Authors:: Virender Khatri and Contributors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.