Skip to content
Snippets Groups Projects

added new script for identity federation security contacts

Merged Davide Vaghetti requested to merge davide.vaghetti/edugain-contacts:master into master
1 file
+ 18
0
Compare changes
  • Side-by-side
  • Inline
+ 18
0
#!/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']}")
Loading