Skip to content

Allow groups of accounts to access the RPC cookie file #25270

@alevchuk

Description

@alevchuk

Context
I have multiple accounts on the same box that need to run clients of bitcoind. In particular it's LND and electrs. Bitcoind itself runs in a separate account. I have other accounts that I don't want to have access to bitcoin: e.g. Grafana (graphs/charts web UI). So, the cookie file can be shared amount the relevant accounts via a group. On the file system a group read permissions can be set on each file. I call the group "bitcoinclients". I setup a directory where new files will inherit the bitcoinclients group and will be created with the u=rw,g=r,o= permission. This means bticoin account can write the file, bitcoinclinets group can read it, and no one else has access.

Is your feature request related to a problem? Please describe.
The problem is that when bitcoind is restarted it drops the group read permission on the cookie file so clients in other unix accounts can't read the file.

Describe the solution you'd like
There should be a config that allows controlling permissions of the cookie file. Just a boolean that sets the read permissions on the group would be sufficient.

Describe alternatives you've considered
I setup a chronos workaround but I bet more people will have to re-invent this wheel as the cookie file gets wider adoption.

Additional context
Cookie file has more security over user+password auth. User+password auth is being deprecated in favor of the cookie file.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions