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

Add support for running as root and 'multiuser' mode #51

Merged
merged 7 commits into from
Aug 29, 2023

Conversation

bbockelm
Copy link
Collaborator

The 'multiuser' plugin allows the xrootd server to open files as a user, depending on the authorization of the request.

This PR updates Pelican to be able to run the daemon with the appropriate Linux capabilities (SETUID/SETGID) needed for making requests on behalf of other users.

This renames the (previously hidden) multiuser option to be underneath
the `Origin` configuration key.  Further, we add a configuration test
to see if we have sufficient capabilities to launch xrootd/cmsd in
multiuser mode.
Where possible, if run by root, the mode for created directories
should be 0750 with the ownership of root:xrootd.  This means that
the root user can change the resulting files but xrootd can still
read it.

A notable exception is the TLS key file which xrootd rejects if it
is group-readable.
1.20 introduces the idea of a `Cause` in a context cancellation, used
for passing errors from the subprocesses in xrootd's Launcher.
Notably, since we updated to golang 1.20, this clears out a few deprecated
usages.

In particular, golang 1.20 will automatically seed the random number generator --
no need to do it explicitly anymore.
@bbockelm
Copy link
Collaborator Author

As discussed with @jhiemstrawisc, given the amount of details Linux domain knowledge required to review this request, I'm going to go ahead with the override + merge.

@bbockelm bbockelm merged commit d2007fd into PelicanPlatform:main Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant