|Main Archive Page > Month Archives > selinux archives|
I'm a developer of SE-PostgreSQL which is an enhancement of
database security using SELinux. It enables to apply the
security policy of the operating system on accesses to
database objects also.
It makes an access control decision and audit messages, but these are not written out to system audit mechanism.
I believe our preferable behavior is the system audit collects all the audit messages come from SELinux, not a logfile of PostgreSQL.
Currently, the audit-libs has an interface to write a message come from userspace avc, but some of parameter is not suitable for the reference monitor in database management system.
This patch adds a new interface as follows:
int audit_log_database_message(int audit_fd, int type, const char *message, const char *hostname, const char *addr, const char *dbuser);
It is differ from audit_log_user_avc_message() in the point of a new parameter of dbuser, instead of tty and uid. I don't think these are meaningful information for DBMS, but we would like to record what database user invokes this audit record.
Please any comments.
KaiGai Kohei wrote:
> 2. System audit integration
> Now, SE-PostgreSQL writes out its access denied message into
> the logfile of PostgreSQL (/var/log/sepostgresql.log).
> But it is more desirable approach to write out them into system
> audit mechanism, because any other SELinux related messages
> are collected here and utilities like audit2allow is available.
> - changes in the security policy:
> We need to allow postgresql_t to write audit messages.
> In addition, the backend process need to run with cap_audit_write.
> - a new interface in audit-libs:
> The current audit-libs has the following interface.
> extern int audit_log_user_avc_message(int audit_fd, int type,
> const char *message, const char *hostname, const char *addr,
> const char *tty, uid_t uid);
> But some arguments are not meaningful in SE-PostgreSQL.
> I would like to write out database role here, instead of tty and uid.
-- OSS Platform Development Division, NEC KaiGai Kohei <email@example.com>
-- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to firstname.lastname@example.org with the words "unsubscribe selinux" without quotes as the message.