MONROE-PROJECT / Scheduler

The MONROE scheduling server, and deployment daemon
https://www.monroe-project.eu/
0 stars 2 forks source link

jq does not extract eduroam username #11

Closed alfs closed 6 years ago

alfs commented 6 years ago

The jq filter does not extract fields with dots. Needs [" "] as below:

root@Monroe000:~# cat /tmp/config | jq -r '.eduroam.identity // empty'
root@Monroe000:~# cat /tmp/config | jq -r '.["eduroam.identity"] // empty'
stefalfr01@student.kau.se
root@Monroe000:~#
relet commented 6 years ago

I see. It was supposed to be a nested dictionary, as with the ssh keys. ie "eduroam": {"identity":...} but I see why you were assuming dots.

Dots don't make much sense, but maybe the nested dictionary is just as pointless with one of the fields to be hidden.

What would you suggest we use? For now you'd have to provide two dicts, eduroam and _eduroam

relet commented 6 years ago

I changed the scripts to listen to _eduroam for both identity and password. You can now use "_eduroam": {"identity":..., "hash":... }