Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

user-ssh-keys (3) Versions 1.0.2

Deploys SSH keys

Policyfile
Berkshelf
Knife
cookbook 'user-ssh-keys', '~> 1.0.2', :supermarket
cookbook 'user-ssh-keys', '~> 1.0.2'
knife supermarket install user-ssh-keys
knife supermarket download user-ssh-keys
README
Dependencies
Changelog
Quality 33%

user-ssh-keys-cookbook Build Status

Deploys SSH keys and authorized keys

Supported Platforms

  • CentOS 6.5
  • Debian 7

Attributes

The root key of all attributes is user_ssh_keys.

Key Type Default Description
data_bag String ssh_keys Databag where to search for keys
users Hash {} A list of users with names as key

Users

Key Type Default Description
authorized_keys Array [] Array of strings representing authorized SSH public keys
authorized_users Array [] Array of strings representing authorized users (found in the databag)

LWRP

This cookbook provides one resource:

user_ssh_keys_key

user_ssh_keys_key 'john' do
  authorized_keys [
    'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDmz4D...',
    'ssh-rsa sFE5JafGV4UmfxGP5/vpAAADWC8HcoQAyYT...'
  ]
  authorized_users %w(bob joe)
end

This resource will add authorized keys from the provided list (authorized_keys) and from users declared in the databag (bob and joe) to the john user.

Databag

The databag is an Hash with usernames as keys. Each user can have a list of keypairs (as an Array).
A keypais is described as follow:

Key Type Default Description
id String nil Arbitrary name for the key
priv String nil Public key content
pub String nil Private key content

Usage

You can use this cookbook in tow ways:

  • using the default recipe and providing (attributes)[#attributes]
  • using the LWRP

Both methods require you to define a databag to define SSH key pairs. Defining attributes is not required if you only want to use the LWRP.

user-ssh-keys::default

Include user-ssh-keys in your node's run_list:

{
  "run_list": [
    "recipe[user-ssh-keys]"
  ]
}

Example databag

{    
    "bob": [
        {
            "id": "my_key",
            "pub": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDmz4D...",
            "priv": [
                "-----BEGIN RSA PRIVATE KEY-----",
                "MIIEpgIBAAKCAQEA5s+A461t/v8mQB9UQpaYwGWNl...",
                "...",
                "-----END RSA PRIVATE KEY-----"
            ]
        },
        {
            "id": "my_other_key",
            "pub": "ssh-rsa sFE5JafGV4UmfxGP5/vpWC8HcoQAyYT...",
            "priv": [
                "-----BEGIN RSA PRIVATE KEY-----",
                "XFQg/FfgRC+rwooxKXsxqjA/zapfkzFVBchsjmYpx...",
                "...",
                "-----END RSA PRIVATE KEY-----"
            ]
        }
    ]
}

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

0.1.0

Initial release of ssh-keys

Collaborator Number Metric
            

1.0.2 failed this metric

Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric
            

1.0.2 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

Foodcritic Metric
            

1.0.2 passed this metric

No Binaries Metric
            

1.0.2 passed this metric

Testing File Metric
            

1.0.2 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

1.0.2 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number