sepgsql
label-based mandatory access control (MAC) based on SELinux security policy.
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
sepgsql | - | SEC | PostgreSQL | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 7960 | sepgsql | No | Yes | Yes | No | No | No | - |
Version
| PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|
| - | - | - | - | - |
Install
Note: This is a built-in contrib extension of PostgreSQL
Usage
sepgsql: SELinux label-based mandatory access control for PostgreSQL
sepgsql provides label-based mandatory access control (MAC) based on SELinux security policy. It adds an extra layer of security checking above PostgreSQL’s standard SQL permissions.
Configuration Parameters
| Parameter | Default | Description |
|---|---|---|
sepgsql.permissive | off | Enable permissive mode regardless of system SELinux settings |
sepgsql.debug_audit | off | Force all possible logging regardless of policy |
Functions
| Function | Returns | Description |
|---|---|---|
sepgsql_getcon() | text | Get current client security label |
sepgsql_setcon(text) | boolean | Switch client domain to new label (NULL to revert) |
sepgsql_mcstrans_in(text) | text | Translate qualified MLS/MCS range to raw format |
sepgsql_mcstrans_out(text) | text | Translate raw MLS/MCS range to qualified format |
sepgsql_restorecon(text) | boolean | Set initial security labels for all objects in database |
Security Labels
Security labels can be assigned to schemas, tables, columns, sequences, views, and functions:
Dynamic Domain Transitions
Trusted Procedures
Permission Classes
DML operations check: db_table:{select|insert|update|delete} and db_column:{select|update|insert}.
DDL operations check: create, drop, setattr, add_name, remove_name.
Schema access requires: db_schema:search.
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)