Jira (PUP-10511) Sensitive data type is lost when declaring multiple resources using title arrays
Title: Message Title Charlie Sharpsteen created an issue Puppet / PUP-10511 Sensitive data type is lost when declaring multiple resources using title arrays Issue Type: Bug Affects Versions: PUP 6.15.0, PUP 5.5.20 Assignee: Unassigned Components: Language Created: 2020/05/14 12:03 PM Priority: Normal Reporter: Charlie Sharpsteen Puppet Version: 6.15.0, 5.5.20 Puppet Server Version: N/A OS Name/Version: RedHat 7 When multiple resources are declared using an array of titles, the type information for Sensitive parameters is lost. This results in type validation errors if a resource declares a data type such as Sensitive[String] Install Puppet 6 on CentOS 7 and create a defined type with a password parameter declared to be Sensitive[String]: cat <<'EOF' > /etc/puppetlabs/code/environments/production/modules/test_mod/manifests/service.pp define test_mod::service( Sensitive[String] $password,
Jira (PUP-10511) Sensitive data type is lost when declaring multiple resources using title arrays
Title: Message Title Charlie Sharpsteen updated an issue Puppet / PUP-10511 Sensitive data type is lost when declaring multiple resources using title arrays Change By: Charlie Sharpsteen *Puppet Version:* 6.15.0, 5.5.20*Puppet Server Version:* N/A*OS Name/Version:* RedHat 7 N/A When multiple resources are declared using an array of titles, the type information for {{Sensitive}} parameters is lost. This results in type validation errors if a resource declares a data type such as {{Sensitive[String]}}Install Puppet 6 on CentOS 7 and create a defined type with a password parameter declared to be {{Sensitive[String]}}:{code:bash}cat <<'EOF' > /etc/puppetlabs/code/environments/production/modules/test_mod/manifests/service.ppdefine test_mod::service( Sensitive[String] $password,){ notify{"${title} ${password}": }}EOF{code}Attempt to apply the following manifest:{code:puppet}test_mod::service { ["ServiceA","ServiceB"]: password => Sensitive("password")}{code}*Desired Behavior:*Output matches individual resources declared in a loop:{noformat}# puppet apply <<'EOF'each(["ServiceA","ServiceB"] ) |String $svc_name| { test_mod::service { $svc_name:password => Sensitive("password") }}EOFNotice: Compiled catalog for olde-pacemaker.delivery.puppetlabs.net in environment production in 0.02 secondsNotice: ServiceA Sensitive [value redacted]Notice: /Stage[main]/Main/Test_mod::Service[ServiceA]/Notify[ServiceA Sensitive [value redacted]]/message: defined 'message' as 'ServiceA Sensitive [value redacted]'Notice: ServiceB Sensitive [value redacted]Notice: /Stage[main]/Main/Test_mod::Service[ServiceB]/Notify[ServiceB Sensitive [value redacted]]/message: defined 'message' as 'ServiceB Sensitive [value redacted]'Notice: Applied catalog in 0.01 seconds{noformat}*Actual Behavior:*Compilation fails when defining the second resource as {{password}} has been coerced to a {{String}}:{noformat}# puppet apply <<'EOF'test_mod::service { ["ServiceA","ServiceB"]: password => Sensitive("password")}EOFError: Test_mod::Service[ServiceB]: parameter 'password' expects a Sensitive[String] value, got String on node olde-pacemaker.delivery.puppetlabs.net{noformat} Add Comment
Jira (PUP-10511) Sensitive data type is lost when declaring multiple resources using title arrays
Title: Message Title Charlie Sharpsteen updated an issue Puppet / PUP-10511 Sensitive data type is lost when declaring multiple resources using title arrays Change By: Charlie Sharpsteen *Puppet Version:* 6.15.0, 5.5.20*Puppet Server Version:* N/A*OS Name/Version:* N/AWhen multiple resources are declared using an array of titles, the type information for {{Sensitive}} parameters is lost. This results in type validation errors if a resource declares a data type such as {{Sensitive[String]}}Install Puppet 6 on CentOS 7 and create a defined type with a password parameter declared to be {{Sensitive[String]}}:{code:bash} mkdir -p /etc/puppetlabs/code/environments/production/modules/test_mod/manifests cat <<'EOF' > /etc/puppetlabs/code/environments/production/modules/test_mod/manifests/service.ppdefine test_mod::service( Sensitive[String] $password,){ notify{"${title} ${password}": }}EOF{code}Attempt to apply the following manifest:{code:puppet}test_mod::service { ["ServiceA","ServiceB"]: password => Sensitive("password")}{code}*Desired Behavior:*Output matches individual resources declared in a loop:{noformat}# puppet apply <<'EOF'each(["ServiceA","ServiceB"] ) |String $svc_name| { test_mod::service { $svc_name:password => Sensitive("password") }}EOFNotice: Compiled catalog for olde-pacemaker.delivery.puppetlabs.net in environment production in 0.02 secondsNotice: ServiceA Sensitive [value redacted]Notice: /Stage[main]/Main/Test_mod::Service[ServiceA]/Notify[ServiceA Sensitive [value redacted]]/message: defined 'message' as 'ServiceA Sensitive [value redacted]'Notice: ServiceB Sensitive [value redacted]Notice: /Stage[main]/Main/Test_mod::Service[ServiceB]/Notify[ServiceB Sensitive [value redacted]]/message: defined 'message' as 'ServiceB Sensitive [value redacted]'Notice: Applied catalog in 0.01 seconds{noformat}*Actual Behavior:*Compilation fails when defining the second resource as {{password}} has been coerced to a {{String}}:{noformat}# puppet apply <<'EOF'test_mod::service { ["ServiceA","ServiceB"]: password => Sensitive("password")}EOFError: Test_mod::Service[ServiceB]: parameter 'password' expects a Sensitive[String] value, got String on node olde-pacemaker.delivery.puppetlabs.net{noformat} Add Comment
Jira (PUP-10511) Sensitive data type is lost when declaring multiple resources using title arrays
Title: Message Title Mihai Buzgau updated an issue Puppet / PUP-10511 Sensitive data type is lost when declaring multiple resources using title arrays Change By: Mihai Buzgau Team: Coremunity Night's Watch Add Comment This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.358908.1589483014000.71001.1590592620029%40Atlassian.JIRA.
Jira (PUP-10511) Sensitive data type is lost when declaring multiple resources using title arrays
Title: Message Title Mihai Buzgau updated an issue Puppet / PUP-10511 Sensitive data type is lost when declaring multiple resources using title arrays Change By: Mihai Buzgau Sprint: NW - 2020-06-10 Add Comment This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.358908.1589483014000.72017.1590652680087%40Atlassian.JIRA.
Jira (PUP-10511) Sensitive data type is lost when declaring multiple resources using title arrays
Title: Message Title Mihai Buzgau updated an issue Puppet / PUP-10511 Sensitive data type is lost when declaring multiple resources using title arrays Change By: Mihai Buzgau Story Points: 3 Add Comment This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.358908.1589483014000.72016.1590652680043%40Atlassian.JIRA.
Jira (PUP-10511) Sensitive data type is lost when declaring multiple resources using title arrays
Title: Message Title Ciprian Badescu commented on PUP-10511 Re: Sensitive data type is lost when declaring multiple resources using title arrays What happens is that in first case, there are two distinct password parameters, one for each resource, while in the second case the same parameter is shared by both resources. This works well for immutable parameters, but we unwrap Sensitive parameters for each resource and password parameter will be unwrapped for ServiceA and then will fail the check for ServiceB as it is already unwrapped. Add Comment This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.358908.1589483014000.75627.1591105620021%40Atlassian.JIRA.
Jira (PUP-10511) Sensitive data type is lost when declaring multiple resources using title arrays
Title: Message Title Ciprian Badescu assigned an issue to Ciprian Badescu Puppet / PUP-10511 Sensitive data type is lost when declaring multiple resources using title arrays Change By: Ciprian Badescu Assignee: Ciprian Badescu Add Comment This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.358908.1589483014000.77219.1591167240048%40Atlassian.JIRA.
Jira (PUP-10511) Sensitive data type is lost when declaring multiple resources using title arrays
Title: Message Title Mihai Buzgau updated an issue Puppet / PUP-10511 Sensitive data type is lost when declaring multiple resources using title arrays Change By: Mihai Buzgau Sprint: NW - 2020-06-10 , NW - 2020-06-24 Add Comment This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.358908.1589483014000.83215.1591779240171%40Atlassian.JIRA.
Jira (PUP-10511) Sensitive data type is lost when declaring multiple resources using title arrays
Title: Message Title Josh Cooper updated an issue Puppet / PUP-10511 Sensitive data type is lost when declaring multiple resources using title arrays Change By: Josh Cooper Fix Version/s: PUP 6.17.0 Fix Version/s: PUP 5.5.21 Add Comment This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.358908.1589483014000.86580.1592007300088%40Atlassian.JIRA.
Jira (PUP-10511) Sensitive data type is lost when declaring multiple resources using title arrays
Title: Message Title Josh Cooper commented on PUP-10511 Re: Sensitive data type is lost when declaring multiple resources using title arrays Merged to 5.5.x in https://github.com/puppetlabs/puppet/commit/bfe98132bc83ce9718d2cb74325160655ed7f9fd. Add Comment This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.358908.1589483014000.86581.1592007300137%40Atlassian.JIRA.
Jira (PUP-10511) Sensitive data type is lost when declaring multiple resources using title arrays
Title: Message Title Josh Cooper commented on PUP-10511 Re: Sensitive data type is lost when declaring multiple resources using title arrays Ciprian Badescu could you add release notes? Add Comment This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.358908.1589483014000.86583.1592007360075%40Atlassian.JIRA.
Jira (PUP-10511) Sensitive data type is lost when declaring multiple resources using title arrays
Title: Message Title Ciprian Badescu updated an issue Puppet / PUP-10511 Sensitive data type is lost when declaring multiple resources using title arrays Change By: Ciprian Badescu Release Notes: Bug Fix Release Notes Summary: This commit is fixing support of sensitive data type parameters when declaring multiple resources using title arrays Add Comment This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.358908.1589483014000.86692.1592200200113%40Atlassian.JIRA.
Jira (PUP-10511) Sensitive data type is lost when declaring multiple resources using title arrays
Title: Message Title Claire Cadman updated an issue Puppet / PUP-10511 Sensitive data type is lost when declaring multiple resources using title arrays Change By: Claire Cadman Labels: doc_reviewed Add Comment This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.358908.1589483014000.101625.1594117800048%40Atlassian.JIRA.