my $pve_auth_key_cache = {};
-my $ticket_lifetime = 3600*2; # 2 hours
-# TODO: set to 24h for PVE 6.0
-my $authkey_lifetime = 3600*0; # rotation disabled
+my $ticket_lifetime = 3600 * 2; # 2 hours
+my $authkey_lifetime = 3600 * 24; # rotate every 24 hours
Crypt::OpenSSL::RSA->import_random_seed();
case "$1" in
configure)
- # TODO: enable for PVE 6.0
-# if test -n "$2"; then
-#
-# # TODO: remove once PVE 7.0 is released
-# if dpkg --compare-versions "$2" 'lt' '6.0-1'; then
-# if test ! -e /etc/pve/authkey.pub.old; then
-# # reset key age to prevent immediate invalidation of all current tickets
-# touch -d "-2 hours" /etc/pve/authkey.pub || true
-# fi
-# fi
-#
-# fi
+ if test -n "$2"; then
+
+ # TODO: remove once PVE 7.0 is released
+ if dpkg --compare-versions "$2" 'lt' '6.0-0+1'; then
+ if test ! -e /etc/pve/authkey.pub.old; then
+ # reset key age to prevent immediate invalidation of all current tickets
+ touch -d "-2 hours" /etc/pve/authkey.pub || true
+ fi
+ fi
+
+ fi
;;
esac