.TH mod_security 3erl "inets 5.10.3" "Ericsson AB" "Erlang Module Definition" .SH NAME mod_security \- Security Audit and Trailing Functionality .SH DESCRIPTION .LP Security Audit and Trailing Functionality .SH EXPORTS .LP .B list_auth_users(Port) -> Users | [] .br .B list_auth_users(Address, Port) -> Users | [] .br .B list_auth_users(Port, Dir) -> Users | [] .br .B list_auth_users(Address, Port, Dir) -> Users | [] .br .RS .LP Types: .RS 3 Port = integer() .br Address = {A,B,C,D} | string() | undefined .br Dir = string() .br Users = list() = [string()] .br .RE .RE .RS .LP \fIlist_auth_users/1\fR\&, \fIlist_auth_users/2\fR\& and \fIlist_auth_users/3\fR\& returns a list of users that are currently authenticated\&. Authentications are stored for SecurityAuthTimeout seconds, and are then discarded\&. .RE .LP .B list_blocked_users(Port) -> Users | [] .br .B list_blocked_users(Address, Port) -> Users | [] .br .B list_blocked_users(Port, Dir) -> Users | [] .br .B list_blocked_users(Address, Port, Dir) -> Users | [] .br .RS .LP Types: .RS 3 Port = integer() .br Address = {A,B,C,D} | string() | undefined .br Dir = string() .br Users = list() = [string()] .br .RE .RE .RS .LP \fIlist_blocked_users/1\fR\&, \fIlist_blocked_users/2\fR\& and \fIlist_blocked_users/3\fR\& returns a list of users that are currently blocked from access\&. .RE .LP .B block_user(User, Port, Dir, Seconds) -> true | {error, Reason} .br .B block_user(User, Address, Port, Dir, Seconds) -> true | {error, Reason} .br .RS .LP Types: .RS 3 User = string() .br Port = integer() .br Address = {A,B,C,D} | string() | undefined .br Dir = string() .br Seconds = integer() | infinity .br Reason = no_such_directory .br .RE .RE .RS .LP \fIblock_user/4\fR\& and \fIblock_user/5\fR\& blocks the user \fIUser\fR\& from the directory \fIDir\fR\& for a specified amount of time\&. .RE .LP .B unblock_user(User, Port) -> true | {error, Reason} .br .B unblock_user(User, Address, Port) -> true | {error, Reason} .br .B unblock_user(User, Port, Dir) -> true | {error, Reason} .br .B unblock_user(User, Address, Port, Dir) -> true | {error, Reason} .br .RS .LP Types: .RS 3 User = string() .br Port = integer() .br Address = {A,B,C,D} | string() | undefined .br Dir = string() .br Reason = term() .br .RE .RE .RS .LP \fIunblock_user/2\fR\&, \fIunblock_user/3\fR\& and \fIunblock_user/4\fR\& removes the user \fIUser\fR\& from the list of blocked users for the Port (and Dir) specified\&. .RE .SH "THE SECURITYCALLBACKMODULE" .LP The SecurityCallbackModule is a user written module that can receive events from the mod_security Erlang Webserver API module\&. This module only exports the function(s), \fBevent/4,5\fR\&, which are described below\&. .SH EXPORTS .LP .B event(What, Port, Dir, Data) -> ignored .br .B event(What, Address, Port, Dir, Data) -> ignored .br .RS .LP Types: .RS 3 What = atom() .br Port = integer() .br Address = {A,B,C,D} | string() Dir = string() .br Data = [Info] .br Info = {Name, Value} .br .RE .RE .RS .LP \fIevent/4\fR\& or \fIevent/4\fR\& is called whenever an event occurs in the mod_security Erlang Webserver API module (\fIevent/4\fR\& is called if Address is undefined and \fIevent/5\fR\& otherwise)\&. The \fIWhat\fR\& argument specifies the type of event that has occurred, and should be one of the following reasons; \fIauth_fail\fR\& (a failed user authentication), \fIuser_block\fR\& (a user is being blocked from access) or \fIuser_unblock\fR\& (a user is being removed from the block list)\&. .LP .RS -4 .B Note: .RE Note that the \fIuser_unblock\fR\& event is not triggered when a user is removed from the block list explicitly using the \fIunblock_user\fR\& function\&. .RE