Skip to content

Conversation

@dforste
Copy link

@dforste dforste commented Nov 4, 2025

Should fix #948

@bwitt
Copy link
Contributor

bwitt commented Nov 20, 2025

None of the tests failed? Is this something that could be covered via tests?

@dforste
Copy link
Author

dforste commented Nov 21, 2025

@bwitt I have not written any tests for puppet in years.
A simple test if possible is:

  • configure puppetserver
  • Create a cert request (puppet agent [--certname NAME])
  • Sing a cert request (puppetserver ca sign --certname NAME) (fails currently)

@jcpunk
Copy link
Contributor

jcpunk commented Nov 26, 2025

This fixes an issue I'm hitting with my puppet server. I don't see any tests for the existing puppet::server::ca==true case with auth.conf.

This should be pretty close for tests:

diff --git a/spec/classes/puppet_server_spec.rb b/spec/classes/puppet_server_spec.rb
index dd8907a..a5664f6 100644
--- a/spec/classes/puppet_server_spec.rb
+++ b/spec/classes/puppet_server_spec.rb
@@ -524,6 +524,11 @@ describe 'puppet' do
           it 'should not sync the crl' do
             should_not contain_file('/etc/custom/puppetlabs/puppet/ssl/crl.pem')
           end
+          it { should contain_file("#{conf_d_dir}/auth.conf").with_content(%r{path":\s*"/puppet-ca/v1/certificate_renewal"}) }
+          it { should contain_file("#{conf_d_dir}/auth.conf").with_content(%r{path":\s*"/puppet-ca/v1/certificate_status"}) }
+          it { should contain_file("#{conf_d_dir}/auth.conf").with_content(%r{path":\s*"/puppet-ca/v1/certificate_statuses"}) }
+          it { should contain_file("#{conf_d_dir}/auth.conf").with_content(%r{path":\s*"/puppet-ca/v1/sign"}) }
+          it { should contain_file("#{conf_d_dir}/auth.conf").with_content(%r{path":\s*"/puppet-ca/v1/sign/all"}) }
         end
       end

jcpunk added a commit to jcpunk/puppet-puppet that referenced this pull request Nov 26, 2025
@bwitt
Copy link
Contributor

bwitt commented Nov 26, 2025

@dforste I'm adding tests at dforste#1 ; how do those look?

Add tests for auth.conf file content in puppet_server_spec.rb
@dforste
Copy link
Author

dforste commented Nov 29, 2025

Added both spec tests. Let me know if this is good enough.

@bwitt
Copy link
Contributor

bwitt commented Nov 29, 2025

@dforste looks like we need a few more fixes dforste#2

@yakatz
Copy link

yakatz commented Dec 1, 2025

This fixes the issue for me - loading it directly and not waiting for a release. Thank you!

@dforste
Copy link
Author

dforste commented Dec 2, 2025

@ehelms do you think this is good enough to merge? Is there anything that might be missing? We ran into this when installing the latest openVox / Puppet 8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Puppetserver signing endpoint missing from auth.conf

4 participants