aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/doc/src/mod_security.xml
blob: 2a871d29d86e8b881dacc242027068837e77f800 (plain) (blame)
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
<?xml version="1.0" encoding="latin1" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">

<erlref>
  <header>
    <copyright>
      <year>1998</year><year>2010</year>
      <holder>Ericsson AB. All Rights Reserved.</holder>
    </copyright>
    <legalnotice>
      The contents of this file are subject to the Erlang Public License,
      Version 1.1, (the "License"); you may not use this file except in
      compliance with the License. You should have received a copy of the
      Erlang Public License along with this software. If not, it can be
      retrieved online at http://www.erlang.org/.

      Software distributed under the License is distributed on an "AS IS"
      basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
      the License for the specific language governing rights and limitations
      under the License.

    </legalnotice>

    <title>mod_security</title>
    <prepared>Mattias Nilsson</prepared>
    <docno></docno>
    <date>1997-11-18</date>
    <rev>1.0</rev>
    <file>mod_security.sgml</file>
  </header>
  <module>mod_security</module>
  <modulesummary>Security Audit and Trailing Functionality</modulesummary>
  <description>
    <p>Security Audit and Trailing Functionality</p>
  </description>
  <funcs>
    <func>
      <name>list_auth_users(Port) -> Users | []</name>
      <name>list_auth_users(Address, Port) -> Users | []</name>
      <name>list_auth_users(Port, Dir) -> Users | []</name>
      <name>list_auth_users(Address, Port, Dir) -> Users | []</name>
      <fsummary>List users that have authenticated within the SecurityAuthTimeout time for a given address (if specified), port number and directory  (if specified).</fsummary>
      <type>
        <v>Port    = integer()</v>
        <v>Address = {A,B,C,D} | string() | undefined</v>
        <v>Dir     = string()</v>
        <v>Users   = list() = [string()]</v>
      </type>
      <desc>
        <marker id="list_auth_users"></marker>
        <p><c>list_auth_users/1</c>, <c>list_auth_users/2</c> and 
          <c>list_auth_users/3</c> returns a list of users that are 
          currently authenticated. Authentications are stored for
          SecurityAuthTimeout seconds, and are then discarded.</p>
      </desc>
    </func>
    <func>
      <name>list_blocked_users(Port) -> Users | []</name>
      <name>list_blocked_users(Address, Port) -> Users | []</name>
      <name>list_blocked_users(Port, Dir) -> Users | []</name>
      <name>list_blocked_users(Address, Port, Dir) -> Users | []</name>
      <fsummary>List users that are currently blocked from access to a  specified port number, for a given address (if specified).</fsummary>
      <type>
        <v>Port    = integer()</v>
        <v>Address = {A,B,C,D} | string() | undefined</v>
        <v>Dir     = string()</v>
        <v>Users   = list() = [string()]</v>
      </type>
      <desc>
        <marker id="list_blocked_users"></marker>
        <p><c>list_blocked_users/1</c>, <c>list_blocked_users/2</c> and 
          <c>list_blocked_users/3</c> returns a list of users that are 
          currently blocked from access.</p>
      </desc>
    </func>
    <func>
      <name>block_user(User, Port, Dir, Seconds) -> true | {error, Reason}</name>
      <name>block_user(User, Address, Port, Dir, Seconds) -> true | {error, Reason}</name>
      <fsummary>Block user from access to a directory for a certain amount of time.</fsummary>
      <type>
        <v>User    = string()</v>
        <v>Port    = integer()</v>
        <v>Address = {A,B,C,D} | string() | undefined</v>
        <v>Dir     = string()</v>
        <v>Seconds = integer() | infinity</v>
        <v>Reason  = no_such_directory</v>
      </type>
      <desc>
        <marker id="block_user"></marker>
        <p><c>block_user/4</c> and <c>block_user/5</c> blocks the user 
          <c>User</c> from the directory <c>Dir</c> for a specified 
          amount of time.</p>
      </desc>
    </func>
    <func>
      <name>unblock_user(User, Port)          -> true | {error, Reason}</name>
      <name>unblock_user(User, Address, Port) -> true | {error, Reason}</name>
      <name>unblock_user(User, Port, Dir)     -> true | {error, Reason}</name>
      <name>unblock_user(User, Address, Port, Dir) -> true | {error, Reason}</name>
      <fsummary>Remove a blocked user from the block list</fsummary>
      <type>
        <v>User   = string()</v>
        <v>Port   = integer()</v>
        <v>Address = {A,B,C,D} | string() | undefined</v>
        <v>Dir    = string()</v>
        <v>Reason = term()</v>
      </type>
      <desc>
        <marker id="unblock_user"></marker>
        <p><c>unblock_user/2</c>, <c>unblock_user/3</c> and 
          <c>unblock_user/4</c> removes the user <c>User</c> from 
          the list of blocked users for the Port (and Dir) specified.</p>
      </desc>
    </func>
  </funcs>

  <section>
    <marker id="callback_module"></marker>
    <title>The SecurityCallbackModule</title>
    <p>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),
      <seealso marker="#callback_module_event">event/4,5</seealso>, 
      which are described below.
      </p>
  </section>

  <funcs>
    <func>
      <name>event(What, Port, Dir, Data) -> ignored</name>
      <name>event(What, Address, Port, Dir, Data) -> ignored</name>
      <fsummary>This function is called whenever an event occurs in mod_security</fsummary>
      <type>
        <v>What  = atom()</v>
        <v>Port  = integer()</v>
        <v>Address = {A,B,C,D} | string() &lt;v>Dir   = string()</v>
        <v>Data  = [Info]</v>
        <v>Info  = {Name, Value}</v>
      </type>
      <desc>
        <marker id="callback_module_event"></marker>
        <p><c>event/4</c> or <c>event/4</c> is called whenever an event 
          occurs in the mod_security Erlang Webserver API module (<c>event/4</c> is
          called if Address is undefined and <c>event/5</c> otherwise). 
          The <c>What</c> argument specifies the type of event that has 
          occurred, and should be one of the following reasons; 
          <c>auth_fail</c> (a failed user authentication), 
          <c>user_block</c> (a user is being blocked from access) or 
          <c>user_unblock</c> (a user is being removed from the block list).</p>
        <note>
          <p>Note that the <c>user_unblock</c> event is not triggered when 
            a user is removed from the block list explicitly using the 
            <c>unblock_user</c> function.</p>
        </note>
      </desc>
    </func>
  </funcs>
  
</erlref>