Switch to authorization-only approach (like sample config)
CGRateS PAP has null-padding bug that requires newer version with *strip fix. Using *authorize + *attributes instead of *radauth. This checks if account exists (authorization) but does NOT verify passwords (authentication). Same approach as the working sample. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
22
cgrates.json
22
cgrates.json
@@ -82,23 +82,23 @@
|
||||
},
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "AuthPAP",
|
||||
"id": "Authorization",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth"],
|
||||
"flags": ["*radauth", "*pap", "*log"],
|
||||
"flags": ["*authorize", "*attributes", "*log"],
|
||||
"request_fields": [
|
||||
{"tag": "UserPassword", "path": "*vars.UserPassword", "type": "*constant",
|
||||
"value": "test"}
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "data"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed", "value": "~*req.Acct-Session-Id", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*composed", "value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*composed", "value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*constant", "value": "*any", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*composed", "value": "~*req.Event-Timestamp;*now", "mandatory": true}
|
||||
],
|
||||
"reply_fields": [
|
||||
{"tag": "RemoveOnError", "filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
|
||||
{"tag": "Code", "path": "*rep.*radReplyCode", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*constant", "value": "AccessReject"},
|
||||
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*variable", "value": "~*cgrep.Error"},
|
||||
{"tag": "SessionTimeout", "path": "*rep.Session-Timeout", "filters": ["*empty:~*cgrep.Error:"],
|
||||
"type": "*constant", "value": "3600"},
|
||||
{"tag": "AcctInterimInterval", "path": "*rep.Acct-Interim-Interval", "filters": ["*empty:~*cgrep.Error:"],
|
||||
"type": "*constant", "value": "30"}
|
||||
{"tag": "SessionTimeout", "path": "*rep.Session-Timeout", "type": "*constant", "value": "3600"},
|
||||
{"tag": "AcctInterimInterval", "path": "*rep.Acct-Interim-Interval", "type": "*constant", "value": "30"}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user