calling python3 form dynamic-clients server
I want to use a python3 module in the authorization section of the dynamic-clients server. When I use my python3 module in an other server I get data in the p structure. But p is empty if I call the module from dynamic-clients server. Any idea, what goes wrong? The output of the module is: (0) # Executing section authorize from file /etc/raddb/sites-enabled/dynamic-clients (0) authorize { *** authorize *** *** radlog call in authorize *** None {} do_python_single:618, authorize - updateDict is not dictionary do_python_single:675, authorize - RLM_MODULE_FAIL (0) [python3] = fail (0) } # authorize = fail (0) } # server dynamic_clients Mit freundlichen Grüßen, -- [*] sys4 AG https://sys4.de, +49 (89) 30 90 46 64 Schleißheimer Straße 26/MG,80333 München Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263 Vorstand: Patrick Ben Koetter, Marc Schiffbauer, Wolfgang Stief Aufsichtsratsvorsitzender: Florian Kirstein
what are the contents of mod config / python ?
On Dec 19, 2021, at 11:48 AM, Michael Schwartzkopff <ms@sys4.de> wrote:
I want to use a python3 module in the authorization section of the dynamic-clients server.
When I use my python3 module in an other server I get data in the p structure. But p is empty if I call the module from dynamic-clients server. Any idea, what goes wrong?
The output of the module is:
(0) # Executing section authorize from file /etc/raddb/sites-enabled/dynamic-clients (0) authorize { *** authorize *** *** radlog call in authorize ***
None
{} do_python_single:618, authorize - updateDict is not dictionary do_python_single:675, authorize - RLM_MODULE_FAIL (0) [python3] = fail (0) } # authorize = fail (0) } # server dynamic_clients
Mit freundlichen Grüßen,
--
[*] sys4 AG
https://sys4.de, +49 (89) 30 90 46 64 Schleißheimer Straße 26/MG,80333 München
Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263 Vorstand: Patrick Ben Koetter, Marc Schiffbauer, Wolfgang Stief Aufsichtsratsvorsitzender: Florian Kirstein
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On 19.12.21 17:52, Jonathan Davis wrote:
what are the contents of mod config / python ?
On Dec 19, 2021, at 11:48 AM, Michael Schwartzkopff <ms@sys4.de> wrote:
I want to use a python3 module in the authorization section of the dynamic-clients server.
When I use my python3 module in an other server I get data in the p structure. But p is empty if I call the module from dynamic-clients server. Any idea, what goes wrong?
The output of the module is:
(0) # Executing section authorize from file /etc/raddb/sites-enabled/dynamic-clients (0) authorize { *** authorize *** *** radlog call in authorize ***
None
{} do_python_single:618, authorize - updateDict is not dictionary do_python_single:675, authorize - RLM_MODULE_FAIL (0) [python3] = fail (0) } # authorize = fail (0) } # server dynamic_clients
Mit freundlichen Grüßen,
--
[*] sys4 AG
https://sys4.de, +49 (89) 30 90 46 64 Schleißheimer Straße 26/MG,80333 München
Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263 Vorstand: Patrick Ben Koetter, Marc Schiffbauer, Wolfgang Stief Aufsichtsratsvorsitzender: Florian Kirstein
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
I found the problem already. I have to configure |pass_all_vps_dict = yes in the python module. The next problem is that I cannot modify control attributes in the python module. | Mit freundlichen Grüßen, -- [*] sys4 AG https://sys4.de, +49 (89) 30 90 46 64 Schleißheimer Straße 26/MG,80333 München Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263 Vorstand: Patrick Ben Koetter, Marc Schiffbauer, Wolfgang Stief Aufsichtsratsvorsitzender: Florian Kirstein
On Dec 19, 2021, at 1:30 PM, Michael Schwartzkopff <ms@sys4.de> wrote:
I found the problem already. I have to configure
|pass_all_vps_dict = yes in the python module. The next problem is that I cannot modify control attributes in the python module. |
Those attributes are passed in the "config" list. See the docs: # Pass all VPS lists as a dictionary to the callbacks # Keys: "request", "reply", "config", "session-state", "proxy-request", # "proxy-reply" # This option prevales over "pass_all_vps" # pass_all_vps_dict = no Alan DeKok.
participants (3)
-
Alan DeKok -
Jonathan Davis -
Michael Schwartzkopff