-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a more flexible and secure authentication and security critical configuration handling. #2
Conversation
Just a drive-by comment: idiomatic Django would be to put all configuration in What is the advantage of putting config into a |
I can't exactly put PostgreSQL connection details into The config class is there to punt out the security critical information out of the regularly committed code and into an external, not committed, file. As for why YAML: I could continue with having my postgresql data in one config (I don't know, maybe even the |
Okay, got it - that makes sense. A few suggestions. I think it makes sense to rename this to something like A separate question is whether
Reading secrets from a file, though, is just fine too if that's what you prefer. |
Configuration class that maps YAML dictionaries to instance attributes. Should be flexible enough when in the future we transition to PostgreSQL DBMS. Removed security key logic out of settings.py.
Add equality comparison operator for Config. Make a test directory for trails app, add example config files. Write tests.
Add a more explicitly named class for database configs. Rename config file to secrets since that's the intended use. Add the bit of functionality that isolates the desired keys from the entire yaml to simplify use. Update tests.
Add secrets resolution via AWS Secrets manager for simple and multi-keyed secrets. Add tests. Add documentation.
Hello @spenczar - sorry for the long delay, between various obligations I quite literally could not make any significant progress in last two weeks before this weekend. I took to heart your recommendations and renamed the class, I added, and tested in deployment, functionality for secrets. |
Let's close this out so we're not blocking #3 anymore |
Added a
Config
class that reads things from a YAML config file. This is more flexible and more practical going forward.Should be improved perhaps to better mask security critical information. The problem is that it's long lived and globally accessible. Will do for now.