group_attribute is never put in (Freeradius 3.0.10)
Hello list, I have spent quite a lot of time on trying to figure out this issue. In the sql query config I have: group_attribute = "Sql-Group" # Freeradius 3.x default, this does not work either authorize_group_reply_query = "SELECT id, groupname, attribute, value, op \ FROM ${groupreply_table} \ WHERE groupname = '%{${group_attribute}}' \ ORDER BY id" Here the enumerated group never gets put in so I get: (0) sql_config: EXPAND SELECT id, groupname, attribute, value, op FROM radgroupreply WHERE groupname = '%{Sql-Group}' ORDER BY id (0) sql_config: --> SELECT id, groupname, attribute, value, op FROM radgroupreply WHERE groupname = '' ORDER BY id (0) sql_config: Executing select query: SELECT id, groupname, attribute, value, op FROM radgroupreply WHERE groupname = '' ORDER BY id If I make a query with the static variable value (the real group of the user) then it works of course. I have tried now all possible variations SQL-Group, sql-group etc. Also the: group_attribute = "Sql-Group" # Freeradius 3.x default, this does not work either should be defined in the main sql.conf which is loaded first by the server but if I put it there then my custom sql section does not see it. Why is that? Thanks
On Feb 15, 2016, at 5:34 AM, Luescher Claude <stargate@tango.lu> wrote:
Hello list,
I have spent quite a lot of time on trying to figure out this issue. In the sql query config I have:
group_attribute = "Sql-Group" # Freeradius 3.x default, this does not work either
What does that mean? The "group_attribute" here is a short-hand for SQL-Group, or "instance-SQL-Group", when you have multiple SQL modules. e.g. sql sql1 { .... group_attribute = "sql1-SQL-Group" # manually edit it to be this }
Here the enumerated group never gets put in so I get:
(0) sql_config: EXPAND SELECT id, groupname, attribute, value, op FROM radgroupreply WHERE groupname = '%{Sql-Group}' ORDER BY id (0) sql_config: --> SELECT id, groupname, attribute, value, op FROM radgroupreply WHERE groupname = '' ORDER BY id (0) sql_config: Executing select query: SELECT id, groupname, attribute, value, op FROM radgroupreply WHERE groupname = '' ORDER BY id
Because It should be set to "sql_config-SQL-Group". Alan DeKok.
participants (2)
-
Alan DeKok -
Luescher Claude