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

Allow auto-conversion to Sensitive data type

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Normal
    • Resolution: Won't Do
    • Affects Version/s: PUP 5.3.3
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • QA Risk Assessment:
      Needs Assessment

      Description

      Puppet Version: 5.3.3
      Puppet Server Version: N/A
      OS Name/Version: N/A

      When passing data to a resource that declares a parameter as Sensitive the value must be manually cast to Sensitive. Please allow values matching type T to be automatically cast to values of Sensitive[T].

      In particular, this would be helpful for automatic parameters.

      Right now Sensitive is too much of a pain. Automatic casts would remove that cost and allow me to start using it everywhere.

      Desired Behavior:

      ❯ puppet apply -e 'define foo ( Sensitive $p ) { } foo { "f": p => "secret" }'
      Notice: Compiled catalog for marla.local in environment production in 0.02 seconds
      Notice: Applied catalog in 0.01 seconds
      

      Actual Behavior:

      ❯ puppet apply -e 'define foo ( Sensitive $p ) { } foo { "f": p => "secret" }' 
      Error: Evaluation Error: Error while evaluating a Resource Statement, Foo[f]: parameter 'p' expects a Sensitive value, got String  at line 1 on node marla.local
      

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  daniel.parks Daniel Parks
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  8 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: