Skip to content

Commit

Permalink
Fixes #35944 - Hide content of autosign script.
Browse files Browse the repository at this point in the history
The content may contain sensitive information about your signing
policies.  This script might not qualify as `sensitive` but it
probably is something to protect.
  • Loading branch information
jcpunk committed Jan 13, 2023
1 parent d1e6b34 commit e827a21
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
13 changes: 7 additions & 6 deletions manifests/server/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,13 @@
$autosign_content = undef
}
file { $puppet::server::autosign:
ensure => file,
owner => $puppet::server::user,
group => $puppet::server::group,
mode => $puppet::server::autosign_mode,
content => $autosign_content,
source => $puppet::server::autosign_source,
ensure => file,
owner => $puppet::server::user,
group => $puppet::server::group,
mode => $puppet::server::autosign_mode,
content => $autosign_content,
source => $puppet::server::autosign_source,
show_diff => false,
}
}

Expand Down
2 changes: 1 addition & 1 deletion spec/classes/puppet_server_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
it { should_not contain_puppet__config__agent('http_read_timeout') }
it { should_not contain_file("#{confdir}/custom_trusted_oid_mapping.yaml") }

it { should contain_file("#{confdir}/autosign.conf") }
it { should contain_file("#{confdir}/autosign.conf").with_show_diff(false) }
it { should_not contain_file("#{confdir}/autosign.conf").with_content(/# Managed by Puppet/) }
it { should_not contain_file("#{confdir}/autosign.conf").with_content(/foo.bar/) }

Expand Down

0 comments on commit e827a21

Please sign in to comment.