Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature : xlat pairs as json string #2771

Closed
maximumG opened this issue Jul 3, 2019 · 1 comment

Comments

Projects
None yet
3 participants
@maximumG
Copy link

commented Jul 3, 2019

Issue type

  • Feature request

Feature description

I saw that it was possible to serialize attributes as comma-delimited string using the %{pairs:...}, which leads to the following format

User-Name = 'Bob', User-Password = 'bar'

We have a use case where we want to serialize attributes of specific FreeRADIUS chains (request, response, control) as JSON compatible string with the following format.

"User-Name": "Bob", "User-Password": "bar"

Would you be interessted in such feature ? If yes I can propose to send a pull request with the following modification in rlm_rest.c file. Add a new XLAT named pairs_json which:

  • Take the same parameters as the pais_xlat
  • return a string which VP encoded as "V":"P", "V":"P"
@alandekok

This comment has been minimized.

Copy link
Member

commented Jul 3, 2019

The rlm_json module in "master" branch can do this. You're welcome to back-port it to v3.

@arr2036 arr2036 closed this Jul 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.