Skip to content

Latest commit

 

History

History
71 lines (38 loc) · 2.73 KB

File metadata and controls

71 lines (38 loc) · 2.73 KB

Next Plan:

  • Ask for a Fernt key from user when the bot starts! Without this bot will not get initialized ( no commands other than /fernet_key will be working) - DONE

  • If it doesnt get fernet key then send the brodcast alert to all the users that I can not operate , please send the fernet! - DONE

  • Fernet key should be given like /fernet_key "" - DONE

  • Fernet key should be given like /fernet_key "" ( only once by any one user ) if its there and someone else also give that key or any other key just say that fernte key has already been given by user_name - DONE

  • Now using this fernet key, store all the encrypted unseal keys using the given fernet key - DONE

  • Add handler /auto_unseal "True" which will enable the auto unsealing - "False" will disable it - DONE

  • Accept vault urls and name in key value pair , this variable VAULT_HOST="" should be discarded and replace it with the json file named vault_hosts.json

    which should have key value pair like

    name: url vault1: url1 vault2: url2 vault3: url3

  • Bot sohuld check the vault status for all these given vaults ( configure in json )

  • If any vault is down then send a broadcast msg to all users that the "vault_name with the url" is down

  • And at the same time auto unseal it using the stored encrypted unseal keys ! obviously you should decrypte the key first! - DONE

  • Nice to have: /vault_init vault_name

    ( this handler will initialize the vault with the default total_key_share and require_key_share )

    But before this check if the vault is initialized or not? then only proceed

    This will initialize the vault and store the encrypted unseal keys on disk ( at this location /data/unsealkeys/vaut_name )

    This handler will return error if the given vault name is not found in configured json

  • Also all the vault data ( encrypted unseal keys will stored at /data/unsealkeys/vault_name ) - DONE

  • /unseal command will be used as /unseal vault_name "" ( the vault name will be checked in configured json)

  • /rekey_init_keys will be used as /rekey_init_keys vault_name ""

  • Newely generated unseal keys by rekey process should update the encrpted data on disk (here /data/unsealkeys/vault_name) - DONE

    And at the same should send the original each key to respective user ( which we already have ) - DONE

  • /vault_status will be used as /vault_status vault_name

  • Nice to have : If possible improve menu card

  • Nice to have : If possible give /dashboard which shows all the vaults name in green if unsealed , in red if sealed

Fernte Example:

  • /fernet_key "-YcQiZeifWj8_p0PfYz6Y9CAnKAP4PSuoRqxeTqO0uY="

Generated by this

from cryptography.fernet import Fernet

# Generate a key
key = Fernet.generate_key()
print(key.decode())  # Display the key