Hi,
that would work.
Couldn't you instead have just (from the agent)
1. puppet agent --one-time --certname <certname-here>
to upload a CSR, then on the master
2. sign the cert using puppet ca
and then have the agent download it via another puppet agent call?
Of course, you still need to scrounge the chain together from the
various certs cached by the agent, but it should all be there.
Cheers,
Felix