Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup eradius.app.src #171

Merged
merged 1 commit into from
Nov 24, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 1 addition & 90 deletions src/eradius.app.src
Original file line number Diff line number Diff line change
Expand Up @@ -15,96 +15,7 @@
{counter_aggregator, false},
{logfile, "./radius.log"},
{metrics, [{enabled, [server, nas, client]}]},
{recbuf, 8192} % maximum socket receive buffer in bytes

%% RADIUS server configuration:
vkatsuba marked this conversation as resolved.
Show resolved Hide resolved
%%
%% Note:
%% Square brackets ([]) denote an array that consists of n comma-separated objects.
%% Curly brackets ({}) denote a tuple that consists of a defined number of objects.
%%
%% Servers in this configuration are endpoints consisting of an IPv4 address and one or more ports.
%% 'servers' is a list ([]) of said endpoints:
%% servers == { servers, [<Server>] }
%% Each server is tuple ({}):
%% Server == { <SymbolicName>, { <IP>, [<Ports>] } } | { <SymbolicName>, { <IP>, [<Ports>] }, <ExtraServerOptions> }
%% ExtraServerOptions == [<ServerOption>]
%% ServerOption == {rate_config, <SymbolicNameLimit> | <RateConfigList>}
%%
%% Rate configuration can be configurated per server, in extra configuration, with a symbolic name or directly in server
%% {SymbolicNameLimit, RateConfigList}
%% RateConfigList == [<RateOption>]
%% RateOption == { limit | max_size | max_time, integer() | undefined }
%%
%%
%% Each server is assigned a list of handlers. This list defines the NASs that are allowed to send RADIUS requests to a server and
%% which handler is to process the request.
%%
%% Handler assignment: {<SymbolicName>, [<Handlers>]}
%% SymbolicName == Reference to a previously defined server.
%% Handler == { <HandlerDefinition>, [<Sources>] }
%% If only one handler module is used, it can be defined globally as {radius_callback, <HandlerMod>}.
%% If more than one handler modules are used, they have to be given in the HandlerDefinition:
%% HandlerDefinition == {<HandlerMod>, <NasId>, <HandlerArgs>} | {<NasId>, <HandlerArgs>}
%% HandlerMod == Handler module to process the received requests.
%% NasId == String describing the Source.
%% HandlerArgs == List of arguments givent the handler module.
%% Source == {<IP>, <Secret>} | {<IP>, <Secret>, [<SourceOption>]}
%% SourceOption == {group, <GroupName>} | {nas_id, <NasId> }
%%
%% IP == IPv4 source address.
%% Secret == Binary. Passphrase, the NAS authenticates with.
%% GroupName:
%% RADIUS requests received by a server are forwarded to lists of nodes.
%% The lists are assigned to handlers, so the RADIUS requests of every handler can be forwarded to different nodes, if necessary.
%% The lists are referenced by a GroupName. If only one group is defined, the GroupName can be omitted.
%% In this case, all handlers forward their requests to the same list of nodes.
%% Session nodes == {session_nodes, ['node@host', ...]} | {session_nodes, [{<GroupName>, ['node@host', ...]}]}
%%
%% Example 1:
%% All requests are forwarded to the same globally defined list of nodes.
%% Only one handler module is used.
%%
%% {session_nodes, ['node1@host1', 'node2@host2']},
%% {radius_callback, tposs_pcrf_radius},
%% {servers, [
%% {root, {"127.0.0.1", [1812, 1813]}}
%% ]},
%% {root, [
%% { {"NAS1", [handler_arg1, handler_arg2]},
%% [{"10.18.14.2", <<"secret1">>}]},
%% { {"NAS2", [handler_arg1, handler_arg2]},
%% [{"10.18.14.3", <<"secret2">>, [{nas_id, <<"name">>}]}]}
%% ]}
%%
%% Example 2:
%% Requests of different sources are forwarded to different nodes.
%% Different handlers are used for the sources.
%%
%% {session_nodes, [
%% {"NodeGroup1", ['node1@host1', 'node2@host2']},
%% {"NodeGroup2", ['node3@host3', 'node4@host4']}
%% ]
%% },
%% {servers, [
%% {root, {"127.0.0.1", [1812, 1813]}}
%% ]},
%% {root, [
%% { {tposs_pcrf_handler1, "NAS1", [handler_arg1, handler_arg2]},
%% [ {"10.18.14.2", <<"secret1">>, [{group, "NodeGroup1"}]} ] },
%% { {tposs_pcrf_handler2, "NAS2", [handler_arg3, handler_arg4]},
%% [ {"10.18.14.3", <<"secret2">>, [{group, "NodeGroup2"}]} ] }
%% ]}
%\
%%
%% Metrics configuration:
%%
%% The `metrics` - `enable` configuration option provides the list which may contains following atoms:
%%
%% * nas - enables nas metrics (count of dropped packets and etc...)
%% * server - enables server metrics (server uptime and etc..)
%% * client - enables client metrics (count of access requests and etc...)
%%
{recbuf, 8192}
]},
{maintainers, ["Andreas Schultz", "Vladimir Tarasenko", "Yury Gargay"]},
{licenses, ["MIT"]},
Expand Down