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

Merge branch 'master' into 'master'

Master

See merge request !8
parents 6c6df71e 8212b741
Branches master
No related tags found
1 merge request!8Master
......@@ -10,7 +10,7 @@ Script name :`identity_federations_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 contacts per each federation in CSV format. This list will be printed to stdout.
CSV Format:
Output (CSV Format):
```
FEDERATION,COUNTRIES,SECURITY CONTACT,FEDERATION CONTACT
......@@ -40,7 +40,7 @@ Script: `entity_details.py`
This script will print out some details about a single entity or a list of entities
passed as a list of entityIDs.
CSV Format:
Output (CSV Format):
```
entityID,FederationName,RegistrationAuthority,OrganizationName,TechnicalContact,SupportContact,AdministrativeContact
......@@ -73,4 +73,33 @@ Examples
./entity_details.py -e idp_list -f edugain-v2.xml
```
## Entities Search
Script: `entity_search.py`
This script will search entities in a metadata aggregate by their certificates' SHA256 fingerprint
and it will output the entityID(s) in case of matches.
```
usage: entity_search.py [-h] [-s S] [-f F] [-u U]
Search for an entity in a metadata aggregate (default to eduGAIN metadata).
options:
-h, --help show this help message and exit
-s S search entity by the sha256 hash S
-f F load metadata from file F
-u U download metadata from url U (default to https://mds.edugain.org/edugain-v2.xml)
Output (String): `entityID`
Examples
- Search an entity by the SHA256 hash of its certificate in the eduGAIN metadata:
./entity_search.py -s SHA256HASH_STRING
- Search an entity by the SHA256 hash of its certificate using local metadata file:
./entity_details.py -s SHA256HASH_STRING -f edugain-v2.xml
```
......@@ -15,6 +15,7 @@ feds_dict = feds.json()
print('#NAME,EMAIL')
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']}")
if feds_dict[fed]['status'] == '6':
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