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

Add support for generating additional certificates #29

Closed
wants to merge 2 commits into from

Conversation

rwaffen
Copy link
Member

@rwaffen rwaffen commented Nov 28, 2023

Add possibility to pregenerate and sign certificates for agents/API in the puppet ca.
The command will always output some error text, because it will always try to connect to the api on 8140, but this is not running yet.

If certificate does not yet exist:

Generating: test
Fatal error when running action 'generate'
  Error: Failed connecting to https://puppet:8140/puppet-ca/v1/certificate_request/
  Root cause: Failed to open TCP connection to puppet:8140 (Connection refused - connect(2) for "puppet" port 8140)
Successfully saved private key for test to /etc/puppetlabs/puppet/ssl/private_keys/test.pem
Successfully saved public key for test to /etc/puppetlabs/puppet/ssl/public_keys/test.pem

If certificate already exists

Generating: puppetboard
Error:
Existing file at '/etc/puppetlabs/puppet/ssl/private_keys/puppetboard.pem'
Existing file at '/etc/puppetlabs/puppet/ssl/public_keys/puppetboard.pem'
Please delete these files if you really want to generate a new cert for puppetboard.

Command:

docker run --rm \
  --name puppet \
  -e ADDITIONAL_CERTIFICATES="puppetboard,robert,test" \
  --hostname puppet ghcr.io/voxpupuli/container-puppetserver:main-7

@rwaffen rwaffen requested a review from a team as a code owner November 28, 2023 09:50
@rwaffen rwaffen added the enhancement New feature or request label Nov 28, 2023
@rwaffen
Copy link
Member Author

rwaffen commented Nov 28, 2023

hmm, mist, puppetserver generate only generates the keys, but no csr 🤔

@rwaffen
Copy link
Member Author

rwaffen commented Nov 28, 2023

generate works only when puppetserver is running, otherwise it won't generate the csr and will not sign it.

@rwaffen
Copy link
Member Author

rwaffen commented Nov 28, 2023

this does not work by design. closing here.

@rwaffen rwaffen closed this Nov 28, 2023
@rwaffen rwaffen deleted the add_additional_certificates branch December 5, 2023 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants