wip
This commit is contained in:
parent
4caf0a4a19
commit
715a27edc7
5 changed files with 4 additions and 4 deletions
|
@ -62,6 +62,7 @@ files = {
|
||||||
'/usr/lib/nagios/plugins/check_apt_upgradable': {
|
'/usr/lib/nagios/plugins/check_apt_upgradable': {
|
||||||
'mode': '0755',
|
'mode': '0755',
|
||||||
},
|
},
|
||||||
|
# /etc/kernel/postinst.d/apt-auto-removal
|
||||||
}
|
}
|
||||||
|
|
||||||
actions = {
|
actions = {
|
||||||
|
|
|
@ -2,12 +2,14 @@ directories = {
|
||||||
'/etc/redis': {
|
'/etc/redis': {
|
||||||
'purge': True,
|
'purge': True,
|
||||||
'owner': 'redis',
|
'owner': 'redis',
|
||||||
|
'mode': '2770',
|
||||||
'needs': [
|
'needs': [
|
||||||
'pkg_apt:redis-server',
|
'pkg_apt:redis-server',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
'/var/lib/redis': {
|
'/var/lib/redis': {
|
||||||
'owner': 'redis',
|
'owner': 'redis',
|
||||||
|
'mode': '0750',
|
||||||
'needs': [
|
'needs': [
|
||||||
'pkg_apt:redis-server',
|
'pkg_apt:redis-server',
|
||||||
],
|
],
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
# https://stackoverflow.com/a/18266970
|
# https://stackoverflow.com/a/18266970
|
||||||
|
|
||||||
from Crypto.PublicKey import RSA
|
from Crypto.PublicKey import RSA
|
||||||
from Crypto.Hash import HMAC
|
|
||||||
from struct import pack
|
from struct import pack
|
||||||
from hashlib import sha3_512
|
from hashlib import sha3_512
|
||||||
from cryptography.hazmat.primitives.serialization import load_der_private_key
|
from cryptography.hazmat.primitives.serialization import load_der_private_key
|
||||||
from functools import cache
|
from functools import cache
|
||||||
from cache_to_disk import cache_to_disk
|
|
||||||
|
|
||||||
|
|
||||||
class PRNG(object):
|
class PRNG(object):
|
||||||
|
@ -22,7 +20,6 @@ class PRNG(object):
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
@cache_to_disk(30)
|
|
||||||
def _generate_deterministic_rsa_private_key(secret_bytes):
|
def _generate_deterministic_rsa_private_key(secret_bytes):
|
||||||
return RSA.generate(2048, randfunc=PRNG(secret_bytes)).export_key('DER')
|
return RSA.generate(2048, randfunc=PRNG(secret_bytes)).export_key('DER')
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
|
'dummy': True,
|
||||||
'hostname': '192.168.179.20',
|
'hostname': '192.168.179.20',
|
||||||
'groups': [
|
'groups': [
|
||||||
'debian-12',
|
'debian-12',
|
||||||
|
|
|
@ -3,5 +3,4 @@ pycryptodome
|
||||||
PyNaCl
|
PyNaCl
|
||||||
PyYAML
|
PyYAML
|
||||||
pyqrcode
|
pyqrcode
|
||||||
cache_to_disk
|
|
||||||
setuptools
|
setuptools
|
||||||
|
|
Loading…
Reference in a new issue