Skip to content

Fix warning introduced in #1240 (08a1752) #1249

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Fix warning introduced in #1240 (08a1752) #1249

wants to merge 1 commit into from

Conversation

smortex
Copy link
Collaborator

@smortex smortex commented Feb 26, 2021

unless does not accept a Sensitive parameter, and passing one result in a warning being output:

(/Postgresql_psql[ALTER ROLE puppetdb ENCRYPTED PASSWORD ****]) Unable to mark 'unless' as sensitive: unless is a parameter and not a property, and cannot be automatically redacted.

This is not really an issue here since this query is not displayed in the logs, even in debug mode.

@smortex smortex requested a review from a team as a code owner February 26, 2021 03:55
@puppet-community-rangefinder
Copy link

postgresql::server::role is a type

Breaking changes to this file WILL impact these 18 modules (exact match):
Breaking changes to this file MAY impact these 6 modules (near match):

This module is declared in 71 of 576 indexed public Puppetfiles.


These results were generated with Rangefinder, a tool that helps predict the downstream impact of breaking changes to elements used in Puppet modules. You can run this on the command line to get a full report.

Exact matches are those that we can positively identify via namespace and the declaring modules' metadata. Non-namespaced items, such as Puppet 3.x functions, will always be reported as near matches only.

@smortex smortex changed the title Fix warning introduced in 08a175217adcb6466ab468c2ae5d7f7c3409f270 Fix warning introduced in 08a1752 Feb 26, 2021
@codecov-io
Copy link

codecov-io commented Feb 26, 2021

Codecov Report

Merging #1249 (b999ea3) into main (08e3a51) will decrease coverage by 31.16%.
The diff coverage is 23.33%.

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #1249       +/-   ##
===========================================
- Coverage   65.81%   34.64%   -31.17%     
===========================================
  Files          14       14               
  Lines         351      381       +30     
===========================================
- Hits          231      132       -99     
- Misses        120      249      +129     
Impacted Files Coverage Δ
...ns/postgresql/postgresql_acls_to_resources_hash.rb 0.00% <0.00%> (ø)
...b/puppet/functions/postgresql/postgresql_escape.rb 0.00% <0.00%> (ø)
...puppet/functions/postgresql/postgresql_password.rb 0.00% <ø> (ø)
lib/puppet/functions/postgresql_escape.rb 0.00% <ø> (ø)
lib/puppet/functions/postgresql_password.rb 0.00% <ø> (ø)
lib/puppet/provider/postgresql_conf/parsed.rb 100.00% <ø> (ø)
.../puppet/provider/postgresql_conn_validator/ruby.rb 0.00% <ø> (-80.00%) ⬇️
...uppet/provider/postgresql_replication_slot/ruby.rb 37.93% <0.00%> (-37.94%) ⬇️
lib/puppet/type/postgresql_conf.rb 93.33% <ø> (ø)
lib/puppet/type/postgresql_conn_validator.rb 0.00% <ø> (-100.00%) ⬇️
... and 9 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 587fc12...b999ea3. Read the comment docs.

`unless` does not accept a Sensitive parameter, and passing one result
in a warning being output:

```
(/Postgresql_psql[ALTER ROLE puppetdb ENCRYPTED PASSWORD ****]) Unable to mark 'unless' as sensitive: unless is a parameter and not a property, and cannot be automatically redacted.
```

This is not really an issue here since this query is not displayed in
the logs, even in debug mode.
@smortex
Copy link
Collaborator Author

smortex commented Feb 26, 2021

Cc authors of #1240 : @DavidS @sheenaajay

@smortex smortex changed the title Fix warning introduced in 08a1752 Fix warning introduced in #1240 (08a1752) Feb 26, 2021
@sheenaajay
Copy link
Contributor

@smortex Thanks alot for the quick fix.Much appreciated for your time.
Just wondering if we need a sanitisation mechanism to avoid shell injection for the values passed for username/password.

@ekohl
Copy link
Collaborator

ekohl commented Mar 2, 2021

Since that never was in place, perhaps this should be merged now to avoid the regression (warning). I can't think of a solution that does work.

@sheenaajay
Copy link
Contributor

Thanks @ekohl and @smortex .Just had a quick discussion with team and we are looking into it. Will get the fix in. Thank you.

@sheenaajay
Copy link
Contributor

Following ticket is opened for sensitive data support needed for unless command
https://tickets.puppetlabs.com/browse/PUP-10950. Thank you.

@sheenaajay
Copy link
Contributor

Following changes added to fix the warning message. Thank you.
#1258

@smortex
Copy link
Collaborator Author

smortex commented Mar 18, 2021

Replaced by #1258

@smortex smortex closed this Mar 18, 2021
@smortex smortex deleted the fix-warning branch March 18, 2021 02:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants