Conversation
This lets you run some arbitrary code after something's been stored, so you can rehash nginx or whatever.
|
I should say this was mostly a proof of concept; I don't expect this to get merged as-is because it has no docs. But, how's it look? |
|
Oops yeah I just remembered this is also the bit with the super crappy attempt at getting hypothesis and testtools to work together. That should definitely be split off into a PR for hypothesis. |
|
This seems like a generally useful feature. Adding it to the endpoint as a kwarg is a bit tricky, since any kwargs we use for ourselves will mask kwargs in the endpoint we're wrapping... maybe @glyph has some thought about the Right Thing To Do here since I haven't thought about it too much myself yet. We should add it to the docs, of course, and I see the tests are failing on Python 3 because of str/bytes issues (to nobody's surprise), but those should be easy things to fix. |
|
A thought: Make the "on stored callback" (maybe this could be implemented with the same mechanism that For the "run arbitrary scripts" idea you could always provide a Python function (it may even be in txacme itself) that implements this behaviour on top of the "on stored callback" function. |
|
We already have a directory with certain enforced naming conventions. Perhaps just put a script in there, |
|
I was hoping to avoid checking |
|
No, I mean, put it in the certificates directory. |
|
Right. Have a single |
|
Okay, so the hook script behaviour will be hardcoded for the endpoint parser, and "always on". I think @jonathanj is right that the underlying interface should just be |
|
Sounds like a good strategy to me. |
Current coverage is 99.75%
@@ master #27 diff @@
=========================================
Files 20 20
Lines 1535 1579 +44
Methods 0 0
Messages 0 0
Branches 139 128 -11
=========================================
+ Hits 1535 1575 +40
- Misses 0 2 +2
- Partials 0 2 +2
|
|
I'm +1 on @jonathanj's suggestion that there should be a callback for certificate changes. For now I've implemented a wrapper for Another problem with having |
|
+1 for callback on certificate updates for the default CertificateStore implementation. I have implemented by own For the file based CertificateStore I am expecting the callback to also include the full path to the updated file. |
This was the major blocker for me adopting txacme: some services need to be told to reload keys/certs from disk.
This change is