1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- This document was generated using DocBuilder 3.3.3 -->
<HTML>
<HEAD>
<TITLE>mod_security</TITLE>
<SCRIPT type="text/javascript" src="../../../../doc/erlresolvelinks.js">
</SCRIPT>
<STYLE TYPE="text/css">
<!--
.REFBODY { margin-left: 13mm }
.REFTYPES { margin-left: 8mm }
-->
</STYLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#FF00FF"
ALINK="#FF0000">
<!-- refpage -->
<CENTER>
<A HREF="http://www.erlang.se">
<IMG BORDER=0 ALT="[Ericsson AB]" SRC="min_head.gif">
</A>
<H1>mod_security</H1>
</CENTER>
<H3>MODULE</H3>
<DIV CLASS=REFBODY>
mod_security
</DIV>
<H3>MODULE SUMMARY</H3>
<DIV CLASS=REFBODY>
Security Audit and Trailing Functionality
</DIV>
<H3>DESCRIPTION</H3>
<DIV CLASS=REFBODY>
<P>Security Audit and Trailing Functionality
</DIV>
<H3>EXPORTS</H3>
<P><A NAME="list_auth_users/1"><STRONG><CODE>list_auth_users(Port) -> Users | []</CODE></STRONG></A><BR>
<A NAME="list_auth_users/2"><STRONG><CODE>list_auth_users(Address, Port) -> Users | []</CODE></STRONG></A><BR>
<A NAME="list_auth_users/2"><STRONG><CODE>list_auth_users(Port, Dir) -> Users | []</CODE></STRONG></A><BR>
<A NAME="list_auth_users/3"><STRONG><CODE>list_auth_users(Address, Port, Dir) -> Users | []</CODE></STRONG></A><BR>
<DIV CLASS=REFBODY><P>Types:
<DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>Port = integer()</CODE></STRONG><BR>
<STRONG><CODE>Address = {A,B,C,D} | string() | undefined</CODE></STRONG><BR>
<STRONG><CODE>Dir = string()</CODE></STRONG><BR>
<STRONG><CODE>Users = list() = [string()]</CODE></STRONG><BR>
</DIV>
</DIV>
<DIV CLASS=REFBODY>
<A NAME="list_auth_users"><!-- Empty --></A>
<P><CODE>list_auth_users/1</CODE>, <CODE>list_auth_users/2</CODE> and
<CODE>list_auth_users/3</CODE> returns a list of users that are
currently authenticated. Authentications are stored for
SecurityAuthTimeout seconds, and are then discarded.
</DIV>
<P><A NAME="list_blocked_users/1"><STRONG><CODE>list_blocked_users(Port) -> Users | []</CODE></STRONG></A><BR>
<A NAME="list_blocked_users/2"><STRONG><CODE>list_blocked_users(Address, Port) -> Users | []</CODE></STRONG></A><BR>
<A NAME="list_blocked_users/2"><STRONG><CODE>list_blocked_users(Port, Dir) -> Users | []</CODE></STRONG></A><BR>
<A NAME="list_blocked_users/3"><STRONG><CODE>list_blocked_users(Address, Port, Dir) -> Users | []</CODE></STRONG></A><BR>
<DIV CLASS=REFBODY><P>Types:
<DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>Port = integer()</CODE></STRONG><BR>
<STRONG><CODE>Address = {A,B,C,D} | string() | undefined</CODE></STRONG><BR>
<STRONG><CODE>Dir = string()</CODE></STRONG><BR>
<STRONG><CODE>Users = list() = [string()]</CODE></STRONG><BR>
</DIV>
</DIV>
<DIV CLASS=REFBODY>
<A NAME="list_blocked_users"><!-- Empty --></A>
<P><CODE>list_blocked_users/1</CODE>, <CODE>list_blocked_users/2</CODE> and
<CODE>list_blocked_users/3</CODE> returns a list of users that are
currently blocked from access.
</DIV>
<P><A NAME="block_user/4"><STRONG><CODE>block_user(User, Port, Dir, Seconds) -> true | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="block_user/5"><STRONG><CODE>block_user(User, Address, Port, Dir, Seconds) -> true | {error, Reason}</CODE></STRONG></A><BR>
<DIV CLASS=REFBODY><P>Types:
<DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>User = string()</CODE></STRONG><BR>
<STRONG><CODE>Port = integer()</CODE></STRONG><BR>
<STRONG><CODE>Address = {A,B,C,D} | string() | undefined</CODE></STRONG><BR>
<STRONG><CODE>Dir = string()</CODE></STRONG><BR>
<STRONG><CODE>Seconds = integer() | infinity</CODE></STRONG><BR>
<STRONG><CODE>Reason = no_such_directory</CODE></STRONG><BR>
</DIV>
</DIV>
<DIV CLASS=REFBODY>
<A NAME="block_user"><!-- Empty --></A>
<P><CODE>block_user/4</CODE> and <CODE>block_user/5</CODE> blocks the user
<CODE>User</CODE> from the directory <CODE>Dir</CODE> for a specified
amount of time.
</DIV>
<P><A NAME="unblock_user/2"><STRONG><CODE>unblock_user(User, Port) -> true | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="unblock_user/3"><STRONG><CODE>unblock_user(User, Address, Port) -> true | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="unblock_user/3"><STRONG><CODE>unblock_user(User, Port, Dir) -> true | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="unblock_user/4"><STRONG><CODE>unblock_user(User, Address, Port, Dir) -> true | {error, Reason}</CODE></STRONG></A><BR>
<DIV CLASS=REFBODY><P>Types:
<DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>User = string()</CODE></STRONG><BR>
<STRONG><CODE>Port = integer()</CODE></STRONG><BR>
<STRONG><CODE>Address = {A,B,C,D} | string() | undefined</CODE></STRONG><BR>
<STRONG><CODE>Dir = string()</CODE></STRONG><BR>
<STRONG><CODE>Reason = term()</CODE></STRONG><BR>
</DIV>
</DIV>
<DIV CLASS=REFBODY>
<A NAME="unblock_user"><!-- Empty --></A>
<P><CODE>unblock_user/2</CODE>, <CODE>unblock_user/3</CODE> and
<CODE>unblock_user/4</CODE> removes the user <CODE>User</CODE> from
the list of blocked users for the Port (and Dir) specified.
</DIV>
<A NAME="callback_module"><!-- Empty --></A>
<H3>The SecurityCallbackModule</H3>
<DIV CLASS=REFBODY>
<P>The SecurityCallbackModule is a user written module that can receive events from
the mod_security Erlang Webserver API module. This module only exports one function,
<A HREF="#callback_module_event">event/4</A>, which is described below.
</DIV>
<H3>EXPORTS</H3>
<P><A NAME="event/4"><STRONG><CODE>event(What, Port, Dir, Data) -> ignored</CODE></STRONG></A><BR>
<A NAME="event/5"><STRONG><CODE>event(What, Address, Port, Dir, Data) -> ignored</CODE></STRONG></A><BR>
<DIV CLASS=REFBODY><P>Types:
<DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>What = atom()</CODE></STRONG><BR>
<STRONG><CODE>Port = integer()</CODE></STRONG><BR>
<STRONG><CODE>Address = {A,B,C,D} | string()
<v>Dir = string()</CODE></STRONG><BR>
<STRONG><CODE>What = [Info]</CODE></STRONG><BR>
<STRONG><CODE>Info = {Name, Value}</CODE></STRONG><BR>
</DIV>
</DIV>
<DIV CLASS=REFBODY>
<A NAME="callback_module_event"><!-- Empty --></A>
<P><CODE>event/4</CODE> or <CODE>event/4</CODE> is called whenever an event
occurs in the mod_security Erlang Webserver API module (<CODE>event/4</CODE> is
called if Address is undefined and <CODE>event/5</CODE> otherwise).
The <CODE>What</CODE> argument specifies the type of event that has
occurred, and should be one of the following reasons;
<CODE>auth_fail</CODE> (a failed user authentication),
<CODE>user_block</CODE> (a user is being blocked from access) or
<CODE>user_unblock</CODE> (a user is being removed from the block list).
<P>
<TABLE CELLPADDING=4>
<TR>
<TD VALIGN=TOP><IMG ALT="Note!" SRC="note.gif"></TD>
<TD>
<P>Note that the <CODE>user_unblock</CODE> event is not triggered when
a user is removed from the block list explicitly using the
<CODE>unblock_user</CODE> function.
</TD>
</TR>
</TABLE>
</DIV>
<H3>AUTHORS</H3>
<DIV CLASS=REFBODY>
Mattias Nilsson
- support@erlang.ericsson.se<BR>
</DIV>
<CENTER>
<HR>
<SMALL>inets 4.7.6<BR>
Copyright © 1991-2006
<A HREF="http://www.erlang.se">Ericsson AB</A><BR>
</SMALL>
</CENTER>
</BODY>
</HTML>
|