Skip to content
Snippets Groups Projects
Commit 4b6a19dc authored by Davide Vaghetti's avatar Davide Vaghetti
Browse files

Merge branch 'master' into 'master'

added new script for identity federation security contacts

See merge request !4
parents 241eef9a 5a434147
No related branches found
Tags v1.0.0
1 merge request!4added new script for identity federation security contacts
# eduGAIN Contacts
This script will download the current edugain metadata aggregate XML and parse it
to derive a list of contacts in CSV format. The list will be printed to stdout.
This repository contains tools to parse contacts from eduGAIN metadata and from
the eduGAIN APIs published on https://technical.edugain.org/api.php.
## Identity federations security contacts
Script name :`identity_federations_security_contacts.py`
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.
## Entities security contacts
Script: `entities_security_contacts.py`
This script will download the current edugain metadata aggregate XML and parse all the
identity providers found in order to derive a list of Organization names, domains and
security contacts in CSV format. This list will be printed to stdout.
......@@ -6,7 +6,6 @@
import requests
from xml.etree import ElementTree as ET
from urllib.parse import urlparse
def strip_start(s, start):
......
#!/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']}")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment