Commit Graph

10 Commits

Author SHA1 Message Date
ca09317856 Simplify to PAP authentication only for initial testing
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 <noreply@anthropic.com>
2025-12-23 23:15:24 +05:00
f6bcdccf9c Workaround CGRateS MS-CHAPv2 bug - use *event instead of *radauth
CGRateS has a bug where *radauth + *mschapv2 looks for MS-CHAP-Response
(attribute 1) instead of MS-CHAP2-Response (attribute 25).
MikroTik sends MS-CHAP2-Response, causing MANDATORY_IE_MISSING error.

This workaround uses *event + *attributes to validate user existence
via attributes subsystem. The actual password validation is NOT done
server-side - MikroTik will handle MS-CHAPv2 locally.

TODO: Report bug to CGRateS - librad.go line 130 should use
MS-CHAP2-Response for MetaMSCHAPV2 case.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 21:13:38 +05:00
918e9c8cff Simplify MS-CHAPv2 auth - remove accounts check that requires MaxUsage
Removed *accounts flag and mandatory MaxUsage field that was causing
NOT_FOUND:MaxUsage error. Using fixed Session-Timeout instead.
First processor now just fetches attributes (password) for auth.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 21:08:52 +05:00
dfb925494c Implement proper MS-CHAPv2 authentication for MikroTik PPPoE
Two-processor approach:
1. MSCHAPv2GetPassword: Uses *authorize + *attributes to fetch password
   from CGRateS attributes subsystem and get MaxUsage for session timeout
2. MSCHAPv2Auth: Uses *radauth + *mschapv2 to perform actual MS-CHAPv2
   authentication with cryptographic proof (MS-CHAP2-Success)

The password is read from ~*cgrep.Attributes.Password (set via Attributes.csv)
and placed in *vars.UserPassword for the *radauth to use.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 21:07:05 +05:00
73753b5bc3 Add *none flag to request_processor to fix unknown request type error
The processor must have a request type flag (*none, *authorize, *radauth, etc.)
not just *log. Without it, reqType stays empty and hits the default switch case
returning "unknown request type: <>".

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 21:03:40 +05:00
9a7430cbe5 Move processor to cgrates.json, disable separate files 2025-12-23 20:56:52 +05:00
751723ee48 radius auth fix 2025-12-23 19:56:17 +05:00
dad5a4ca01 radius auth fix 2025-12-23 19:43:36 +05:00
82aba07b01 pppoe addition 2025-12-23 18:36:36 +05:00
a67f3609c4 first commit 2025-12-23 18:08:31 +05:00