You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+26-19Lines changed: 26 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,12 +26,19 @@ You need to be an enterprise administrator to use these scripts!
26
26
pip install -r requirements.txt
27
27
```
28
28
29
-
1. Edit the inputs as arguments to the script as follows:
30
-
31
-
- the API endpoint (for GHES, EMU, or data residency) in`--api-url`. For GHEC this is not required.
32
-
- Create a file and save your token there to read it, and call the script with `--token-file` argument, or call the script with the token in`GITHUB_TOKEN`in your environment.
33
-
- Add the enterprise slug to `--enterprise-slug`. This is string URL version of the enterprise identity. It's easily available in the enterprise admin url (for cloud and server), e.g. `https://github.com/enterprises/ENTERPRISE-SLUG-HERE`.
34
-
- For the security manager team script, the list of orgs output by `org-admin-promote.py` in `--unmanaged-orgs` and the name of the security manager team and the team members to add, in `--team-name` and `--team-members`. If you are using GHES 3.15 or below, please use the `--legacy` flag to use the legacy security managers API.
29
+
1. Choose inputs as arguments to the script as follows:
30
+
31
+
- the server URL (for GHES, EMU, or data residency) in`--github-url`
32
+
- For GHEC this is not required.
33
+
- call the script with the correct GitHub PAT
34
+
- place it in`GITHUB_TOKEN`in your environment, or
35
+
- create a file and save your token there to read it, and call the script with the `--token-file` argument
36
+
- use the enterprise slug as the first argument in the promote/demote scripts
37
+
- this is string URL version of the enterprise identity. It's available in the enterprise admin url (for cloud and server), e.g. `https://github.com/enterprises/ENTERPRISE-SLUG-HERE`.
38
+
- for the security manager team script:
39
+
- use the list of orgs output by `org-admin-promote.py` in `--unmanaged-orgs`
40
+
- put the name of the security manager team and the team members to add in `--team-name` and `--team-members`.
41
+
- If you are using GHES 3.15 or below, please use the `--legacy` flag to use the legacy security managers API.
35
42
36
43
1. Run them in the following order:
37
44
@@ -41,31 +48,31 @@ You need to be an enterprise administrator to use these scripts!
41
48
42
49
## Assumptions
43
50
44
-
- The security manager team isn't already an existing team that's using team sync [for enterprise](https://docs.github.com/en/enterprise-cloud@latest/admin/identity-and-access-management/using-saml-for-enterprise-iam/managing-team-synchronization-for-organizations-in-your-enterprise) or [for organizations](https://docs.github.com/en/enterprise-cloud@latest/organizations/organizing-members-into-teams/synchronizing-a-team-with-an-identity-provider-group). You may be able to edit the script a bit to make this work by adding an existing team to all orgs, but I wasn't going to dive deep into the weeds of identity management.
51
+
- The security manager team isn't already an existing team that's using team sync [for enterprise](https://docs.github.com/en/enterprise-cloud@latest/admin/identity-and-access-management/using-saml-for-enterprise-iam/managing-team-synchronization-for-organizations-in-your-enterprise) or [for organizations](https://docs.github.com/en/enterprise-cloud@latest/organizations/organizing-members-into-teams/synchronizing-a-team-with-an-identity-provider-group).
45
52
46
53
## Any extra info?
47
54
48
55
This is what a successful run looks like. Here's the inputs:
49
56
50
57
- The enterprise admin is named `ghe-admin`.
51
-
- The security team is named `spy-stuff` and has two members `luigi` and `hubot`.
58
+
- The security team is named `security-managers` (the default) and has two members `luigi` and `hubot`.
52
59
- The organizations break down as such:
53
60
- `acme` org was already configured correctly.
54
61
- `testorg-00001` needed the team created, with `ghe-admin` removed and `luigi` and `hubot` added.
55
62
- `testorg-00002` was already created
56
63
57
64
```console
58
-
$ ./manage-sec-team.py
59
-
Team spy-stuff updated as a security manager for acme!
60
-
Creating team spy-stuff
61
-
Team spy-stuff updated as a security manager for testorg-00001!
62
-
Removing ghe-admin from spy-stuff
63
-
Adding luigi to spy-stuff
64
-
Adding hubot to spy-stuff
65
-
Creating team spy-stuff
66
-
Team spy-stuff updated as a security manager for testorg-00002!
67
-
Removing ghe-admin from spy-stuff
68
-
Team spy-stuff updated as a security manager for testorg-00003!
65
+
$ ./manage-sec-team.py --sec-team-members luigi hubot
66
+
✓ Team security-managers updated as a security manager for acme
67
+
Creating team security-managers
68
+
✓ Team security-managers updated as a security manager for testorg-00001
69
+
Removing ghe-admin from security-managers
70
+
Adding luigi to security-managers
71
+
Adding hubot to security-managers
72
+
Creating team security-managers
73
+
✓ Team security-managers updated as a security manager for testorg-00002
74
+
Removing ghe-admin from security-managers
75
+
✓ Team security-managers updated as a security manager for testorg-00003
0 commit comments