-
Notifications
You must be signed in to change notification settings - Fork 32
Add certs expiry params #456
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
Changes from all commits
e5ce60d
57408c7
06396c8
ab2ec71
5e15694
3484cc6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| --- | ||
| variables: | ||
| certificates_ca_validity_days: | ||
| help: Lifetime of the generated CA certificate, in days. | ||
| parameter: --certificate-ca-validity-days | ||
| certificates_validity_days: | ||
| help: Lifetime of the generated server and client certificates, in days. | ||
| parameter: --certificate-validity-days | ||
| certificates_renew: | ||
| help: Regenrate server and client certificates previously generated by foremanctl. Does not regenerate the CA. | ||
| parameter: --certificate-renew | ||
|
Comment on lines
+2
to
+11
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If I set the expiration period for both the My second point is that Also, you mentioned that the certificate is considered to have a lifetime. What exactly does that mean if I explicitly set its validity period to 5 days?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Is it something that we previously set up?
We have discussed it previously: CA renewal is a process and I want to treat it in a separate story.
I may be missing something, but if you set validity period to 5 days, it means that the lifetime of the certificate would be 5 days from the run of the module. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I guess no, i do not see in the old installer. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If the server and client certificates have expired and I want to renew them, will this work using this option? I tried renewing the expired server and client certificates, but it does not seem to be supported. Is it required to have a valid CA certificate first before renewing the server and client certificates?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
was the CA expired too?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can do both. In the shorter case, I guess you will be getting the default validity (7300 days). Unless @evgeni says that we preserve the validity days parameter by default.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yes, the CA has to be valid. We are signing the server and client certs with the CA. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yes, the CA certificate has also expired.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
If you haven't marked it as |
||
| action: store_true | ||
| persist: false | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Flashbacks to theforeman/foreman-installer#764 and this nice feeling that today it's just a |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,7 +28,8 @@ | |
| ownca_path: "{{ certificates_ca_directory_certs }}/ca.crt" | ||
| ownca_privatekey_path: "{{ certificates_ca_directory_keys }}/ca.key" | ||
| ownca_privatekey_passphrase: "{{ certificates_ca_password }}" | ||
| ownca_not_after: "+7300d" | ||
| ownca_not_after: "+{{ certificates_validity_days }}d" | ||
| force: "{{ certificates_renew | bool }}" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMHO here we see the real value of using |
||
|
|
||
| - name: 'Create client private key' | ||
| community.crypto.openssl_privatekey: | ||
|
|
@@ -58,4 +59,5 @@ | |
| ownca_path: "{{ certificates_ca_directory_certs }}/ca.crt" | ||
| ownca_privatekey_path: "{{ certificates_ca_directory_keys }}/ca.key" | ||
| ownca_privatekey_passphrase: "{{ certificates_ca_password }}" | ||
| ownca_not_after: "+7300d" | ||
| ownca_not_after: "+{{ certificates_validity_days }}d" | ||
| force: "{{ certificates_renew | bool }}" | ||
Uh oh!
There was an error while loading. Please reload this page.