Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-8540

Type checking fails when a sensitive parameter is autoloaded from hiera (no automatic conversion)

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Duplicate
    • PUP 5.4.0
    • None
    • Hiera & Lookup
    • Needs Assessment
    • Needs Assessment

    Description

      Puppet Version: 5.4.0
      Puppet Server Version: N/A
      OS Name/Version: CentOS 7

      When a class parameter is set to use the sensitive type, automatic class parameter lookup fails with a type checking error.

      Desired Behavior:

      The value stored in hiera should be automatically validated against the datatype specified within Sensitive[], or not type-validated if the inner type was not specified.

      Actual Behavior:

      Error: Evaluation Error: Error while evaluating a Function Call, Class[Cntlm]: parameter 'cntlm_password' expects a value of type Undef or Sensitive[String], got String (file: /tmp/modules/cntlm/examples/init.pp, line: 2, column: 5) on node localhost.localdomain

      Workaround:

      Remove the value as a class parameter, and use Sensitive(lookup()) within the body of the class.

      Attachments

        Issue Links

          Activity

            People

              henrik.lindberg Henrik Lindberg
              JacobHenner Jacob Henner
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support