.TH mod_security 3erl "inets 6.3.4" "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 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\& each blocks the user \fIUser\fR\& from directory \fIDir\fR\& for a specified amount of time\&. .RE .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\& each returns a list of users that are currently authenticated\&. Authentications are stored for \fISecurityAuthTimeout\fR\& seconds, and 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\& each returns a list of users that are currently blocked from access\&. .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\& each removes the user \fIUser\fR\& from the list of blocked users for \fIPort\fR\& (and \fIDir\fR\&)\&. .RE .SH "SECURITYCALLBACKMODULE" .LP The \fISecurityCallbackModule\fR\& is a user-written module that can receive events from the \fImod_security\fR\& Erlang web server API module\&. This module only exports the functions event/[4,5] which are described here\&. .SH EXPORTS .LP .B Module:event(What, Port, Dir, Data) -> ignored .br .B Module: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/5\fR\& is called whenever an event occurs in the \fImod_security\fR\& Erlang web server API module\&. (\fIevent/4\fR\& is called if \fIAddress\fR\& is undefined, otherwise \fIevent/5\fR\&\&. Argument \fIWhat\fR\& specifies the type of event that has occurred and is one of the following reasons: .RS 2 .TP 2 .B \fIauth_fail\fR\&: A failed user authentication\&. .TP 2 .B \fIuser_block\fR\&: A user is being blocked from access\&. .TP 2 .B \fIuser_unblock\fR\&: A user is being removed from the block list\&. .RE .LP .RS -4 .B Note: .RE The event \fIuser_unblock\fR\& is not triggered when a user is removed from the block list explicitly using the \fIunblock_user\fR\& function\&. .RE