Project

General

Profile

Actions

Feature #21645

open

Remove autosign entry when certificate is signed

Added by Roger Mårtensson over 6 years ago. Updated over 6 years ago.

Status:
Need more information
Priority:
Normal
Assignee:
-
Category:
PuppetCA
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

It would be nice if it was possible enable automatic removal of autosign entries when they get signed. (exact match)
This could be a global setting.

Another way is to enabled for specific entries. (Example: Via API setting like "remove_when_signed": "true")

This would help auto-deploy scenarios without needing to build extra scheduled tasks to clean up old autosign entries.

Actions #1

Updated by Marek Hulán over 6 years ago

  • Category changed from API to PuppetCA

I suppose you mean when you explicitly sign the certificate request. I suppose a new parameter to the API could be added, something like "delete_matching_autosign_record". I'm not sure how we'd deal with it in UI though.

Actions #2

Updated by Roger Mårtensson over 6 years ago

I mean that autosign entry will be removed from the autosign list when the autosign-action on certificate has happened.
Example: I add hostname to autosign list, I install puppet, puppet talks to server, server see the autosign on hostname and signs host certificate, autosign entry is removed.

I could ofcourse do this in deploy-scripts etc but I think it should be part of foreman/api.

Actions #3

Updated by Marek Hulán over 6 years ago

I think this already happens when you provision a host from Foreman. I'm not sure how we'd hook into puppet ca code so we could contact Foreman to remove the autosign entry when puppet ca signs the request. If this is the flow, it is perhaps RFE for puppet ca itself?

Actions #4

Updated by Roger Mårtensson over 6 years ago

I don't provision via Foreman but via other means.

Actions #5

Updated by Marek Hulán over 6 years ago

So I wonder how Foreman is involved in the process if at all. The certificate request and signign process happens between puppet agent and puppet ca. There's no communication with Foreman at this point. Am I missing something?

Actions #6

Updated by Marek Hulán over 6 years ago

  • Status changed from New to Need more information
Actions #7

Updated by Roger Mårtensson over 6 years ago

That's why I filed this feature request. Currently if I add an autosign-entry it will stay there until removed. I can work around it but would prefer it to be done by Foreman. Feels a bit safer if it's removed after successful signing.

Actions #8

Updated by Marek Hulán over 6 years ago

I don't see how Foreman would be notified from puppet ca that it's the time for deletion. I think this RFE should be opened at puppet issue tracker since Foreman is not involved in this process. We could add something that would periodically scan for signed certs and clean autosign entries, but it does not feel it belongs to our domain. Of course I could be wrong, so keeping this open for others to jump in.

Actions

Also available in: Atom PDF