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]: Flesh out a good API to get/set/generate munge keys #14

Closed
jedel1043 opened this issue Jun 7, 2024 · 2 comments · Fixed by #34
Closed

[Enhancement]: Flesh out a good API to get/set/generate munge keys #14

jedel1043 opened this issue Jun 7, 2024 · 2 comments · Fixed by #34
Labels
enhancement New feature or request

Comments

@jedel1043
Copy link
Contributor

Right now the snap just generates a default munge key at startup, but it doesn't set its internal config state with the value, making it impossible to fetch it without having to find the exact file. Furthermore, running mungekey generates a new key, but this also breaks the current stored state. To fix this, the user has to also push the new key to the config with snap set slurm munge.key <KEY>.

Ideally, all of this should be managed by the snap automatically, so it could be nice to find a better API for managing munge keys.

@NucciTheBoss NucciTheBoss added the enhancement New feature or request label Jun 7, 2024
@NucciTheBoss
Copy link
Member

@jedel1043 what would you think about having two additional commands alongside mungekey? We could the following apps easily to the snap:

  1. getmungekey -> write current munge.key file to stdout. We'd want to make it such that only root could execute this command so that we don't have to worry about spilling any secrets. This output could then be captured by the charms and stored as a secret for other apps to use.
  2. setmungekey -> takes a munge key from stdin/$1 and updates the munge.key file. Again something we'd what to ensure that only root could do.
  3. Make a mungekey.wrapper that points the actual mungekey binary to the munge.key location under $SNAP_COMMON

What do you think of this option? We wouldn't use the snap set ... API, but we'd also not need to worry as much about cache coherency for munge. We could still use the snap set ... API though for slurm.conf management as we're not duplicating a secret there.

@jedel1043
Copy link
Contributor Author

Yep, that alternative sounds a lot nicer.

@NucciTheBoss NucciTheBoss changed the title Flesh out a good API to get/set/generate munge keys [Enhancement]: Flesh out a good API to get/set/generate munge keys Jun 25, 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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants