This message was deleted.
# puppet
s
This message was deleted.
l
I wrote a systemd timer to grab it every hour or so, I wish it was built into puppetserver that if it isn't a CA it syncs the CA CRL every once in a while
b
a compiler isn't aware of other servers, so it cannot sync automatically
however the agent has a crl_refresh interval
and the puppetserver can use that file
l
except at the same time, the puppetserver won't start without the crl
this is specific to a compiler that is not also a CA
b
yeah that's a different story
we usually bootstrap compilers via puppet so that's not a problem
because the initial puppet agent run provides the crl
l
I do too, but my CA isn't also a compiler, so I use puppet apply as an initial install step
but that is a thought for my next infra pass, make the CA the puppet infra's initial puppet compiler
s
After spending some time with this yesterday I think I was in a tight grip of a misunderstanding on how CRLs work. I thought that when a puppet agent initiates a run and contacts the puppet server, the latter checks the agent against the CRL. For that reason I wanted to make sure that the servers had the latest CRL. What seems to really be happening is that like in any SSL handshake, the onus of checking the CRL is on the client. I noticed for example that if you delete the CRL from the client, it will retrieve it from the CA — the puppet server (compile master) is hands off in that process. Are my conclusions correct?
l
yes, the agent requests an update to the crl once every crl_refresh
6 hrs
s
https://www.puppet.com/docs/puppet/7/configuration.html#crl-refresh-interval
By default the CRL is only downloaded once, and never refreshed
l
I want to say that changed
s
i was surprised because i definitely see crls that are back from 2021 in my environment
looks to changed in 7.13
maybe I am wrong
b
crl_refresh_interval is available since puppet 7 and enabled by default in puppet 8
s
do you guys know if a jruby worker is used to serve the CRL?
b
yes
s
bummer, this could be a problem with a large number of clients
b
works well with a few 10k nodes
and if that doesnt work for you there are other options, for example a proxy in front of it, lower refresh interval or intermediate CAs
l
it'd be a very short worker time honestly
b
unless you have a function with memory leaks, I recommend to not flush the workers
s
Hmm, how would a proxy work? It would need to run on a different port and the client would need to be aware of it somehow?
l
you'd stick nginx in front of puppet and set it to cache the crl for X minutes
that would also offload ssl to nginx
👍 1
s
Oh, you’re right, in fact it could intercept that particular path and serve it directly?
b
yes
or disable the crl_refresh and use a file resource to handle it and fetch it from another webserver on your CA
but again that's usually not required
s
Actually, I’m scratching my head over the purpose of the CRL. Usually it’s for CAs to publish the ids of the revoked certs for the client to abort connecting to a server whose cert id is on the CRL. In the context of the puppet server though, we have agents connecting to compile masters — should the CRL only contain possibly revoked certs of one or more compile masters?
l
you can also use the ca against other systems (monitoring etc) and so having a global crl sync can be useful
s
ok, but it shouldn’t be used to contain revoked agent certs right?
l
I would think it should (and I think it does)
s
right it does, but what for is my question
l
if there's anything other then puppet using the ca? (which is a thing), and I am pretty sure the standard says all revoked certs are in the crl
s
nothing else uses the CA
it’s a bubble
l
for you
s
puppet to puppet
l
we use it for zabbix too
s
yes, i meant for me
say i don’t use it for anything else — is there something in the puppet-to-puppet infrastructure that could use revoked agent certs?
l
not that I am aware of, but the crl is tiny, even if you have 1000s of revokes
b
there is also an option of have an infra CRL, which is shorte
s
The Puppet Server CA can create a CRL that contains only revocations of those nodes that agents are expected to talk to during normal operations, for example, compilers or hosts that agents connect to as part of agent-side functions
that corroborates my understanding — thank you!
Though no, that document doesn’t explain why the full CRL is needed. Logically speaking, i think it can only be useful if the client can recognize its own serial as being on the list and stop at that point?
b
It's not needed, that's the point of the document
you can work with the infra CRL if you like. But Puppet cannot provide that by default because it doesn't know what your infra nodes are. You've to configure it
s
my experience shows that if an agent’s cert is on the CRL and the CRL is given to the agent, the agent will refuse to run with a message (in red) saying that the signature of the cert is wrong
have you observed that as well?
b
I'm not 100% sure, but that behaviour is likely