Skip to content

Commit fbcac06

Browse files
committed
(PUP-11602) Defaults crl_refresh_interval to 1 day
This commit changes the crl_refresh_interval from defaulting to "never" to 1 day.
1 parent ccc13fe commit fbcac06

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

lib/puppet/defaults.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,12 +1198,13 @@ def self.initialize_default_settings!(settings)
11981198
#{AS_DURATION}",
11991199
},
12001200
:crl_refresh_interval => {
1201+
:default => "1d",
12011202
:type => :duration,
12021203
:desc => "How often the Puppet agent refreshes its local CRL. By
1203-
default the CRL is only downloaded once, and never refreshed. If a
1204-
duration is specified, then the agent will refresh its CRL whenever it
1205-
next runs and the elapsed time since the CRL was last refreshed exceeds
1206-
the duration.
1204+
default the CRL is refreshed once every 24 hours. If a different
1205+
duration is specified, then the agent will refresh its CRL whenever
1206+
it next runs and the elapsed time since the CRL was last refreshed
1207+
exceeds the duration.
12071208
12081209
In general, the duration should be greater than the `runinterval`.
12091210
Setting it to an equal or lesser value will cause the CRL to be

spec/unit/ssl/state_machine_spec.rb

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
Puppet[:daemonize] = false
3131
Puppet[:ssl_lockfile] = tmpfile('ssllock')
3232
allow(Kernel).to receive(:sleep)
33+
allow_any_instance_of(Puppet::X509::CertProvider).to receive(:crl_last_update).and_return(Time.now + (5 * 60))
3334
end
3435

3536
def expected_digest(name, content)
@@ -526,12 +527,6 @@ def expect_lockfile_to_contain(pid)
526527
expect(File).to_not exist(Puppet[:hostcrl])
527528
end
528529

529-
it 'skips CRL refresh by default' do
530-
allow_any_instance_of(Puppet::X509::CertProvider).to receive(:load_crls).and_return(crls)
531-
532-
state.next_state
533-
end
534-
535530
it 'skips CRL refresh if it has not expired' do
536531
Puppet[:crl_refresh_interval] = '1y'
537532
Puppet::FileSystem.touch(Puppet[:hostcrl], mtime: Time.now)

0 commit comments

Comments
 (0)