You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe my understanding of certificates is incomplete, but I have a playbook where I'm updating a Root CA's CN an I was expecting a subsequent change to a child certificate which did not happen.
ISSUE TYPE
Bug Report
COMPONENT NAME
x509_certificate
ansible [core 2.12.2]
python version = 3.8.10 (default, Nov 26 2021, 20:14:08) [GCC 9.3.0]
COLLECTION VERSION
Collection Version
------------------ -------
community.crypto 2.2.1
cryptography==36.0.1
STEPS TO REPRODUCE
- hosts: localhostconnection: localgather_facts: novars:
root_csr: &root_csrpath: /tmp/a_root.csrprivatekey_path: /tmp/a_root.keyroot_crt: &root_crtpath: /tmp/a_root.crtcsr_path: /tmp/a_root.csrprivatekey_path: /tmp/a_root.keyprovider: selfsignedcert_crt: &cert_crtpath: /tmp/b_cert.crtcsr_path: /tmp/b_cert.csrownca_path: /tmp/a_root.crtownca_privatekey_path: /tmp/a_root.keyprovider: owncatasks:
- name: Setup - generate all private keyscommunity.crypto.openssl_privatekey:
path: /tmp/{{ item }}with_items:
- a_root.key
- b_cert.key
- name: generate root csr first timecommunity.crypto.openssl_csr:
<<: *root_csrcommon_name: initial root CN
- name: generate root CA cert first timecommunity.crypto.x509_certificate: *root_crt
- name: generate leaf cert CSRcommunity.crypto.openssl_csr:
path: /tmp/b_cert.csrprivatekey_path: /tmp/b_cert.keycommon_name: leaf certificate
- name: Generate leaf cert first timecommunity.crypto.x509_certificate: *cert_crt
- name: updates root csrcommunity.crypto.openssl_csr:
<<: *root_csrcommon_name: this is a new root CN
- name: updates root crtcommunity.crypto.x509_certificate: *root_crt
- name: reapply cert argsregister: reapply_cert_argscommunity.crypto.x509_certificate: *cert_crt
- name: One would expect that having updated the root certificate CN would result to a refresh of the leaf certificateassert:
that: reapply_cert_args.changed
EXPECTED RESULTS
The assertion passes (ie: the child certificate gets re-regenerated because the root CA's CN has been updated)
ACTUAL RESULTS
The assertion fails.
The text was updated successfully, but these errors were encountered:
I'm glad to hear as I was scratching my head when tweaking my test scenario for #399 and replaying the playbook multiple times before adding a bunch of conditional "force" that looked ugly to me.
SUMMARY
Hello,
Maybe my understanding of certificates is incomplete, but I have a playbook where I'm updating a Root CA's CN an I was expecting a subsequent change to a child certificate which did not happen.
ISSUE TYPE
COMPONENT NAME
x509_certificate
COLLECTION VERSION
STEPS TO REPRODUCE
EXPECTED RESULTS
The assertion passes (ie: the child certificate gets re-regenerated because the root CA's CN has been updated)
ACTUAL RESULTS
The assertion fails.
The text was updated successfully, but these errors were encountered: