summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2016-07-25mixed up trocla and puppet_trocla repos, sorryHEADmasterkwadronaut
2016-06-07keep trocla object around - addresses #18mh
Per puppet function call we now created a new Trocla object. This is a) a very naive approach and b) obviously can lead to a lot of inefficiency as we for example need to build up trocla each time again. Also this means that we are running into problems like opening a connection to a database system each time a trocla lookup is done (and we never close the connection :-/). The proper way to solve this is to make sure we don't create too many trocla objects. With this change, we should now create once a global trocla object PER puppet(-master/-server) process and keep it around for the life time of such a process.
2016-06-07whitespace cleanupmh
2015-12-22Fix #17 - point to @ZeroPointEnergy's hiera-backendmh
2015-10-20Fix configfile error in hiera backendMichael Weiser
Get path to configuration file from config hash to avoid undefined variable error.
2015-10-18cleanup and simplifactionmh
* refactoring code for simplicity and easier maintenance. * prefix the format and options config with default_ to better represent their intention.
2015-10-01Add custom hiera backend for troclaMichael Weiser
Only reacts to key namespace trocla::password::<trocla_key>. Looks up additional parameters via hiera itself as trocla::options::<trocla_key>::format (string) and trocla::options::<trocla_key>::options (hash). Looks for <trocla_key> in trocla as hiera/<source>/<trocla> with <source> iterating over the configured hiera hierarchy. If not found, creates and returns a new password with trocla key <trocla_key>. example entry in hiera.yaml: backends: - ... - trocla trocla: - configfile: /etc/puppet/troclarc.yaml - format: plain - options: length: 16 example usage in hiera yaml file: kerberos::kdc_database_password: "%{hiera('trocla::password::kdc_database_password')}" trocla::options::kdc_database_password::format: 'plain' trocla::options::kdc_database_password::options: length: '71'
2015-08-12Fix #14 - allow trocla_get not to raise an error if nothing is foundmh
Up to now we raised an error if nothing was found while using trocla_get. The main idea was to ensure that typos in the key/format are easily spotted and not overlooked as no password being returned usually indicates that something is wrong. As outlined in #14 there are use cases where it makes sense to not have this behavior. This change allows us to suppress the error raising and just return the puppet undef if nothing is found.
2015-08-12whitespace cleanupmh
2014-08-21bump to version 0.0.11mh
2014-08-21ensure that we always select a charsetmh
2014-06-27new versionmh
2014-06-27make it possible that formats can query back to trocla itself, so they can ↵mh
lookup other 'keys'
2014-06-27add SHA1 base64 encoded formatmh
2014-06-27Merge branch 'charset_option' of https://github.com/tilya/trocla into ↵mh
tilya-charset_option & simplify charset selection Conflicts: lib/trocla.rb lib/trocla/util.rb
2014-06-27Merge branch 'safechars' of https://github.com/asquelt/trocla into ↵mh
asquelt-safechars Conflicts: lib/trocla.rb
2014-06-24adds charset option for generating plain passwordsAnna Janackova
2014-06-24puppet will convert all values to string, so we need to convert it back to ↵asq
integer for ranges ie. for this to work: $short_and_safe = { 'shellsafe' => 'true', 'length' => 6, # THIS WILL BE STRING! } $x = trocla('foo', 'plain', $short_and_safe) notify { "test: $x": }
2014-06-24add option to generate shell-safe passwordsasq
basically excludes characters that might be dangerous if used in shell. many passwords generated by trocla may end up in some sort of bash scripts (initscripts, sourced shell variables, etc) which may yeld problems with default trocla random generator. this can be now changed either in troclarc (with "shellsafe: true") or on (ie. "trocla create foo plain '{ length: 32, shellsafe: true}'").
2014-04-03puppet will convert all values to string, so we need to convert it back to ↵asq
integer for ranges ie. for this to work: $short_and_safe = { 'shellsafe' => 'true', 'length' => 6, # THIS WILL BE STRING! } $x = trocla('foo', 'plain', $short_and_safe) notify { "test: $x": }
2014-04-03add option to generate shell-safe passwordsasq
basically excludes characters that might be dangerous if used in shell. many passwords generated by trocla may end up in some sort of bash scripts (initscripts, sourced shell variables, etc) which may yeld problems with default trocla random generator. this can be now changed either in troclarc (with "shellsafe: true") or on (ie. "trocla create foo plain '{ length: 32, shellsafe: true}'").
2014-04-03add option to generate shell-safe passwordsasq
basically excludes characters that might be dangerous if used in shell. many passwords generated by trocla may end up in some sort of bash scripts (initscripts, sourced shell variables, etc) which may yeld problems with default trocla random generator. this can be now changed either in troclarc (with "shellsafe: true") or on (ie. "trocla create foo plain '{ length: 32, shellsafe: true}'").
2014-02-26x509 format - fixesasq
2014-02-26x509 formatasq
2013-10-03release 0.0.9mh
2013-08-20add ssha formatmh
2013-02-28Removing calls to Puppet.features.rubygems?Michael Franz Aigner
This makes the Gem usable in the latest Puppet versions. The handling of RubyGems got revised in Puppet 3.0.1-rc1: http://projects.puppetlabs.com/issues/16757 The new policy is that either bundler and/or rubygems are guaranteed to be loaded and initialized when the Puppet manifest is evaluated, making it unnecessary for Puppet modules to load rubygems. This new policy broke the puppet-trocla module. This is because 'Puppet.features.rubygems?' always evaluates to false now, which causes the module to abort the manifest compilation with a message informing about the necessity of RubyGems to be present.
2013-01-14Regenerate gemspec for version 0.0.8mh
2012-12-28enable travismh
2012-12-28use the memory adapter for tests and ensure that we pass adapter_optionsmh
2012-12-28use a more recent trocla versionmh
2012-12-25Security: use SecureRandom for a much better random generator - Kernel.rand ↵mh
is just crap
2012-01-05another version bumpmh
2012-01-05version bumpmh
2011-12-17version 0.0.5mh
2011-12-17Merge remote-tracking branch 'immerda/master'mh
2011-12-17version 0.0.4mh
2011-12-17reduce special characters.mh
Various apps, especially php-apps :/ have a problem with '<' or '>' as a password character. To reduce the amount of pain from a freshly generated password, we remove these characters.
2011-11-26version 0.0.4mh
2011-11-26rather use salt than random string to avoid not allowed charactersmh
2011-10-27mergemh
2011-09-06as setting a hash first is a bit cumbersome, we provide the possibility to ↵mh
pass a yaml string
2011-08-12add missing bcrypt filemh
2011-08-12increase versionmh
2011-08-08wordingmh
2011-08-08wordingmh
2011-08-05salt should not really containt special charactersmh
2011-08-05introduce trocla_set - useful to migrate existing manifestsmh
2011-08-05cleanup code and improve test namingmh
2011-08-05add sha(256|512)crypt formats - increase versionmh