1
<?xml version="1.0" encoding="latin1" ?>
2
<!DOCTYPE erlref SYSTEM "erlref.dtd">
7
<year>1998</year><year>2009</year>
8
<holder>Ericsson AB. All Rights Reserved.</holder>
11
The contents of this file are subject to the Erlang Public License,
12
Version 1.1, (the "License"); you may not use this file except in
13
compliance with the License. You should have received a copy of the
14
Erlang Public License along with this software. If not, it can be
15
retrieved online at http://www.erlang.org/.
17
Software distributed under the License is distributed on an "AS IS"
18
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
19
the License for the specific language governing rights and limitations
24
<title>mod_security</title>
25
<prepared>Mattias Nilsson</prepared>
27
<date>1997-11-18</date>
29
<file>mod_security.sgml</file>
31
<module>mod_security</module>
32
<modulesummary>Security Audit and Trailing Functionality</modulesummary>
34
<p>Security Audit and Trailing Functionality</p>
38
<name>list_auth_users(Port) -> Users | []</name>
39
<name>list_auth_users(Address, Port) -> Users | []</name>
40
<name>list_auth_users(Port, Dir) -> Users | []</name>
41
<name>list_auth_users(Address, Port, Dir) -> Users | []</name>
42
<fsummary>List users that have authenticated within the SecurityAuthTimeout time for a given address (if specified), port number and directory (if specified).</fsummary>
44
<v>Port = integer()</v>
45
<v>Address = {A,B,C,D} | string() | undefined</v>
47
<v>Users = list() = [string()]</v>
50
<marker id="list_auth_users"></marker>
51
<p><c>list_auth_users/1</c>, <c>list_auth_users/2</c> and
52
<c>list_auth_users/3</c> returns a list of users that are
53
currently authenticated. Authentications are stored for
54
SecurityAuthTimeout seconds, and are then discarded.</p>
58
<name>list_blocked_users(Port) -> Users | []</name>
59
<name>list_blocked_users(Address, Port) -> Users | []</name>
60
<name>list_blocked_users(Port, Dir) -> Users | []</name>
61
<name>list_blocked_users(Address, Port, Dir) -> Users | []</name>
62
<fsummary>List users that are currently blocked from access to a specified port number, for a given address (if specified).</fsummary>
64
<v>Port = integer()</v>
65
<v>Address = {A,B,C,D} | string() | undefined</v>
67
<v>Users = list() = [string()]</v>
70
<marker id="list_blocked_users"></marker>
71
<p><c>list_blocked_users/1</c>, <c>list_blocked_users/2</c> and
72
<c>list_blocked_users/3</c> returns a list of users that are
73
currently blocked from access.</p>
77
<name>block_user(User, Port, Dir, Seconds) -> true | {error, Reason}</name>
78
<name>block_user(User, Address, Port, Dir, Seconds) -> true | {error, Reason}</name>
79
<fsummary>Block user from access to a directory for a certain amount of time.</fsummary>
81
<v>User = string()</v>
82
<v>Port = integer()</v>
83
<v>Address = {A,B,C,D} | string() | undefined</v>
85
<v>Seconds = integer() | infinity</v>
86
<v>Reason = no_such_directory</v>
89
<marker id="block_user"></marker>
90
<p><c>block_user/4</c> and <c>block_user/5</c> blocks the user
91
<c>User</c> from the directory <c>Dir</c> for a specified
96
<name>unblock_user(User, Port) -> true | {error, Reason}</name>
97
<name>unblock_user(User, Address, Port) -> true | {error, Reason}</name>
98
<name>unblock_user(User, Port, Dir) -> true | {error, Reason}</name>
99
<name>unblock_user(User, Address, Port, Dir) -> true | {error, Reason}</name>
100
<fsummary>Remove a blocked user from the block list</fsummary>
102
<v>User = string()</v>
103
<v>Port = integer()</v>
104
<v>Address = {A,B,C,D} | string() | undefined</v>
105
<v>Dir = string()</v>
106
<v>Reason = term()</v>
109
<marker id="unblock_user"></marker>
110
<p><c>unblock_user/2</c>, <c>unblock_user/3</c> and
111
<c>unblock_user/4</c> removes the user <c>User</c> from
112
the list of blocked users for the Port (and Dir) specified.</p>
118
<marker id="callback_module"></marker>
119
<title>The SecurityCallbackModule</title>
120
<p>The SecurityCallbackModule is a user written module that can receive events from
121
the mod_security Erlang Webserver API module. This module only exports one function,
122
<seealso marker="#callback_module_event">event/4</seealso>, which is described below.
127
<name>event(What, Port, Dir, Data) -> ignored</name>
128
<name>event(What, Address, Port, Dir, Data) -> ignored</name>
129
<fsummary>This function is called whenever an event occurs in mod_security</fsummary>
132
<v>Port = integer()</v>
133
<v>Address = {A,B,C,D} | string() <v>Dir = string()</v>
135
<v>Info = {Name, Value}</v>
138
<marker id="callback_module_event"></marker>
139
<p><c>event/4</c> or <c>event/4</c> is called whenever an event
140
occurs in the mod_security Erlang Webserver API module (<c>event/4</c> is
141
called if Address is undefined and <c>event/5</c> otherwise).
142
The <c>What</c> argument specifies the type of event that has
143
occurred, and should be one of the following reasons;
144
<c>auth_fail</c> (a failed user authentication),
145
<c>user_block</c> (a user is being blocked from access) or
146
<c>user_unblock</c> (a user is being removed from the block list).</p>
148
<p>Note that the <c>user_unblock</c> event is not triggered when
149
a user is removed from the block list explicitly using the
150
<c>unblock_user</c> function.</p>