munging the log output from a custom provider

33 views
Skip to first unread message

Corey Osman

unread,
Sep 16, 2015, 9:19:27 PM9/16/15
to Puppet Dev
Hi,

My custom BMC provider manages the password of the bmc device on a physical system.  While the password can be encrypted vi eyaml how can I keep the password from showing up in the reports when the password changes.  Basically I don’t want the following to occur.  Is there a way to suppress the logging of this info?  Or is there a way to “munge/encrypt” the info being logged?  Oh, and ‘123456’ is not the password to my luggage. 

Notice: /Stage[main]/Main/Bmcuser[testuser]/userpass: userpass changed '**Hidden**' to ‘123456'



Corey

Reid Vandewiele

unread,
Sep 17, 2015, 2:48:17 PM9/17/15
to Puppet Developers
On Wednesday, September 16, 2015 at 6:19:27 PM UTC-7, Corey Osman wrote:

[...] how can I keep the password from showing up in the reports when the password changes.  Basically I don’t want the following to occur.  Is there a way to suppress the logging of this info?  Or is there a way to “munge/encrypt” the info being logged? [...]

Notice: /Stage[main]/Main/Bmcuser[testuser]/userpass: userpass changed '**Hidden**' to ‘123456'

The user type in Puppet core does this mostly, using change_to_s(), is_to_s(), and should_to_s(). Check out this part of the newproperty() method for password.



Corey Osman

unread,
Sep 18, 2015, 11:02:27 AM9/18/15
to Puppet Developers
Where is this documented or exist in the puppet codebase as this is exactly what I was looking for. 

Trevor Vaughan

unread,
Sep 18, 2015, 12:02:24 PM9/18/15
to puppe...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-dev/5dbea916-c327-4a4b-9c8d-b7e75e7364eb%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Trevor Vaughan
Vice President, Onyx Point, Inc
(410) 541-6699

-- This account not approved for unencrypted proprietary information --

Reid Vandewiele

unread,
Sep 18, 2015, 12:24:01 PM9/18/15
to puppe...@googlegroups.com
On Fri, Sep 18, 2015 at 9:02 AM Trevor Vaughan <tvau...@onyxpoint.com> wrote:

Related references:


As that last link comments, often times the best existing references for some of this stuff are existing types, used and referenced as examples.

The other resource I'm aware of is Dan Bode and Nan Liu's book "Puppet Types and Providers" (late 2012). It's been awhile since it was published but not a whole lot has changed in the relevant ruby API. http://www.amazon.com/Puppet-Types-Providers-Dan-Bode/dp/1449339328

~Reid
Reply all
Reply to author
Forward
0 new messages