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

[Enhancement]: Enable mungectl to set file access permissions on the munge key file #5

Open
NucciTheBoss opened this issue Oct 6, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@NucciTheBoss
Copy link
Member

mungectl currently just sets the munge.key file owner to user root and group root. We should allow administrators to set the user and group that will own the munge.key. The root user works as a default, but typically administrators will use a dedicated munge user and group to own the key.

We should also enable administrators to set the mode of the munge.key file. Right now we're using the default mode which works, but some may want to set a mode of 0o600 so that only the munge user can read the key.

This is a relatively easy addition since we just need to add some additional flags to the generate and set subcommands that feed into the os package:

mungectl key generate -u/--user -g/--group -m/--mode
mungectl key set -u/--user -g/--group -m/--mode

...

os.Chmod("/path/to/keyfile", ...)
os.Chown("/path/to/keyfile", ..., ...)

We could also add support for configuring a default user, group, and mode so that the administrator isn't required to pass these flags every time using viper.

@NucciTheBoss NucciTheBoss added enhancement New feature or request good first issue Good for newcomers labels Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant