Jira (PUP-10093) Add a rewrap(Any, Callable) function to make using Sensitive easier

10 views
Skip to first unread message

Henrik Lindberg (JIRA)

unread,
Oct 5, 2019, 5:42:03 AM10/5/19
to puppe...@googlegroups.com
Henrik Lindberg created an issue
 
Puppet / New Feature PUP-10093
Add a rewrap(Any, Callable) function to make using Sensitive easier
Issue Type: New Feature New Feature
Assignee: Unassigned
Created: 2019/10/05 2:41 AM
Priority: Normal Normal
Reporter: Henrik Lindberg

It is difficult in some situations to use Sensitive values:

  • A Sensitive may be nested somewhere in a hash/array
  • When logic accepts Variant[Sensitive[T], Sensitive] user has to check and jump through hoops to do the right thing.

A function rewrap(Any $v) would do the following. If called with a Sensitive (anywhere recursively) it would unwrap all in the structure and call a given lambda with the now clear text value/structure. The result from the lambda is then wrapped in a Sensitive if there was a Sensitive value in the input.

If the function is given something that does not contain a Sensitive, the the value is passed through, and the result is not Sensitive.

This is similar to PUP-10092 where this would be built into interpolation, and PUP-8969 for the same in EPP.

Having the rewrap function makes a lot of sense since interpolation is not the only processing needed involving Sensitive values.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Rob Braden (JIRA)

unread,
Oct 7, 2019, 1:05:03 PM10/7/19
to puppe...@googlegroups.com

Jorie Tappa (JIRA)

unread,
Oct 7, 2019, 2:56:02 PM10/7/19
to puppe...@googlegroups.com

Josh Cooper (JIRA)

unread,
Dec 6, 2019, 1:09:03 PM12/6/19
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Jun 6, 2020, 7:07:03 PM6/6/20
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Epic Link: PUP- 9637 8587
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Reid Vandewiele (Jira)

unread,
Feb 4, 2021, 12:49:04 PM2/4/21
to puppe...@googlegroups.com
Reid Vandewiele commented on New Feature PUP-10093
 
Re: Add a rewrap(Any, Callable) function to make using Sensitive easier

I'm curious to see an example of what a user would have to do to get benefit from this. I.e. a user story, and a Puppet manifest or code snippet demonstrating how rewrap() helps.

Josh Cooper (Jira)

unread,
May 3, 2021, 1:57:02 PM5/3/21
to puppe...@googlegroups.com
Josh Cooper commented on New Feature PUP-10093

I think this would be beneficial, but we don't have plans on adding this in the near term. Please reopen if this is desirable.

This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages