Standardised JSON VP list format

Arran Cudbard-Bell a.cudbardb at freeradius.org
Tue Nov 8 13:32:12 CET 2011


Hi All,

I'm proposing the following JSON structures for VP lists being sent from and parsed by FreeRADIUS. If anyone has any suggestions regarding other fields they'd like to see included, let me know.


Outbound (request):

{
	"<attribute>":{
		type:"<type>" ,			# RADIUS or internal attribute type
		value:[<values>]		# Always an array, may contain string, integer, float, JSON object (nested VP)
	},
	"User-Name":{
		type:"string",
		value:["user at example.org"]
	}
}

Inbound (response):

{
	"[qualifiers:]<attribute>":{
		op:"<operator>",		# One of the standard update construct operators
		value:<value>			# May be array (multivalued, or nested vps (JSON object)), value or JSON object (nested VP)
	},
	# Alternative
	"[qualifiers:]<attribute>":<value> 	# Value may be anything but a JSON object, array values may still hold multiple JSON objects
}

All values will be XLATd.

I'm thinking for the response, maybe two optional bools (for the expanded JSON object format): 
no_xlat -  where no_xlat:true disables xlat expansion
is_json - where is_json:true disables JSON parsing of the value (you can write JSON structure to an attribute for later parsing)

Thoughts?

If we can decide on a standard format, future modules will be required to implement it if they're just bridges to an external service (and the external service does not have predefined JSON structures).

Note: The outbound request will only use attributes from the request list. If you think attributes should be included from multiple lists, please explain why.

-Arran

Arran Cudbard-Bell
a.cudbardb at networkradius.com

Technical consultant and solutions architect

15 Ave. du Granier, Meylan, France
+33 4 69 66 54 50





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-devel/attachments/20111108/cc3681e8/attachment.html>


More information about the Freeradius-Devel mailing list