Introducing PostgreSQL and sepgsql
PostgreSQL is a popular, featureful, and mature relational database management system. Like Apache, it also enables a modular extension of its functionalities through loadable modules. The module we will investigate is called sepgsql, shorthand for Security Enhanced PostgreSQL or SEPostgreSQL. Through sepgsql, PostgreSQL enhances itself with SELinux support for additional access controls, offering fine-grained data flow controls based on SELinux policy rules.
Please be aware though that sepgsql does not implement a full mandatory access control system within PostgreSQL, as not all PostgreSQL statements will result in a policy check. While it augments the security posture of the PostgreSQL database, the module has a few limitations listed in its online documentation, available at https://www.postgresql.org/docs/10/sepgsql.html (adjust the version number in the URL as needed; the referenced document at this URL is for PostgreSQL 10, which is the...