pgagroal
pgagroal copied to clipboard
Allow `pgagroal-admin` to specify where to store the master key password file
When pgagroal-admin
is invoked to generate a master key, i.e., with the master-key
command, it generates the file into $HOME/.pgagroal/master,key
, and such location is not configurable.
Users could require to store the private pgagroal
stuff into another location, for example `~/.config~.
There is therefore the need for pgagroal-admin
to have a command line option for the master-key
command to specifiy where to put (and hence, read from) the master key file.
The management TLS files are also loaded from there...
@palak-chaturvedi is working on this
v001-Adding_File_Name.patch I worked on this and made the changes. I just wanted to know if there is a specific code formatter that I have to run?
@fluca1978 @jesperpedersen https://github.com/palak-chaturvedi/pgagroal/tree/addingFileName
This a branch in my github.
@palak-chaturvedi you should create a pull request for this, please. In the meantime, I took a look at the patch, and while the work is nice, this cannot be imported. The "master.key" file name is used in different places around the code, for example in security.c. Therefore, I would rather not change the filename as you did, but change the directory where to store the file named 'master.key'. At glance, the way to go could be to modify pgagroal_get_home to be able to detect if a different location rather than ~/.pgagroal has to be used.
Ok I will Can I store the required location in a variable or we need an argument for it? @fluca1978
Ok I will Can I store the required location in a variable or we need an argument for it? @fluca1978
You are free to propose the solution you think is the best, and can also improve it later after a review. One optimal approach, but longer, could be to introduce a configuration tunable for the location to where store the files.
But let's go with calm and see your idea first.
created a pull request. @fluca1978 https://github.com/agroal/pgagroal/pull/430