dcache icon indicating copy to clipboard operation
dcache copied to clipboard

support systemd style socket activation

Open calestyo opened this issue 1 year ago • 4 comments

Hey.

dcache has e.g. still the dcache.user setting to allow e.g. to set root for a webdav door to have that bind to a privileged port.

In the systemd-world this is in principle no business for the service (which should not decide as which user it runs), but rather that of systemd.

Along with that comes however the need for a way to allow processes to bind to privileged ports.

One way is via capabilities, which is however less good, as it gives the capability for all ports.

The preferred way is systemd style socket activation, as described here: http://0pointer.de/blog/projects/socket-activation.html

Not sure how well this is supported by Java (which is always a bit "special), but it seems to be:

  • https://stackoverflow.com/questions/27176552/receiving-open-sockets-from-the-environment-in-java
  • also found https://github.com/sswv/sd-daemon-java (but haven't look really into it)

Would be nice to have that in dCache. That would allow people to run dCache under dcache user but still have privileged ports. And it would allow you guys to drop dcache.user for good.

Cheers, Chris.

calestyo avatar Feb 18 '23 01:02 calestyo