Closed primetheus closed 4 years ago
short-term fix for this could be to wrap the script...
#!/usr/bin/env python
script_dir = os.path.dirname(os.path.realpath(__file__))
settings_file = "{}/settings.ini".format(script_dir)
DATAFILE = "mapping.csv"
# Format the mapping file like this
#<org>,<team>,<ldap-group>
try:
with open(DATAFILE) as datafile:
for line in datafile:
[ org, team, group ] = line.split(",")
try:
syncstr = "--sync --org {} --team {} --group {}".format(org, team, group)
print("Syncing ORG: {}, TEAM: {}, LDAP_GROUP: {}".format(org, team, group)
os.system("{}/SAMLTeamSyncAD.py {}".format(script_dir, syncstr))
except:
raise
except:
raise
print "Sync completed!!"
@primetheus Thanks for the wrapper script, but it is little bit pain to maintain the csv files every time, In real-time GHE-Team and Ldap groups should be the same name always
If we are using GitHub enterprise service account user(API token) which will have access to all the organizations, so, in this case, get the teams from each org and search that team in LDAP, if we found the GHE-Team in LDAP groups then we have to sync, if not then leave it and continue to the next team, it should be done for all ORGS.
Thanks Pragnya
@kumar0608 thanks for this context! So, if I’m understanding this correctly, the functionality you’d like to see is:
Is that accurate? I think that is pretty feasible and should be simple to implement. Then the additional flags can serve as overrides or additions.
yes exactly.
@kumar0608 #33 is ready for testing, if you'd like to try it out. The README of that branch has been updated with instructions
Hi Jared
I got little confused with usage
Could you please help me
On Wednesday, July 1, 2020, Jared Murrell notifications@github.com wrote:
Closed #3 https://github.com/github/saml-ldap-team-sync/issues/3 via #33 https://github.com/github/saml-ldap-team-sync/pull/33.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/github/saml-ldap-team-sync/issues/3#event-3504737998, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEMZET7UFNMS3QZ6IQEPJELRZPHIXANCNFSM4GDJKKLA .
Hi Jarad, i need some help on the version2, few questions regarding readme file and usage
Thanks Sridhar
On Wed, Jul 1, 2020 at 5:31 PM Pragnya Ravula ravula06@gmail.com wrote:
Hi Jared
I got little confused with usage
Could you please help me
On Wednesday, July 1, 2020, Jared Murrell notifications@github.com wrote:
Closed #3 https://github.com/github/saml-ldap-team-sync/issues/3 via
33 https://github.com/github/saml-ldap-team-sync/pull/33.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/github/saml-ldap-team-sync/issues/3#event-3504737998, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEMZET7UFNMS3QZ6IQEPJELRZPHIXANCNFSM4GDJKKLA .
Hi Jarad,
am getting initial setup errors,
/usr/local/bin/python3
/Users/sravula/Downloads/saml-ldap-team-sync-2.0/app.py
Traceback (most recent call last):
File "/Users/sravula/Downloads/saml-ldap-team-sync-2.0/app.py", line 11,
in
Process finished with exit code 1
can you guide me
On Wed, Jul 1, 2020 at 10:47 PM Pragnya Ravula ravula06@gmail.com wrote:
Hi Jarad, i need some help on the version2, few questions regarding readme file and usage
Thanks Sridhar
On Wed, Jul 1, 2020 at 5:31 PM Pragnya Ravula ravula06@gmail.com wrote:
Hi Jared
I got little confused with usage
Could you please help me
On Wednesday, July 1, 2020, Jared Murrell notifications@github.com wrote:
Closed #3 https://github.com/github/saml-ldap-team-sync/issues/3 via
33 https://github.com/github/saml-ldap-team-sync/pull/33.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/github/saml-ldap-team-sync/issues/3#event-3504737998, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEMZET7UFNMS3QZ6IQEPJELRZPHIXANCNFSM4GDJKKLA .
At present, this script requires each team and group to be sync'ed separately. This means creating a wrapper to run
python SAMLTeamSyncAD.py -g <ad_group> -t <gh_team> -o <gh_org> -s
repeatedly to sync multiple teams. You can accomplish this with a wrapper script, but it would be ideal if this script could handle the mapping of multiples at once, fed via YAML