dataplaneapi icon indicating copy to clipboard operation
dataplaneapi copied to clipboard

Use textual user/group names instead of numeric uid/gid

Open raspbeguy opened this issue 1 year ago • 3 comments

Hello,

I wish there would be a way to specify the user and group to set at start by using their textual names (example: haproxy) instead of numeric ids. This would make greatly easier to automate deployment, for example via distro-packaging. Indeed, when a package creates a user it lets the OS decide the uid/gid to be sure not to use something already in use.

raspbeguy avatar Jul 03 '24 13:07 raspbeguy

Hello

Not sure to well understand the context. Can you describe me a bit more what is blocking ? what is annoying ? what you need to do to workaround this limitation ?

Thanks in advance

smeroth avatar Nov 06 '24 10:11 smeroth

Hello, sorry if my explanation was not clear.

dataplaneapi has two parameters --uid and --gid that accept numeric IDs. I wish there was a way to specify user/group names instead of IDs.

It makes designing deployment automation difficult, because when you create a user you have then to get its uid and populate the service file with this uid, which is rarely possible when it is packaged in a distribution. Of course you can specify a static arbitrary uid when creating the user, but then it will fails if the uid exists already.

Usually service file refers to users/groups names for that reason.

raspbeguy avatar Nov 06 '24 10:11 raspbeguy

Thanks for the updated context. Let me discuss that with the engineering. We have to check what could be the impact on the code if --uid and --gid are not only numeric values. I'll keep you updated.

smeroth avatar Nov 06 '24 11:11 smeroth