Skip to content
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

Allow pgagroal-admin to specify where to store the master key password file #419

Open
fluca1978 opened this issue Mar 23, 2024 · 8 comments
Labels
feature New feature

Comments

@fluca1978
Copy link
Collaborator

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.

@fluca1978 fluca1978 added the feature New feature label Mar 23, 2024
@jesperpedersen
Copy link
Collaborator

The management TLS files are also loaded from there...

@fluca1978
Copy link
Collaborator Author

@palak-chaturvedi is working on this

@palak-chaturvedi
Copy link

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?

@palak-chaturvedi
Copy link

@fluca1978
Copy link
Collaborator Author

@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.

@palak-chaturvedi
Copy link

Ok I will
Can I store the required location in a variable or we need an argument for it?
@fluca1978

@fluca1978
Copy link
Collaborator Author

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.

@palak-chaturvedi
Copy link

created a pull request.
@fluca1978
#430

palak-chaturvedi added a commit to palak-chaturvedi/pgagroal that referenced this issue Mar 29, 2024
palak-chaturvedi added a commit to palak-chaturvedi/pgagroal that referenced this issue Mar 29, 2024
palak-chaturvedi added a commit to palak-chaturvedi/pgagroal that referenced this issue Mar 29, 2024
Added master key file location in pgagroal.conf agroal#419

Added master key file location in pgagroal.conf agroal#419 -2
palak-chaturvedi added a commit to palak-chaturvedi/pgagroal that referenced this issue Apr 1, 2024
palak-chaturvedi added a commit to palak-chaturvedi/pgagroal that referenced this issue Apr 16, 2024
Remove remote connection part from the admin.c

Added -m flag
palak-chaturvedi added a commit to palak-chaturvedi/pgagroal that referenced this issue Apr 27, 2024
Remove remote connection part from the admin.c

Added -m flag

Added multiple error types for master key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

No branches or pull requests

3 participants