Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
edugain
eduGAIN contacts
Commits
4d9a3040
Commit
4d9a3040
authored
Jun 09, 2021
by
Davide Vaghetti
Browse files
Merge branch 'master' into 'master'
Master See merge request
!5
parents
4b6a19dc
720fb7e1
Changes
3
Hide whitespace changes
Inline
Side-by-side
entities_security_contacts.py
View file @
4d9a3040
...
...
@@ -25,7 +25,8 @@ ns = {
'mdui'
:
'urn:oasis:names:tc:SAML:metadata:ui'
,
'shibmd'
:
'urn:mace:shibboleth:metadata:1.0'
,
'remd'
:
'http://refeds.org/metadata'
,
'icmd'
:
'http://id.incommon.org/metadata'
'icmd'
:
'http://id.incommon.org/metadata'
,
'mdrpi'
:
'urn:oasis:names:tc:SAML:metadata:rpi'
,
}
...
...
@@ -33,6 +34,13 @@ entities = root.findall('./md:EntityDescriptor', ns)
for
entity
in
entities
:
sec_mails
=
set
()
registration_authority
=
''
registration_info
=
entity
.
find
(
'./md:Extensions/mdrpi:RegistrationInfo'
,
ns
)
if
registration_info
==
None
:
continue
else
:
registration_authority
=
registration_info
.
attrib
[
'registrationAuthority'
].
strip
()
orgname
=
entity
.
find
(
'./md:Organization/md:OrganizationDisplayName'
,
ns
).
text
.
strip
()
if
not
orgname
:
continue
...
...
@@ -62,7 +70,7 @@ for entity in entities:
for
mail
in
sec_mails
:
if
(
domain
,
mail
)
not
in
seen_doms_mails
:
seen_doms_mails
.
add
((
domain
,
mail
))
contacts
.
add
(
'{},{},{}'
.
format
(
domain
,
mail
,
orgname
))
contacts
.
add
(
'{},{},{}
,{}
'
.
format
(
registration_authority
,
domain
,
mail
,
orgname
))
for
contact
in
sorted
(
contacts
):
print
(
contact
)
identity_federations_contacts.py
0 → 100755
View file @
4d9a3040
#!/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
()
print
(
'FEDERATION,COUNTRIES,SECURITY CONTACT,FEDERATION CONTACT'
)
for
fed
in
feds_dict
:
if
feds_dict
[
fed
][
'status'
]
==
'6'
:
countries
=
""
security_contact
=
""
if
'security_contact'
in
feds_dict
[
fed
]:
if
'mail'
in
feds_dict
[
fed
][
'security_contact'
]:
security_contact
=
feds_dict
[
fed
][
'security_contact'
][
'mail'
][
'value'
]
if
'countries'
in
feds_dict
[
fed
]:
countries_array
=
feds_dict
[
fed
][
'countries'
]
for
country
in
countries_array
:
countries
=
countries
+
" "
+
country
print
(
f
"
{
fed
}
,
{
countries
.
strip
()
}
,
{
security_contact
}
,
{
feds_dict
[
fed
][
'contact_email'
]
}
"
)
identity_federations_security_contacts.py
View file @
4d9a3040
#!/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.
# 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
...
...
@@ -12,6 +12,8 @@ feds = requests.get('https://technical.edugain.org/api.php?action=list_feds_full
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'
]:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment