{"id":43512215,"url":"https://github.com/travelping/ergw_aaa","last_synced_at":"2026-02-03T13:12:35.506Z","repository":{"id":11366811,"uuid":"68601484","full_name":"travelping/ergw_aaa","owner":"travelping","description":"Erlang AAA session implementation for erGW","archived":false,"fork":false,"pushed_at":"2024-06-11T15:26:40.000Z","size":1017,"stargazers_count":12,"open_issues_count":9,"forks_count":7,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-06-11T22:59:55.743Z","etag":null,"topics":["aaa","radius"],"latest_commit_sha":null,"homepage":"","language":"Erlang","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/travelping.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-19T12:00:10.000Z","updated_at":"2024-05-27T16:58:09.000Z","dependencies_parsed_at":"2024-05-15T22:56:02.695Z","dependency_job_id":"0f304f3a-8fd2-403a-8d41-cdb31785da9a","html_url":"https://github.com/travelping/ergw_aaa","commit_stats":null,"previous_names":[],"tags_count":55,"template":false,"template_full_name":null,"purl":"pkg:github/travelping/ergw_aaa","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travelping%2Fergw_aaa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travelping%2Fergw_aaa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travelping%2Fergw_aaa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travelping%2Fergw_aaa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/travelping","download_url":"https://codeload.github.com/travelping/ergw_aaa/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travelping%2Fergw_aaa/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29046503,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T10:09:22.136Z","status":"ssl_error","status_checked_at":"2026-02-03T10:09:16.814Z","response_time":96,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aaa","radius"],"created_at":"2026-02-03T13:12:34.242Z","updated_at":"2026-02-03T13:12:35.497Z","avatar_url":"https://github.com/travelping.png","language":"Erlang","funding_links":[],"categories":[],"sub_categories":[],"readme":"erGW-AAA - AAA component for the [erGW project][1]\n==================================================\n[![Build Status][gh badge]][gh]\n[![Coverage Status][coveralls badge]][coveralls]\n[![Erlang Versions][erlang version badge]][gh]\n\nThis is a companion project for the [erGW project][1] to provide an abstract\nAAA (Authentication, Authorization and Accounting) interface for protocols\nbased on erGW.\n\nSupported backend providers are:\n\n* a local dummy (mock)\n* RADIUS\n\nWork on progress:\n\n* DIAMETER\n* flexible configuration\n* the dropped attribute_map feature *might* be readded\n\nIn the future possible other providers are:\n\n* LDAP (Authentication and Authorization only)\n\nTERMINATION CAUSE MAPPING\n-------------\nWhen ergw needs to terminate an AAA session, the termination reasons to be included in those messages (e.g. CCR-T or ACR stop in diameter and Accounting-Request stop in Radius) are provided by the `ergw` to the `ergw_aaa` in the session data in the format of atoms. \nEach AAA handler can have a mapping configured to map these to termination causes of the corresponding protocol/interface.\nSee RFCs: [RFC2866](https://tools.ietf.org/html/rfc2866#section-5.10), [RFC3588](https://tools.ietf.org/html/rfc3588#section-8.15).\nAn example of this mapping:\n```erlang\n%% DIAMETER config example\n% ...\n{handlers, [\n    % ...\n    {ergw_aaa_ro, [\n        {function, 'ergw-pgw-epc-ro'},\n        {'Destination-Realm', \u003c\u003c\"test.apn.net\"\u003e\u003e},\n        {termination_cause_mapping, [\n            {normal, 1},           \n            {administrative, 4}, \n            {link_broken, 5},      \n            {upf_failure, 5},      \n            {remote_failure, 1},   \n            {cp_inactivity_timeout, 1},\n            {up_inactivity_timeout, 1},\n            {peer_restart, 1},\n            {'ASR', 1},\n            {error, 1},\n            {timeout, 1},\n            {conn_error, 1},\n            {rate_limit, 1},\n            {ocs_hold_end, 1},\n            {peer_reject, 1}\n        ]}\n    ]}\n    % ...\n]},\n%...\n```\n```erlang\n% RADIUS config example\n% ...\n{ergw_aaa_radius, [\n    {server, {{192,168,255,1}, 1813, \u003c\u003c\"radproxy\"\u003e\u003e}},\n        {termination_cause_mapping, [\n            {normal, 1},\n            {administrative, 6},\n            {link_broken, 2},\n            {upf_failure, 9},\n            {remote_failure, 9},\n            {cp_inactivity_timeout, 4},\n            {up_inactivity_timeout, 4},\n            {peer_restart, 7},\n            {'ASR', 6},\n            {error, 9},\n            {timeout, 4},\n            {conn_error, 10},\n            {rate_limit, 10},\n            {ocs_hold_end, 10},\n            {peer_reject, 10}\n        ]}\n]}\n% ...\n```\n\nBUILDING\n--------\n\nUsing rebar3:\n\n    # rebar3 compile\n\nCONFIGURATION\n-------------\n\nFor all releases in the 3.x stream, the configuration syntax might change at\nany point and might not be backward compatible.\n\nExample of possible config.\n\n```erlang\n {ergw_aaa,\n  [{functions,\n    [{'ergw-pgw-epc',\n      [{handler, ergw_aaa_diameter},\n       {'Origin-Host', \u003c\u003c\"ergw-pgw.dia.example.net\"\u003e\u003e},\n       {'Origin-Realm', \u003c\u003c\"dia.example.net\"\u003e\u003e},\n       {transports, [\n           [{connect_to, \u003c\u003c\"aaa://srv1.dia.example.net;transport=sctp\"\u003e\u003e},\n            {recbuf, 32768}]\n        ]},\n      ]}\n    ]},\n   {handlers,\n    [{ergw_aaa_static,\n        [{'NAS-Identifier',          \u003c\u003c\"NAS-Identifier\"\u003e\u003e},\n         {'Acct-Interim-Interval',   600},\n         {'Framed-Protocol',         'PPP'},\n         {'Service-Type',            'Framed-User'},\n         {'Node-Id',                 \u003c\u003c\"PGW-001\"\u003e\u003e},\n         {'Charging-Rule-Base-Name', \u003c\u003c\"m2m0001\"\u003e\u003e},\n         {rules, #{'Default' =\u003e\n                       #{'Rating-Group' =\u003e [3000],\n                         'Flow-Information' =\u003e\n                             [#{'Flow-Description' =\u003e [\u003c\u003c\"permit out ip from any to assigned\"\u003e\u003e],\n                                'Flow-Direction'   =\u003e [1]    %% DownLink\n                               },\n                              #{'Flow-Description' =\u003e [\u003c\u003c\"permit out ip from any to assigned\"\u003e\u003e],\n                                'Flow-Direction'   =\u003e [2]    %% UpLink\n                               }],\n                         'Metering-Method'  =\u003e [1],\n                         'Precedence' =\u003e [100]\n                        }\n                  }\n         }\n        ]},\n     {ergw_aaa_radius, [\n        {server, {{127,0,0,1}, 1812, \u003c\u003c\"secret\"\u003e\u003e}},\n        {termination_cause_mapping, [\n            {normal, 1},\n            {administrative, 6},\n            {link_broken, 2},\n            {upf_failure, 9},\n            {remote_failure, 9},\n            {cp_inactivity_timeout, 4},\n            {up_inactivity_timeout, 4},\n            {peer_restart, 7},\n            {'ASR', 6},\n            {error, 9},\n            {timeout, 4},\n            {conn_error, 10},\n            {rate_limit, 10},\n            {ocs_hold_end, 10},\n            {peer_reject, 10}\n        ]}\n     ]},\n     {ergw_aaa_rf, [{transport, 'ergw-pgw-epc'}]},\n     {ergw_aaa_ro, [\n        {transport, 'ergw-pgw-epc'},\n        {termination_cause_mapping, [\n            {normal, 1},           \n            {administrative, 4}, \n            {link_broken, 5},      \n            {upf_failure, 5},      \n            {remote_failure, 1},   \n            {cp_inactivity_timeout, 1},  \n            {up_inactivity_timeout, 1},\n            {peer_restart, 1},\n            {'ASR', 1},\n            {error, 1},\n            {timeout, 1},\n            {conn_error, 1},\n            {rate_limit, 1},\n            {ocs_hold_end, 1},\n            {peer_reject, 1}\n        ]}\n     ]}\n    ]},\n\n   {services,\n    [{'Default',     [{handler, 'ergw_aaa_static'}]},\n     {'RADIUS-Auth', [{handler, 'ergw_aaa_radius'},\n                      {server, {{127,1,0,1}, 1812, \u003c\u003c\"secret\"\u003e\u003e}}]},\n     {'RADIUS-Acct', [{handler, 'ergw_aaa_radius'},\n                      {server, {{127,2,0,1}, 1813, \u003c\u003c\"secret\"\u003e\u003e}}]},\n     {'Rf',          [{handler, 'ergw_aaa_rf'}]},\n     {'Gx',          [{handler, 'ergw_aaa_gx'}]}\n     {'Gy',          [{handler, 'ergw_aaa_ro'}]}\n    ]},\n\n   {apps,\n    [ {'Origin-Host', \u003c\u003c\"local.host\"\u003e\u003e},\n      {procedures,\n        [{default,\n          [{session, ['Default']},\n           {procedures, [{authenticate, ['RADIUS-Auth']},\n                         {authorize,    ['RADIUS-Auth']},\n                         {start,     ['RADIUS-Acct', 'Rf']},\n                         {interim,   ['RADIUS-Acct', 'Rf']},\n                         {stop,      ['RADIUS-Acct', 'Rf']},\n                         {{gx, 'CCR-Initial'},   ['Gx']},\n                         {{gx, 'CCR-Update'},    ['Gx']},\n                         {{gx, 'CCR-Terminate'}, ['Gx']},\n                         {{gy, 'CCR-Initial'},   ['Gy']},\n                         {{gy, 'CCR-Update'},    ['Gy']},\n                         {{gy, 'CCR-Terminate'}, ['Gy']}]}\n          ]}\n        ]}\n    ]}\n  ]},\n```\n\n[1]: https://github.com/travelping/ergw\n\n\u003c!-- Badges --\u003e\n[gh]: https://github.com/travelping/ergw_aaa/actions/workflows/main.yml\n[gh badge]: https://img.shields.io/github/workflow/status/travelping/ergw_aaa/CI?style=flat-square\n[coveralls]: https://coveralls.io/github/travelping/ergw_aaa\n[coveralls badge]: https://img.shields.io/coveralls/travelping/ergw_aaa/master.svg?style=flat-square\n[erlang version badge]: https://img.shields.io/badge/erlang-26.2%20to%2026.2-blue.svg?style=flat-square\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftravelping%2Fergw_aaa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftravelping%2Fergw_aaa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftravelping%2Fergw_aaa/lists"}