-
Notifications
You must be signed in to change notification settings - Fork 7
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
Support for SELinux #95
Comments
This use case reminded me that the IMP should probably support calling out to a session PAM stack. There is already a Long term, storing any current security context in a MUNGE credential is the preferred solution. To support a user submitting a job to run in a different context than they are currently in would mean we'd have to duplicate |
Yeah I believe this is the main use case GS folks said we need to support. |
Tagging @cg9468 |
Users will need the ability to run jobs as their normal SELinux user context as well as when they switch to a project context. Role Base Access Control is used to assign a user to multiple projects. When a user wants to work in a project context they run a script that runs the 'newrole' command in the background which asks for their password. Once authenticated, a new xterm window opens in the users GNOME session in the proper project context so the users can perform work and submit jobs. The user can switch to multiple projects at a time if they choose. They'll have an xterm window per project, which will have the proper context assigned. The job scheduler should be able to pickup what SELinux context the job is being submitted from and run the job as that context which should persist until the job is complete. Each project context is siloed to designated areas on the filesystem, which means the output of a job has to be written into the siloed areas with the matching SELinux context only. |
Not knowing much about SELinux, this may be a dumb question: if I enter an SELinux role by typing a password, and then submit a job, and my role is recorded in a MUNGE cred at job submit time which allows Flux to launch a job in the future in that role, is there a way for Flux to know if my access to the role has been revoked between submission and launch? (Note that a job can submit another job with a new MUNGE cred, so potentially a user could chain jobs to keep hold of a revoked role for longer than a single job TTL, if there was no way to re-check role "membership") |
Tagging @stevedlawrence too. |
@garlick The way this use case works, revoking a users access to a role requires an update to the SELinux policy, wich would make the context no longer valid. When Flux attempts to launch a job in that now invalid context (via |
Thanks! That sounds like a non-problem then. |
Tagging @dun as author of MUNGE |
@stevedlawrence - does the context need to be validated at job submission time, e.g. by |
Validation of the context return from My understanding is that Munge has some capabilities to perform these kinds of actions in a secure manner, though the specifics of how I am not too familiar with. |
MUNGE doesn't currently have those capabilities. See dun/munge#70. I think you answered my question - I wasn't sure why we needed trusted code to collect the context if the context could only be used by the user it was issued to at exec time. |
Based on our internal conversation today, it appears that SELinux support is basically mandatory for DOD at this point, and the DOE may soon follow. It is unclear exactly what the entire scope of "full support" is.
A good starting point would be for Flux to launch batch jobs confined to a specific SELinux context. Initially, it might be easiest to have the target SELinux context provided by MUNGE (i.e., the user already has to be within the target context when they submit the job), but I can imagine a scenario where the user wants to be in context A and submit a job that will run in context B (assuming the user has the proper privileges to run in context B).
One potential "gotcha" that @grondo mentioned: if you aren't careful with permissions, then it is possible for the RM to create a file descriptor for a job that (once running under the target context) the job is unable to access.
The text was updated successfully, but these errors were encountered: