Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Adds method to force regeneration of certs #21
Conversation
chuckbutler
referenced this pull request
in juju-solutions/layer-swarm
Apr 25, 2016
Merged
SSL Termination with custom SSL Config #4
|
This also seems to correct the behavior of #22 when adding the force param. |
mbruzek
reviewed
Apr 25, 2016
| + ''' Allow the calling layer to modify settings, and trigger the | ||
| + certificates to be re-generated (perhaps we updated the openssl conf) | ||
| + ''' | ||
| + print(' ==> regenerating certificates') |
|
I took a preliminary look at this code change. It seems a bit drastic to delete the entire easy-rsa directory to configure easy-rsa. Perhaps the reason you were having trouble configuring easy-rsa before it generated the certificate is the reactive framework runs all valid states asynchronously, the theory being your valid state was racing with the ca certificate creation. As an alternate solution: How about adding an intermediary state between install() and the check_ca_status() method. This state could be triggered when |
|
@mbruzek - Point taken regarding wholesale removal of the PKI DB. After some additional poking, this has been refactored to introduce and use an intermediary state which will invoke the proper reactive handler in the calling layer (in this case, swarm) letting it reconfigure the easyrsa configuration prior to generating the certs, without deleting anything. can you TAL? |
mbruzek
reviewed
Apr 25, 2016
| @@ -15,6 +15,7 @@ | ||
| from charmhelpers.core import hookenv | ||
| from charmhelpers.core import unitdata | ||
| +from charmhelpers.core.hookenv import log |
mbruzek
Apr 25, 2016
Contributor
Minor nit, I don't see any of your new code using the log import. pep8 would not approve
|
One minor nit that should not prevent this code from going in. I did not test this code, but watched it work on @chuckbutler 's console. |
chuckbutler commentedApr 25, 2016
WIP - For talking points presently
Introduces the 'tls.regenerate_certificates' state, which allows consumer layers to reconfigure the primary ssl configuration certificate (on the master)
This has a side-effect of removing the flat file PKI database that is initially generated during TLS setup. This is unfortunate, but is a work-around to conform to expectations of the leader.
Follower behavior should be unchanged with this behavior.