mod_security(3erl)
πΈ NAME πΈ
okay so this is mod_security(3erl) β Erlang Module Definition β and the module itself is mod_security: Security Audit and Trailing Functionality, periodt. π
β¨ DESCRIPTION β¨
Security Audit and Trailing Functionality
π EXPORTS π
block_user(User, Port, Dir, Seconds) -> true | {error, Reason}block_user(User, Address, Port, Dir, Seconds) -> true | {error, Reason}
Types:
User = string()
Port = integer()
Address = {A,B,C,D} | string() | undefined
Dir = string()
Seconds = integer() | infinity
Reason = no_such_directory
block_user/4 and block_user/5 each block the user User from directory Dir for a specified amount of time. no cap, that's the whole vibe. π«
list_auth_users(Port) -> Users | []list_auth_users(Address, Port) -> Users | []list_auth_users(Port, Dir) -> Users | []list_auth_users(Address, Port, Dir) -> Users | []
Types:
Port = integer()
Address = {A,B,C,D} | string() | undefined
Dir = string()
Users = list() = [string()]
list_auth_users/1, list_auth_users/2, and list_auth_users/3 each return a list of users that are currently authenticated. Authentications are stored for SecurityAuthTimeout seconds, and then discarded. so they really said "expiry date" and meant it. β³
list_blocked_users(Port) -> Users | []list_blocked_users(Address, Port) -> Users | []list_blocked_users(Port, Dir) -> Users | []list_blocked_users(Address, Port, Dir) -> Users | []
Types:
Port = integer()
Address = {A,B,C,D} | string() | undefined
Dir = string()
Users = list() = [string()]
list_blocked_users/1, list_blocked_users/2, and list_blocked_users/3 each return a list of users that are currently blocked from access. the "do not pass go" list, fr fr. π
ββοΈ
unblock_user(User, Port) -> true | {error, Reason}unblock_user(User, Address, Port) -> true | {error, Reason}unblock_user(User, Port, Dir) -> true | {error, Reason}unblock_user(User, Address, Port, Dir) -> true | {error, Reason}
Types:
User = string()
Port = integer()
Address = {A,B,C,D} | string() | undefined
Dir = string()
Reason = term()
unblock_user/2, unblock_user/3, and unblock_user/4 each remove the user User from the list of blocked users for Port (and Dir). bestie is back on the guest list β¨
π SECURITYCALLBACKMODULE π
The SecurityCallbackModule is a user-written module that can receive events from the mod_security Erlang web server API module. This module only exports the functions event/[4,5] which are described here. very main character of it. π
π EXPORTS π
Module:event(What, Port, Dir, Data) -> ignoredModule:event(What, Address, Port, Dir, Data) -> ignored
Types:
What = atom()
Port = integer()
Address = {A,B,C,D} | string()
Dir = string()
Data = [Info]
Info = {Name, Value}
event/4 or event/5 is called whenever an event occurs in the mod_security Erlang web server API module. event/4 gets called if Address is undefined; otherwise it's event/5. The What argument specifies the type of event that has occurred, and it's one of these reasons: π
auth_fail: A failed user authentication.user_block: A user is being blocked from access.user_unblock: A user is being removed from the block list.
Note: The eventuser_unblockis not triggered when a user is removed from the block list explicitly using theunblock_userfunction. lowkey important, don't get caught lacking on this one. π
made with π«Ά by Ericsson AB, version inets 8.3.1.2, and this iconic little page is mod_security(3erl). bye bestie, go audit some security πβ¨
π¦ where this page comes from
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4 Β· Apache-2.0
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4.8 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms