5. Security

This document describes the security considerations to take into account when using the VPL Jail System.

5.1. Security Overview

The VPL Jail System is designed to provide a secure execution environment for student code. However, note that this environment will execute all kinds of code and can be a clear attack vector.

VPL receives execution task requests from an external system, commonly a Moodle site. It also receives connections to the task from the user’s browser.

5.2. Access Control

5.2.1. Authentication and Authorization

To restrict which systems can send tasks to the jail server, you must use the configuration parameters URLPATH and TASK_ONLY_FROM.

URLPATH acts as a required password to accept tasks and must be used as the URLPATH in the request for a new task. Once a task is accepted, a set of tickets of different types is generated for that task. The rest of the communications related to the task must use these tickets.

TASK_ONLY_FROM restricts the IP addresses that can send tasks to the jail server.

5.3. Network Security

5.3.1. Encryption and Secure Communication

It is highly recommended to use only secure protocols (HTTPS) to communicate with the VPL Jail System, avoiding the use of HTTP. HTTP is not secure and can expose sensitive information. HTTP can be used for testing purposes or if the Moodle server is connected in a secure environment to the jail server.

Warning

Never use HTTP in production environments as it transmits data in plain text.

5.3.2. SSL/TLS Configuration

For secure HTTPS communication, ensure proper SSL/TLS configuration:

5.4. Internet Access Control

5.4.1. Firewall Configuration

If you want to restrict internet access for tasks in the jail server, you can use the configuration parameter FIREWALL with level 3 or 4 to disable task access to the internet. This will prevent tasks from making any network requests outside the Jail server.