aker-gateway / Aker

SSH bastion/jump host/jumpserver
Other
567 stars 81 forks source link

RE: Implement configuration of authorities #30 #33

Closed faux-eccles closed 7 years ago

faux-eccles commented 7 years ago
  1. Further improvements on reading the configuration from a JSON file.
  2. Shared configuration object.
  3. Some small documentation and spelling fixes.
faux-eccles commented 7 years ago

I think the authorities should be pulled out from the hosts module, I'll investigate dynamically loading them from a subdirectory eg:

/ | aker.py | hosts.py | authority.py | authorities / IPA.py | authorities / json.py

anazmy commented 7 years ago

Thanks man for the new pr ! Well it sounds a good idea to separate authorities for sake of code readability/maintenance , for the authorities subdir approach , what's your rationale here, some kind of modular plug-able setup ?

faux-eccles commented 7 years ago

I figured if it's resolved programmatically it can become easily extendable down the line. It might also prevent the need to update the AuthorityFactory in case a new one is added as they won't be hardcoded in. However at this point in time it doesn't seem that extra authorities are planned (Other than maybe AWS). There may be a better approach, but I'm not sure of a way of registering each authority to the factory without explicitly loading them.

anazmy commented 7 years ago

Looks great ! , I will be picking up on having proper hosts object for caching now