-
Notifications
You must be signed in to change notification settings - Fork 46
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
ACL in munged ? #53
Comments
If people are allowed to have root on these external machines, and these machines are part of the same MUNGE realm as the Slurm cluster (i.e., they share the same I don't know if Slurm supports any form of an ID remapping as you propose. I recommend you post on the slurm-dev mailing list for their suggestions. If you're wanting to have MUNGE authenticate the users of these external nodes with the Slurm submit node, you'll want to use separate keys for the external nodes. |
We understood that people with root access could circumvent any restrictions and of course we don't want that. Even if IP restrictions were implemented we cannot trust the IP address within the credential payload or they could simply change their host IP address for an "authorized" one (this could be handled with network segmentation and vlan though, but that's not a solution the network team will like :D).
Exactly. Are you suggesting that this is something possible today with munge ? That's why I proposed something with multiple munge key and ACLs associated with them. On a pure technical basis, does this suggestion makes sense to you ? Does it fit with the actual munge design or will it require too much work ? If you're interested in implementing that, my employer could sponsor you (with money). I would need some time to formalize that on my side though =) We've got a support contract with SchedMD and we've contacted them yesterday for suggestions. By looking quickly at the code, we lost the socket information (to check the source IP address) of job RPC submission in the munge stage (in batch mode at least), so I don't really see what is possible here. We will let the slurm experts give us an answer here ;) EDIT: https://bugs.schedmd.com/show_bug.cgi?id=3324 Thank you for your answer ! |
The MUNGE daemon currently only supports the use of a single key. However, you can run multiple MUNGE daemons on a node. Each daemon listens on a unique Unix domain socket and can use a distinct key. The interface was designed to facilitate the testing of a development release while the stable release was in use. But we actually have a few instances where we run multiple MUNGE daemons on a given node in production. Support for multiple keys has been on the proverbial To-Do list for some time. In addition to multi-realm support, multi-key support would facilitate transitioning the key for a given realm (#19). This multi-key support has been the defining feature of the ever-elusive 0.6 release. But a new key format would also be the ideal time to upgrade the cryptographic algorithms and key derivation function, expand the credential format, etc. Changing the key and/or credential format is something I try to limit, so I'd prefer to have all of the breakage happen in the same release. Consequently, the 0.6 release has grown in scope while I've been working on other projects. As for your dilemma, I think you'd ideally want to have each external node where the user has root to be in its own MUNGE realm with a distinct key. The submit node (where these external users don't have root) would either run a single multi-key munged (which doesn't exist yet and would be a substantial development effort) or multiple single-key mungeds. The submit node would also presumably need a new Slurm Authentication Plugin that could handle multiple MUNGE realms and map IDs in one realm to IDs (or a single ID) in another realm. So this might work, at least in theory. I don't know what your time constraints are for having something that works in production. I also don't know how many of these external nodes you have. I'm just starting to work on the roadmap for 0.5.13. I'll try to read up on Slurm Authentication Plugins over the next week and see if this still makes sense as I get more into the details. I read Dominik's response at SchedMD. I think we all agree that use of a single MUNGE key/realm won't solve your problem. |
OK, thank you for this exhaustive answer, this is very much appreciated. It confirms that I've got a quite valid picture of the problem here. The multiple single-key munged would indeed require some work on a new slurm plugin side. It could be a reasonable workaround. We'll try to investigate this and keep you posted if we managed to have something useful. It could work as long as you don't have too much of those external nodes =) (We are talking about a dozen of those machine here). We don't need to have something that works in production, we can certainly find a non-technical solution that won't please our users ;) The multikey feature would be something very cool to have, allowing us to distribute munge key for advanced users wanting to submit job from the machine they manage. We initially thought that it could be interesting to have feedback from you because you're really the only that could evaluate the amount needed of worked need. It's really nice that this is something already on the roadmap for the 0.6. We also understand that this will require quite some work. If you think being sponsored could you to have the multikey feature implemented sooner, we can try to find a solution.
If it doesn't make sense, please tell us =) |
I've looked at the Slurm Authentication Plugin for MUNGE (auth_munge.c). I think support for your setup could be added with some minor changes to For this setup, I'm picturing a couple of external users that have root on their local desktop, Alice and Bob. Each is running a local munged with a unique key, K(a) and K(b) respectively. The Slurm cluster has its own unique key K(s) shared between the Master, Submit, and all Compute nodes. But the Master node is running a munged process for each unique key: K(a), K(b), and K(s); each munged process here binds to a unique Unix domain socket (e.g., munge.socket.alice, munge.socket.bob, munge.socket.2). The
The
Continuing my example setup above, Alice would have an AuthInfo section with If Alice tried to impersonate Cindy (who has more funding for CPU time) by The primary limitation to this approach is the number of munged processes running on the Master node. A dozen processes should be no problem (aside from the initial setup). If you're not using supplementary group membership authentication, you could run munged with As I mentioned earlier, true multi-realm support is planned for the ever-elusive 0.6 release, but I have no ETA for when that might happen. If the above design doesn't meet your needs and/or you're interested in sponsoring some work on multikey, we could discuss that later. |
Hello dun, Whow. thank you again for such an exhaustive answer. That's more that we need to wrap our head around a possible solution that will match our use case. We'll try to evaluate the impact of code modification in the auth plugin for future slurm release with the help of the schedmd team.
i'll keep that in mind and let my managers decide on the strategy. It will depends of our local slurm experts and schedmd feedback. I'll try to keep you posted of our experiments. |
Hello,
Sorry if it's not the correct place to ask those kind of question.
I've got a slurm cluster using munge authentication with an associated "cluster" network. The master and submit node have a public network interface so that users can connect with ssh and submitting jobs. Everything is working fine.
I also have a bunch of external machines with only a public interface. Ultimately, I'd like people to have root access on them and still let them submit batch job on the cluster. Since they are root, they can create a local user with the same uid as valid user on the cluster and impersonate him. Obviously, this is not something we want.
I'm far from being a munge and slurm expert. From what I understand, I'd like to have some kind of ACL mechanisms within munged to express something like :
Or maybe having multiple munge keys with ACL regarding user information allowed to be requested with it (only the key is used as a valid token, no need to express ip restriction).
Maybe there a completely different solution or a simpler workaround I don't see ?
I would be interested to have your opinion on this.
What would be the right place for a solution for this problem ? Auth plugin within slurm ? Some
kind of ACLs in munge and/or multiple key mechanism ?
The text was updated successfully, but these errors were encountered: