From ca093178569e628cf8df1446d6782b0d3caf3071 Mon Sep 17 00:00:00 2001 From: Junaid Saeed Uppal Date: Tue, 23 Dec 2025 23:15:24 +0500 Subject: [PATCH] Simplify to PAP authentication only for initial testing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two-step auth flow: 1. AuthGetPassword: Fetches password from attributes using *dry_run 2. AuthPAP: Performs PAP authentication with *radauth + *pap Will add CHAP and MS-CHAPv1 after PAP is confirmed working. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- cgrates.json | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/cgrates.json b/cgrates.json index 6254984..332a4e9 100644 --- a/cgrates.json +++ b/cgrates.json @@ -82,9 +82,9 @@ }, "request_processors": [ { - "id": "PPPoEAuth", + "id": "AuthGetPassword", "filters": ["*string:~*vars.*radReqType:*radAuth"], - "flags": ["*event", "*attributes", "*log"], + "flags": ["*dry_run", "*attributes", "*continue", "*log"], "request_fields": [ {"tag": "Account", "path": "*cgreq.Account", "type": "*composed", "value": "~*req.User-Name", "mandatory": true} ], @@ -92,6 +92,18 @@ {"tag": "SessionTimeout", "path": "*rep.Session-Timeout", "type": "*constant", "value": "3600"}, {"tag": "AcctInterimInterval", "path": "*rep.Acct-Interim-Interval", "type": "*constant", "value": "60"} ] + }, + { + "id": "AuthPAP", + "filters": ["*string:~*vars.*radReqType:*radAuth"], + "flags": ["*radauth", "*pap", "*log"], + "request_fields": [ + {"tag": "UserPassword", "path": "*vars.UserPassword", "type": "*variable", "value": "~*cgrep.Attributes.Password"} + ], + "reply_fields": [ + {"tag": "ReplyOnError", "filters": ["*notempty:~*cgrep.Error:"], "path": "*rep.*radReplyCode", "type": "*constant", "value": "AccessReject"}, + {"tag": "ReplyMessage", "filters": ["*notempty:~*cgrep.Error:"], "path": "*rep.Reply-Message", "type": "*variable", "value": "~*cgrep.Error"} + ] } ] },