Skip to content
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

Use Sensitive for Secrets #973

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

cocker-cc
Copy link

@cocker-cc cocker-cc commented Jul 9, 2024

Pull Request (PR) description

To not reveal Secrets, accept Datatype Sensitive. Render Templates as sensitive Content, if Secrets were given as Sensitive.

This Pull Request (PR) fixes the following issues

Fixes #950

Addendum

@teluq-pbrideau 2022-12 also made a PR #857, which has not been merged yet.

To not reveal Secrets, accept Datatype Sensitive.  Render
Templates as sensitive Content, if Secrets were given as Sensitive.
@teluq-pbrideau
Copy link
Contributor

teluq-pbrideau commented Jul 9, 2024

I am mistaken or the password sensitive information will still be displayed in clear text as it is still an .erb template?

@Valantin
Copy link
Contributor

Valantin commented Jul 9, 2024

Can you remove the non related edit from the commit?
A lot of indentation change not strict related.
Can we wait until you implement new template?

@cocker-cc
Copy link
Author

I am mistaken or the password sensitive information will still be displayed in clear text as it is still an .erb template?

The rendered ERB-Template is wrapped, if the Password initially was given as Sensitive:

    content => if $database_password =~ Sensitive {
      Sensitive(template('zabbix/web/zabbix.conf.php.erb'))
    } else {
      template('zabbix/web/zabbix.conf.php.erb')
    },

@cocker-cc
Copy link
Author

cocker-cc commented Jul 9, 2024

Can you remove the non related edit from the commit?
A lot of indentation change not strict related.

The Github-Pipeline gave me Warnings about Indentation. So I corrected the Indentation, because I added Datatypes, which shifted the = to the right.
Suggestion: someone else corrects the Indentation in master and I will rebase against master.

Can we wait until you implement new template?

I will not implement new Templates. I am only here to educate this Module using Sensitive.

@Valantin
Copy link
Contributor

ok, I've misunderstud the TODO comment

I'm checking the CI to fix the failure, next try to fix indentation

@teluq-pbrideau
Copy link
Contributor

I am mistaken or the password sensitive information will still be displayed in clear text as it is still an .erb template?

The rendered ERB-Template is wrapped, if the Password initially was given as Sensitive:

    content => if $database_password =~ Sensitive {
      Sensitive(template('zabbix/web/zabbix.conf.php.erb'))
    } else {
      template('zabbix/web/zabbix.conf.php.erb')
    },

Oh, I see. Maybe make sure it is the same in server.pp and proxy.pp then?

@cocker-cc
Copy link
Author

Oh, I see. Maybe make sure it is the same in server.pp and proxy.pp then?

You are right. adapted the other sensitive rendered Templates also. Thanks.

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.

Accept Datatype Sensitive[String] for Passwords
3 participants