Skip to content
Snippets Groups Projects
Verified Commit ed74d7bc authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Read secret config file

parent 28fa5862
No related branches found
No related tags found
No related merge requests found
...@@ -34,6 +34,11 @@ pub fn get_config(conf_args: Option<config::Config>) -> config::Config { ...@@ -34,6 +34,11 @@ pub fn get_config(conf_args: Option<config::Config>) -> config::Config {
}; };
conf.merge(config::File::with_name(&config_file)).ok(); conf.merge(config::File::with_name(&config_file)).ok();
// Add config from same file with .secret appended, so that OAuth client secrets can be
// placed into a file only readable by root to force users to only ever use their user
// token acquired using PAM
conf.merge(config::File::with_name(&(config_file + ".secret"))).ok();
// Override configuration from environment variables // Override configuration from environment variables
conf.merge(config::Environment::with_prefix(BASE_NAME.to_string().to_uppercase().as_str())).ok(); conf.merge(config::Environment::with_prefix(BASE_NAME.to_string().to_uppercase().as_str())).ok();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment