pylti1.3
pylti1.3 copied to clipboard
support public/private key files in `ToolConfDict`
The ToolConfJsonFile
class includes support for reading the public and private key files based on the contents of the public_key_file
and private_key_file
config properties. The ToolConfDict
class, on which it is based, does not. If the dictionary support class could use those same properties to load the key files, it would allow us to simplify our code. We currently end up duplicating the code of ToolConfJsonFile._process_iss_conf_item
in our code.
I think if this were supported in the dictionary class, you couldn't support _configs_dir
the same way, but it wouldn't be a major problem.
I have a idea of how this could be implemented. I can open a pull request for this, if you'd like.
hi @lsloan . Sorry for delay.
Could you please explain why you don't use ToolConfJsonFile
if you store public
/private
keys in files?
ToolConfDict
was designed to present configuration as dictionary. it just provides methods set_public_key
/set_private_key
to add keys but by design it should not aware how you store keys. You may store keys in database or get them from the API call. ToolConfJsonFile
class was created specially to cover filesystem
case.