forked from chef-boneyard/openssl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
COOK-228, add support for debian-sys-maint user
This also introduces grants.sql, and we'll set up a replication user here. And setting the password for these two users + root by moving the openssl random generation to a new library.
- Loading branch information
jtimberman
committed
Dec 23, 2009
0 parents
commit 7d4d8ac
Showing
4 changed files
with
95 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
= DESCRIPTION: | ||
|
||
Library provides a method to generate secure passwords for use in recipes. | ||
|
||
= REQUIREMENTS: | ||
|
||
OpenSSL Ruby bindings must be installed, which are a requirement for Chef anyway. | ||
|
||
= USAGE: | ||
|
||
Most often this will be used to generate a secure password for an attribute. | ||
|
||
include Opscode::OpenSSL::Password | ||
|
||
set_unless[:my_password] = secure_password | ||
|
||
= LICENSE and AUTHOR: | ||
|
||
Author:: Joshua Timberman (<[email protected]>) | ||
|
||
Copyright:: 2009, Opscode, Inc | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# | ||
# Cookbook Name:: openssl | ||
# Library:: secure_password | ||
# Author:: Joshua Timberman <[email protected]> | ||
# | ||
# Copyright 2009, Opscode, Inc. | ||
# | ||
# 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. | ||
# | ||
|
||
require 'openssl' | ||
|
||
module Opscode | ||
module OpenSSL | ||
module Password | ||
def secure_password | ||
pw = String.new | ||
|
||
while pw.length < 20 | ||
pw << ::OpenSSL::Random.random_bytes(1).gsub(/\W/, '') | ||
end | ||
|
||
pw | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
maintainer "Opscode, Inc." | ||
maintainer_email "[email protected]" | ||
license "Apache 2.0" | ||
description "Installs/Configures openssl" | ||
long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc')) | ||
version "0.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# | ||
# Cookbook Name:: openssl | ||
# Recipe:: default | ||
# | ||
# Copyright 2009, Opscode, Inc. | ||
# | ||
# 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. | ||
# | ||
|