Missing Realm when entering second authorization group
Version & OS: Freeradius-2.0.5 Gentoo It appears that during the second iteration in authorize section, the Realm has become NULL. We rely on checking the Realm to choose the appropriate Auth-Type to authenticate local users and proxy everybody else to an external network. ... +- entering group authorize ++[preprocess] returns ok rlm_realm: Looking up realm "math.leidenuniv.nl" for User-Name = "testuser@math.leidenuniv.nl" rlm_realm: Found realm "math.leidenuniv.nl" rlm_realm: Adding Stripped-User-Name = "testuser" rlm_realm: Adding Realm = "math.leidenuniv.nl" rlm_realm: Proxying request from user testuser to realm math.leidenuniv.nl rlm_realm: Preparing to proxy authentication request to realm "math.leidenuniv.nl" ++[suffix] returns updated rlm_eap: No EAP-Message, not doing EAP ++[eap] returns noop users: Matched entry DEFAULT at line 292 ++[files] returns ok ... +- entering group pre-proxy ... +- entering group authorize ++[preprocess] returns ok ++[auth_log] returns ok rlm_realm: No '@' in User-Name = "testuser", looking up realm NULL rlm_realm: No such realm "NULL" ++[suffix] returns noop rlm_eap: No EAP-Message, not doing EAP ++[eap] returns noop ++[files] returns noop rlm_pap: WARNING! No "known good" password found for the user. Authentication may fail because of this. ++[pap] returns noop auth: No authenticate method (Auth-Type) configuration found for the request: Rejecting the user auth: Failed to validate the user. Found Post-Auth-Type Reject ... NOTE: ... means stripped normal behaviour/output. From the verbose output, the first part is correct. The request is proxied to the correct server. But when it arrives in the authentication server it fails to extract the Realm from the proxied request. In ``users'' we have: DEFAULT Realm == "math.leidenuniv.nl", Auth-Type := PAM Reply-Message = "math here", Fall-Through = no But as the log says, which is correct, there's no Auth-Type for that Realm. If the Realm == "math.leidenuniv.nl" condition is removed, which results in Auth-Type = PAM for everybody, authentication succeeds for local users; which is to be expected. Our config worked perfectly in freeradius-1.1.7. Now I wonder, why is the Realm equal to NULL? I see suffix updated the request, why isn't the second iteration seeing that update? Best regards, Xiwen -- -- Xiwen Cheng System Administrator ;" Enthusiasm is contagious, Mathematical Institute ; but hype is a disease. " Leiden University ;E-mail: xcheng@math.leidenuniv.nl Niels Bohrweg 1 K210 ;Office: (+31) 715277134 2333 CA Leiden ;Mobile: (+31) 611119991 The Netherlands ;GPG Key id: 194F572B ++
hi, are you doing local proxy (ie have an entry for math.....nl in proxy.conf?) if so, ensure you define 'nostrip' otherwise the realm will be removed and you cannot use it. alan
On Mon, Jun 15, 2009 at 10:24:04AM +0100, A.L.M.Buxey@lboro.ac.uk wrote:
are you doing local proxy (ie have an entry for math.....nl in proxy.conf?) if so, ensure you define 'nostrip' otherwise the realm will be removed and you cannot use it.
Yes, we have our Realm defined in proxy.conf: home_server_pool mi { type = fail-over home_server = localhost } realm math.leidenuniv.nl { auth_pool = mi # nostrip } I tried adding the nostrip option, but as a result radiusd ends up in an infinite loop proxy-ing to itself: .... Proxy-State = 0x313839 Proxy-State = 0x323035 Proxy-State = 0x313930 Proxy-State = 0x323437 Proxy-State = 0x3933 Proxy-State = 0x323130 ... The Realm indeed remained untouched in the username through out the request. How can I stop this loop? Cheers, Xiwen -- -- Xiwen Cheng System Administrator ;" Enthusiasm is contagious, Mathematical Institute ; but hype is a disease. " Leiden University ;E-mail: xcheng@math.leidenuniv.nl Niels Bohrweg 1 K210 ;Office: (+31) 715277134 2333 CA Leiden ;Mobile: (+31) 611119991 The Netherlands ;GPG Key id: 194F572B ++
On Mon, Jun 15, 2009 at 10:24:04AM +0100, A.L.M.Buxey@lboro.ac.uk wrote:
are you doing local proxy (ie have an entry for math.....nl in proxy.conf?) if so, ensure you define 'nostrip' otherwise the realm will be removed and you cannot use it.
Yes, we have our Realm defined in proxy.conf: home_server_pool mi { type = fail-over home_server = localhost } realm math.leidenuniv.nl { auth_pool = mi # nostrip }
I tried adding the nostrip option, but as a result radiusd ends up in an infinite loop proxy-ing to itself: .... Proxy-State = 0x313839 Proxy-State = 0x323035 Proxy-State = 0x313930 Proxy-State = 0x323437 Proxy-State = 0x3933 Proxy-State = 0x323130 ...
The Realm indeed remained untouched in the username through out the request. How can I stop this loop?
Don't proxy internally. Remove that home server and leave only the realm as local realm: realm math.leidenuniv.nl { } Ivan Kalik Kalik Informatika ISP
On Mon, Jun 15, 2009 at 10:54:10AM +0100, Ivan Kalik wrote:
Don't proxy internally. Remove that home server and leave only the realm as local realm:
Thank you and everybody's replies! That did the trick. Kind regards, Xiwen -- -- Xiwen Cheng System Administrator ;" Enthusiasm is contagious, Mathematical Institute ; but hype is a disease. " Leiden University ;E-mail: xcheng@math.leidenuniv.nl Niels Bohrweg 1 K210 ;Office: (+31) 715277134 2333 CA Leiden ;Mobile: (+31) 611119991 The Netherlands ;GPG Key id: 194F572B ++
Hi,
The Realm indeed remained untouched in the username through out the request. How can I stop this loop?
easiest way is to point that proxy.conf at a new virtual server eg called 'local' in which you do not call prefix,suffix etc etc then these details wont be touched and the server wont try to proxy it again either. copy eg 'inner-tunnel' to 'local' ( i chose inner-tunnel because its been designed to be a virtual server) and give it a name on the server { line, then edit the authen/author/account bits as appropriate. in this way, the main default file is a general file and all your local stuff, policies, actions, logic etc only happen to 'local' people - that have been proxied to the local virtual server by proxy.conf alan
participants (3)
-
A.L.M.Buxey@lboro.ac.uk -
Ivan Kalik -
Xiwen Cheng