containers / containers/bubblewrap

delegated netns access

Open
#61 11 comments 23 reactions 0 assignees View on GitHub
Dominant language
C
Stars
8.7k
Forks
386
Avg merge
3d 17h
Merged PRs (30d)
11

Description

While we allow the creation of a new netns, we don't allow configuring it, so our current support is "host network" or "none".

It would be quite interesting to allow root to delegate access to pre-configured network namespaces to bubblewrap users. This could be something like having an extended attribute or ACL on `/proc/$pid/ns/net` ? (If `/proc` supported xattrs which it doesn't). So maybe we define this as having a `/run/bwrap/netns/$netnsname` symlink, and admins which want to grant access to a netns just do:

```
mkdir /run/bwrap/netns/no-vpn
ln -s /proc/$netnspid/ns/net /run/bwrap/netns/no-vpn/net
setfacl -m u:someuser:rx /run/bwrap/netns/no-vpn
```

And then a user could do:

```
bwrap --netns no-vpn
```

And we would try to `readlink` to see whether we could call `setns` ?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.