Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
eduGAIN contacts
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
edugain
eduGAIN contacts
Commits
720fb7e1
Commit
720fb7e1
authored
3 years ago
by
Davide Vaghetti
Browse files
Options
Downloads
Patches
Plain Diff
Added script to retrieve identity federations contacts (both security and standard)
parent
70d01325
Branches
master
No related tags found
1 merge request
!5
Master
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
identity_federations_contacts.py
+28
-0
28 additions, 0 deletions
identity_federations_contacts.py
with
28 additions
and
0 deletions
identity_federations_contacts.py
0 → 100755
+
28
−
0
View file @
720fb7e1
#!/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
'
]
}
"
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment