diff --git a/edugain_security_contacts.py b/edugain_security_contacts.py new file mode 100755 index 0000000000000000000000000000000000000000..1e1c83386fd3b5bf310b149c437e5b26a6e9f1c0 --- /dev/null +++ b/edugain_security_contacts.py @@ -0,0 +1,18 @@ +#!/usr/bin/env python3 + +# This script consume the eduGAIN API to retrieve the details of all the +# eduGAIN identity federations and parse it to create a list of +# security email addresses, if available, and the corresponding +# federation name in CSV format. +# This list will be printed to stdout. + +import requests + +feds = requests.get('https://technical.edugain.org/api.php?action=list_feds_full') + +feds_dict = feds.json() + +for fed in feds_dict: + if 'security_contact' in feds_dict[fed]: + if 'mail' in feds_dict[fed]['security_contact']: + print(f"{fed},{feds_dict[fed]['security_contact']['mail']['value']}")