[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freeradius-users
Subject:    Issue when login name and password configured in UTF-8 format
From:       Elayaraja Prabhakaran <Elayaraja.Prabhakaran () aricent ! com>
Date:       2008-12-22 15:27:55
Message-ID: B110A82B42E4E547B2A622349609CC1E2D596FF33B () GUREXMB02 ! ASIAN ! AD ! ARICENT ! COM
[Download RAW message or body]

Dear freeradius-users list members,

I am testing on freeradius server with X-Supplicant and PostgreSQL. The \
client_encoding in DB is set to UTF-8 by default.

When configuring login name and password in english text, authentication is \
successfully completed. However, when i use UTF-8 characters as login name, \
freeradius server is dropping the packets and the error message i found in server is \
login name is incorrect. But the loginname configured in xsupplicant and freeradius \
are same (UTF-8 format). I guess the FreeRadius does not support UTF-8 chars and \
hence, passes some junk (letters converted into DECIMAL with "=" prefix).

Below is the log of Freeradius when run in DEBUG mode.

**********************************************************************************************
 Mon Dec 22 19:46:38 2008 : Debug:   modsingle[authorize]: calling sql (rlm_sql) for \
request 19 Mon Dec 22 19:46:38 2008 : Debug:   expand: %{User-Name} -> ï » ¿Ã£??ã? \
¹Ã£??ã??è µ ·Ã£??ã? £Ã£? ¦Ã£??ã?? Mon Dec 22 19:46:38 2008 : Debug: rlm_sql \
(sql): sql_set_user escaped user --> 'ï » ¿Ã£??ã? ¹Ã£??ã??è µ ·Ã£??ã? £Ã£? \
¦Ã£??ã??' Mon Dec 22 19:46:38 2008 : Debug: rlm_sql (sql): Reserving sql socket id: \
0 Mon Dec 22 19:46:38 2008 : Debug:   expand: SELECT id, UserName, Attribute, Value, \
Op       FROM radcheck       WHERE Username = '%{SQL-User-Name}'         ORDER BY id \
-> SELECT id, UserName, Attribute, Value, Op        FROM radcheck       WHERE \
Username = '=EF=BB=BF=E3=83=86=E3=82=B9=E3=83=88=E3=81=8C=E8=B5=B7=E3=81=93=E3=81=A3=E3=81=A6=E3=81=84=E3=82=8B' \
ORDER BY id Mon Dec 22 19:46:38 2008 : Debug: rlm_sql_postgresql: query: SELECT id, \
UserName, Attribute, Value, Op      FROM radcheck       WHERE Username = \
'=EF=BB=BF=E3=83=86=E3=82=B9=E3=83=88=E3=81=8C=E8=B5=B7=E3=81=93=E3=81=A3=E3=81=A6=E3=81=84=E3=82=8B' \
ORDER BY id Mon Dec 22 19:46:38 2008 : Debug: rlm_sql_postgresql: Status: \
PGRES_TUPLES_OK Mon Dec 22 19:46:38 2008 : Debug: rlm_sql_postgresql: query affected \
rows = 0 , fields = 5 Mon Dec 22 19:46:38 2008 : Debug:   expand: SELECT GroupName \
FROM usergroup WHERE UserName='%{SQL-User-Name}' -> SELECT GroupName FROM usergroup \
WHERE UserName='=EF=BB=BF=E3=83=86=E3=82=B9=E3=83=88=E3=81=8C=E8=B5=B7=E3=81=93=E3=81=A3=E3=81=A6=E3=81=84=E3=82=8B'
 Mon Dec 22 19:46:38 2008 : Debug: rlm_sql_postgresql: query: SELECT GroupName FROM \
usergroup WHERE UserName='=EF=BB=BF=E3=83=86=E3=82=B9=E3=83=88=E3=81=8C=E8=B5=B7=E3=81=93=E3=81=A3=E3=81=A6=E3=81=84=E3=82=8B'
 Mon Dec 22 19:46:38 2008 : Debug: rlm_sql_postgresql: Status: PGRES_TUPLES_OK
Mon Dec 22 19:46:38 2008 : Debug: rlm_sql_postgresql: query affected rows = 0 , \
fields = 1 Mon Dec 22 19:46:38 2008 : Debug: rlm_sql (sql): Released sql socket id: 0
Mon Dec 22 19:46:38 2008 : Debug: rlm_sql (sql): User ï » ¿Ã£??ã? ¹Ã£??ã??è µ \
·Ã£??ã? £Ã£? ¦Ã£??ã?? not found Mon Dec 22 19:46:38 2008 : Debug:   \
modsingle[authorize]: returned from sql (rlm_sql) for request 19 Mon Dec 22 19:46:38 \
                2008 : Debug: ++[sql] returns notfound
**********************************************************************************************


Is there any way to achieve UTF-8 support only with postgresql queries (some kind of \
conversion to binary and then can be compared with radcheck and radreply) or is there \
any tweak with Freeradius?

Regards
Elayaraja P

________________________________
"DISCLAIMER: This message is proprietary to Aricent and is intended solely for the \
use of the individual to whom it is addressed. It may contain privileged or \
confidential information and should not be circulated or used for any purpose other \
than for what it is intended. If you have received this message in error,please \
notify the originator immediately. If you are not the intended recipient, you are \
notified that you are strictly prohibited from using, copying, altering, or \
disclosing the contents of this message. Aricent accepts no responsibility for loss \
or damage arising from the use of the information transmitted by this email including \
damage from virus."


[Attachment #3 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta content="MSHTML 6.00.2900.3492" name="GENERATOR">
</head>
<body>
<div><font face="Arial" size="2"><span class="271555714-22122008">Dear \
freeradius-users list members,</span></font></div> <div><font face="Arial" \
size="2"><span class="271555714-22122008"></span></font>&nbsp;</div> <div><font \
face="Arial" size="2"><span class="271555714-22122008">I am testing on freeradius \
server with X-Supplicant and PostgreSQL. The client_encoding in DB is set&nbsp;to \
UTF-8 by default.</span></font></div> <div><font face="Arial" size="2"><span \
class="271555714-22122008"></span></font>&nbsp;</div> <div><font face="Arial" \
size="2"><span class="271555714-22122008">When configuring login name and password in \
english text, authentication is successfully completed. </span></font><font \
face="Arial" size="2"><span class="271555714-22122008">However, when i use UTF-8 \
characters as login name, freeradius server is dropping the packets and the error \
message i found in server is login name&nbsp;is incorrect. </span></font><font \
face="Arial" size="2"><span class="271555714-22122008">But the loginname configured \
in xsupplicant and freeradius are same (UTF-8 format). I guess the FreeRadius does \
not support UTF-8 chars and hence, passes some junk (letters converted  into DECIMAL \
with &quot;=&quot; prefix). </span></font></div> <div><font face="Arial" \
size="2"><span class="271555714-22122008"></span></font>&nbsp;</div> <div><font \
face="Arial" size="2"><span class="271555714-22122008">Below is the log of Freeradius \
when run in DEBUG mode.</span></font></div> <div><font face="Arial" size="2"><span \
class="271555714-22122008"></span></font>&nbsp;</div> <div><font face="Arial" \
size="2"><span class="271555714-22122008">***********************************************<span \
class="271555714-22122008">***********************************************</span></span></font></div>
 <div><font face="Arial" size="2"><span class="271555714-22122008">Mon Dec 22 \
19:46:38 2008 : Debug:&nbsp;&nbsp; modsingle[authorize]: calling sql (rlm_sql) for \
request 19<br> Mon Dec 22 19:46:38 2008 : Debug:&nbsp;&nbsp; expand: %{User-Name} \
-&gt; ï » ¿Ã£??ã? ¹Ã£??ã??è µ ·Ã£??ã? £Ã£? ¦Ã£??ã??<br> Mon Dec 22 19:46:38 \
2008 : Debug: rlm_sql (sql): sql_set_user escaped user --&gt; 'ï » ¿Ã£??ã? \
¹Ã£??ã??è µ ·Ã£??ã? £Ã£? ¦Ã£??ã??'<br> Mon Dec 22 19:46:38 2008 : Debug: rlm_sql \
(sql): Reserving sql socket id: 0<br> Mon Dec 22 19:46:38 2008 : Debug:&nbsp;&nbsp; \
expand: SELECT id, UserName, Attribute, Value, Op&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
FROM radcheck&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHERE Username = \
'%{SQL-User-Name}'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ORDER BY id -&gt; \
SELECT id, UserName, Attribute, Value, Op&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
FROM radcheck&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHERE Username =  \
'=EF=BB=BF=E3=83=86=E3=82=B9=E3=83=88=E3=81=8C=E8=B5=B7=E3=81=93=E3=81=A3=E3=81=A6=E3=81=84=E3=82=8B'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
ORDER BY id<br> Mon Dec 22 19:46:38 2008 : Debug: rlm_sql_postgresql: query: SELECT \
id, UserName, Attribute, Value, Op&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FROM \
radcheck&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHERE Username = \
'=EF=BB=BF=E3=83=86=E3=82=B9=E3=83=88=E3=81=8C=E8=B5=B7=E3=81=93=E3=81=A3=E3=81=A6=E3=81=84=E3=82=8B'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
ORDER  BY id<br>
Mon Dec 22 19:46:38 2008 : Debug: rlm_sql_postgresql: Status: PGRES_TUPLES_OK<br>
Mon Dec 22 19:46:38 2008 : Debug: rlm_sql_postgresql: query affected rows = 0 , \
fields = 5<br> Mon Dec 22 19:46:38 2008 : Debug:&nbsp;&nbsp; expand: SELECT GroupName \
FROM usergroup WHERE UserName='%{SQL-User-Name}' -&gt; SELECT GroupName FROM \
usergroup WHERE UserName='=EF=BB=BF=E3=83=86=E3=82=B9=E3=83=88=E3=81=8C=E8=B5=B7=E3=81=93=E3=81=A3=E3=81=A6=E3=81=84=E3=82=8B'<br>
 Mon Dec 22 19:46:38 2008 : Debug: rlm_sql_postgresql: query: SELECT GroupName FROM \
usergroup WHERE UserName='=EF=BB=BF=E3=83=86=E3=82=B9=E3=83=88=E3=81=8C=E8=B5=B7=E3=81=93=E3=81=A3=E3=81=A6=E3=81=84=E3=82=8B'<br>
 Mon Dec 22 19:46:38 2008 : Debug: rlm_sql_postgresql: Status: PGRES_TUPLES_OK<br>
Mon Dec 22 19:46:38 2008 : Debug: rlm_sql_postgresql: query affected rows = 0 , \
fields = 1<br> Mon Dec 22 19:46:38 2008 : Debug: rlm_sql (sql): Released sql socket \
id: 0<br> Mon Dec 22 19:46:38 2008 : Debug: rlm_sql (sql): User ï » ¿Ã£??ã? \
¹Ã£??ã??è µ ·Ã£??ã? £Ã£? ¦Ã£??ã?? not found<br> Mon Dec 22 19:46:38 2008 : \
Debug:&nbsp;&nbsp; modsingle[authorize]: returned from sql (rlm_sql) for request \
19<br> Mon Dec 22 19:46:38 2008 : Debug: &#43;&#43;[sql] returns \
notfound</span></font></div> <div><font face="Arial" size="2"><span \
class="271555714-22122008"><span \
class="271555714-22122008">***********************************************<span \
class="271555714-22122008">***********************************************</span></span></span></font></div>
 <div><font face="Arial" size="2"><span class="271555714-22122008"><span \
class="271555714-22122008"><span \
class="271555714-22122008"></span></span></span></font>&nbsp;</div> <div><font \
face="Arial" size="2"><span class="271555714-22122008"><span \
class="271555714-22122008"><span class="271555714-22122008">Is there any way to \
achieve UTF-8 support only with postgresql queries (some kind of conversion to binary \
and then can be compared  with radcheck and radreply) or is there any tweak with \
Freeradius? </span></span></span></font></div> <div><font face="Arial" size="2"><span \
class="271555714-22122008"></span></font>&nbsp;</div> <div><font face="Arial" \
size="2"><span class="271555714-22122008">Regards</span></font></div> <div><font \
face="Arial" size="2"><span class="271555714-22122008">Elayaraja \
P</span></font></div> <br>
<hr>
<font face="Arial" color="Gray" size="3">&quot;DISCLAIMER: This message is \
proprietary to Aricent and is intended solely for the use of the individual to whom \
it is addressed. It may contain privileged or confidential information and should not \
be circulated or  used for any purpose other than for what it is intended. If you \
have received this message in error,please notify the originator immediately. If you \
are not the intended recipient, you are notified that you are strictly prohibited \
from using, copying, altering,  or disclosing the contents of this message. Aricent \
accepts no responsibility for loss or damage arising from the use of the information \
transmitted by this email including damage from virus.&quot;<br> </font>
</body>
</html>



-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
--===============2094621589==--

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic