Giter VIP home page Giter VIP logo

puppet-htpasswd's People

Contributors

andrekeller avatar ghoneycutt avatar leinaddm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

puppet-htpasswd's Issues

new API for puppet functions

Hi all, I'm using this module on puppet 5.5.7 and I'm getting errors like
Error while evaluating a Function Call, undefined method encode in puppet modules where the function ht_md5 is called. I'm not sure about the root cause of this error, but I tried to rewrite the function using the new puppet api Puppet::Functions.create_function() instead of Puppet::Parser::Functions::newfunction() and the problem is resolved. Is anyone experiencing the same issue? I'm not really sure that this is the right solution (besides the fact that the old API is quite deprecated, but this is another issue)

Logging

Hi,

Thanks for the module - it's exactly what I was looking for when I saw it today.

I would like to ask if there is a way to prevent it from logging password changes. It currently reports "cryptpasswd changes 'oldpw' to 'newpw' in the logs. This may only be password hashes, but I'd still really like to be able to suppress these entries.

J

htpasswd file ownership/permissions

Hi,

I'd really love a way to be able to set the htpasswd file ownership/permissions/mode with the htpasswd type.

I know I can set them by using a file resource, but I'm using create_resources to build the htpasswd file from a hash so currently I'll have to add a defined type wrapper as a workaround.

J

Puppet4 compatibility

Puppet > 3 version throws a warning about lib/puppet/type/htpasswd.rb

module Puppet
newtype(:htpasswd) do

Warning: Creating htpasswd via Puppet.newtype is deprecated and will be removed in a future release. Use Puppet::Type.newtype instead.
(at /usr/lib/ruby/vendor_ruby/puppet.rb:162:in `newtype')

Please replace with "Puppet::Type.newtype(:htpasswd) do"

Duplicated entry when resource already exists

I have an existing htpasswd file with a single entry:
foo:N6r2FyxGvBRr6

I created the declaration:
htpasswd {'/tmp/passwd foo':
username => 'foo',
cryptpasswd => 'N6r2FyxGvBRr6',
target => '/tmp/passwd',
}

then reran puppet and have /tmp/passwd containing:

HEADER: This file was autogenerated at Tue Sep 24 14:05:08 -0400 2013

HEADER: by puppet. While it can still be managed manually, it

HEADER: is definitely not recommended.

foo:N6r2FyxGvBRr6

Puppet Name: /tmp/passwd foo

foo:N6r2FyxGvBRr6

It did the same thing if the passwords are different as well.

Add support for bcrypt

Hi,

Would it be possible to add support for bcrypt?

Docker registry auth only accepts bcrypt cipher, and this module does not seem to support it.

Best,

Legacy users in file are duplicated

Hello,

I'm having a problem with your htpasswd type. The problem is that I already have a htpasswd file with some users. Now, I want to use your type to modify the password for one of the users. When I add a

htpasswd {'myuser':
  ...
}

resource to my site, then myuser line is duplicated, adding a second line to file instead of replacing the existing one.
For example, this is my existing htpasswdfile:

myuser:H8rXKPWmOZMpE

and after

htpasswd { "myuser":
  username    => 'myuser',
  target      => "/tmp/htpasswd",
  cryptpasswd => ht_sha1('some password'),
}

the resulting file is:

# HEADER: This file was autogenerated at 2014-05-15 11:19:11 +0200
# HEADER: by puppet.  While it can still be managed manually, it
# HEADER: is definitely not recommended.
myuser:H8rXKPWmOZMpE
# Puppet Name: myuser
myuser:{SHA}2jmj7l5rSw0yVb/vlWAYkK/YBwk=

is it possible to handle this?

chown passwd file

It would be cool to pass a parameter which would change ownership of the created file.

Error: undefined method `encode'

In my manifest I've tried
ht_md5('password', 'salt')
When running puppet I got this error:

Error: undefined method `encode' for Scope(Mater::App[staging]):Puppet::Parser::Scope at /etc/puppet/modules/mater/manifests/app.pp:16 on node fullstack2.lan
Wrapped exception:
undefined method `encode' for Scope(Mater::App[staging]):Puppet::Parser::Scope

Using instead ht_sha1('password') required me to change require 'sha1' to require 'digest/sha1', and then worked good (#5).

These are my first steps with puppet, but it's not a complex task however. Any hint?
Thanks!

already initialized constant DIGEST_LENGTH and SALT_CHARS

got lot of warnings on puppetserver

https://github.com/leinaddm/puppet-htpasswd/blob/v0.0.3/lib/puppet/parser/functions/ht_md5.rb#L19
https://github.com/leinaddm/puppet-htpasswd/blob/v0.0.3/lib/puppet/parser/functions/ht_md5.rb#L30

Jun 17 02:33:06 pupt02l1 java[3630]: /etc/puppetlabs/code/environments/main/modules/htpasswd/lib/puppet/parser/functions/ht_md5.rb:30 warning: already initialized constant DIGEST_LENGTH
Jun 17 02:33:31 pupt02l1 java[3630]: /etc/puppetlabs/code/environments/main/modules/htpasswd/lib/puppet/parser/functions/ht_md5.rb:19 warning: already initialized constant SALT_CHARS

License Details

Hi,

Could you add license details for usage of your module? We're not sure if we're violating your terms if we pull this down from the Forge and use it in our provisioning code.

Thanks,
Mark

using @@htpasswd with ht_sha1('cleartext') doesn't export the resource

Using the following code results in no exported resource

@@htpasswd {'user':
    cryptpasswd => ht_sha1('password'),
    target      => '/etc/apache2/htpasswd',
    tag         => 'tag',
}

while doing the same with the cryptpasswd given directly will create the resource on the collecting node

@@htpasswd {'user':
    cryptpasswd => 'password',
    target      => '/etc/apache2/htpasswd',
    tag         => 'tag',
}

change permissions option

Hi,

By default the permissions of htpasswd file is 0600, I need to have it more opened, would it be possible to add an option to change those permissions?

Best,

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.