lablup / lablup/backend.ai

Implement network access restriction in sorna-jail

Open
#4 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
670
Forks
183
Avg merge
15h 13m
Merged PRs (30d)
368

Description

[Sorna's "jail" subproject](https://github.com/lablup/sorna-repl/tree/master/jail)[(1)\|#fn1] is a [seccomp](https://www.kernel.org/doc/Documentation/prctl/seccomp_filter.txt)-based sandbox written in Go. We use it for all kernel containers to prevent malicious user codes from executing potentially dangerous system calls as well as to enforce our customized ACL upon file systems and networks.

(1) This will be moved to a separate repository.

**Already implemented:**

- Limitation of the maximum allowed number of threads/processes
- seccomp-based system call filter
**Half-implemented:**

- Path-based file system operation check: reading path string from syscall arguments works but there is no detailed policy implementation. This would be a practice before getting into the network restriction work.
**To do for you:**

- Host-based and IP-based network connection restriction. For example, allow only HTTPS/SSH access to GitHub but forbid network connections to everything else.\* This requires intercepting DNS resolution and `connect()` system call with some inspection to the socket file descriptor.

┆Issue is synchronized with this [Asana task](https://app.asana.com/0/1159751085623729/1159757318319368) by [Unito](https://www.unito.io/learn-more)

JIRA Issue: BA-343

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.