@@ -11,14 +11,18 @@ github-ops-app to sync Okta groups with GitHub teams.
1111## Step 1: Create API Services Application
1212
13131 . Log in to your ** Okta Admin Console**
14+
14152 . Navigate to ** Applications** → ** Applications**
16+
15173 . Click ** Create App Integration**
18+
16194 . Select ** API Services** and click ** Next**
1720
1821 > API Services apps use OAuth 2.0 client credentials flow with no user
1922 > context, ideal for server-to-server integrations.
2023
21245 . Enter application name: ` github-ops-app ` (or similar)
25+
22266 . Click ** Save**
2327
2428## Step 2: Configure Client Authentication
@@ -64,12 +68,13 @@ On the **General** tab, find and save:
6468## Step 5: Grant API Scopes
6569
66701 . Go to the ** Okta API Scopes** tab
71+
67722 . Grant the following scopes:
6873
69- | Scope | Purpose |
70- | -------------------- | ------------------------------- |
71- | ` okta.groups.read ` | Read group names and members |
72- | ` okta.users.read ` | Read user profiles |
74+ | Scope | Purpose |
75+ | ------------------ | ---------------------------- |
76+ | ` okta.groups.read ` | Read group names and members |
77+ | ` okta.users.read ` | Read user profiles |
7378
74793 . Click ** Grant** for each scope
7580
@@ -82,22 +87,26 @@ API Services applications require an admin role to access Okta APIs. Without
8287this, API calls will fail with permission errors even if scopes are granted.
8388
84891 . Go to the ** Admin roles** tab for your application
90+
85912 . Click ** Edit assignments**
92+
86933 . Select one of the following roles:
8794
88- | Role | Access Level |
89- | --------------------- | ----------------------------------------------- |
90- | ** Read Only Admin** | Read access to all resources (recommended) |
91- | ** Group Admin** | Full access to groups only |
95+ | Role | Access Level |
96+ | ------------------- | ------------------------------------------ |
97+ | ** Read Only Admin** | Read access to all resources (recommended) |
98+ | ** Group Admin** | Full access to groups only |
9299
931004 . If using ** Group Admin** , optionally restrict to specific groups:
94- - Under ** Edit constraints for Group Administrator** , select specific
95- groups or group types the app can access
101+
102+ - Under ** Edit constraints for Group Administrator** , select specific groups
103+ or group types the app can access
104+
961055 . Click ** Save changes**
97106
98- > ** Note** : Read Only Admin is recommended for sync operations since it
99- > provides sufficient access without write permissions. Group Admin is an
100- > alternative if you need to limit the app's scope to group resources only.
107+ > ** Note** : Read Only Admin is recommended for sync operations since it provides
108+ > sufficient access without write permissions. Group Admin is an alternative if
109+ > you need to limit the app's scope to group resources only.
101110
102111## Step 7: Identify Your Okta Domain
103112
@@ -113,12 +122,12 @@ Use the domain without `https://` prefix for `APP_OKTA_DOMAIN`.
113122The app needs to map Okta users to GitHub usernames. Determine which Okta user
114123profile field contains GitHub usernames:
115124
116- | Common Fields | Description |
117- | -------------------- | ------------------------------------------ |
118- | ` login ` | Okta username (often email) |
119- | ` email ` | User's email address |
120- | ` githubUsername ` | Custom field (recommended) |
121- | ` nickName ` | Sometimes used for GitHub username |
125+ | Common Fields | Description |
126+ | ---------------- | ---------------------------------- |
127+ | ` login ` | Okta username (often email) |
128+ | ` email ` | User's email address |
129+ | ` githubUsername ` | Custom field (recommended) |
130+ | ` nickName ` | Sometimes used for GitHub username |
122131
123132### Adding a Custom GitHub Username Field (Recommended)
124133
@@ -141,13 +150,14 @@ rules:
141150
142151** Example naming conventions:**
143152
144- | Pattern | Example Groups |
145- | ---------------------- | ---------------------------------------------- |
146- | ` github-{team} ` | ` github-engineering ` , ` github-platform ` |
147- | ` gh-eng-{team} ` | ` gh-eng-frontend ` , ` gh-eng-backend ` |
148- | ` Team - {name} ` | ` Team - Platform ` , ` Team - Security ` |
153+ | Pattern | Example Groups |
154+ | --------------- | --------------------------------------- |
155+ | ` github-{team} ` | ` github-engineering ` , ` github-platform ` |
156+ | ` gh-eng-{team} ` | ` gh-eng-frontend ` , ` gh-eng-backend ` |
157+ | ` Team - {name} ` | ` Team - Platform ` , ` Team - Security ` |
149158
150159Groups can be:
160+
151161- Okta groups (manually managed)
152162- Groups synced from Active Directory
153163- Groups from other identity providers
@@ -192,18 +202,18 @@ APP_OKTA_SYNC_RULES='[
192202
193203### Rule Fields
194204
195- | Field | Description |
196- | ------------------------- | ------------------------------------------------------|
197- | ` name ` | Rule identifier (for logging) |
198- | ` enabled ` | Enable/disable rule (default: ` true ` ) |
199- | ` okta_group_pattern ` | Regex to match Okta groups |
200- | ` okta_group_name ` | Exact Okta group name (alternative to pattern) |
201- | ` github_team_prefix ` | Prefix for generated GitHub team names |
202- | ` github_team_name ` | Exact GitHub team name (overrides pattern) |
203- | ` strip_prefix ` | Remove this prefix from Okta group name |
204- | ` sync_members ` | Sync members between Okta and GitHub (default: ` true ` )|
205- | ` create_team_if_missing ` | Auto-create GitHub teams if they don't exist |
206- | ` team_privacy ` | GitHub team visibility: ` secret ` or ` closed ` |
205+ | Field | Description |
206+ | ------------------------ | ------------------------------------------------------ |
207+ | ` name ` | Rule identifier (for logging) |
208+ | ` enabled ` | Enable/disable rule (default: ` true ` ) |
209+ | ` okta_group_pattern ` | Regex to match Okta groups |
210+ | ` okta_group_name ` | Exact Okta group name (alternative to pattern) |
211+ | ` github_team_prefix ` | Prefix for generated GitHub team names |
212+ | ` github_team_name ` | Exact GitHub team name (overrides pattern) |
213+ | ` strip_prefix ` | Remove this prefix from Okta group name |
214+ | ` sync_members ` | Sync members between Okta and GitHub (default: ` true ` ) |
215+ | ` create_team_if_missing ` | Auto-create GitHub teams if they don't exist |
216+ | ` team_privacy ` | GitHub team visibility: ` secret ` or ` closed ` |
207217
208218See the [ main README] ( ../README.md#okta-sync-rules ) for additional examples.
209219
@@ -221,6 +231,7 @@ Test your Okta configuration:
221231```
222232
223233Trigger a sync and verify:
234+
2242351 . POST to ` /scheduled/okta-sync ` endpoint
2252362 . Check logs for groups discovered and teams synced
2262373 . Verify GitHub team memberships match Okta groups
@@ -249,6 +260,7 @@ Trigger a sync and verify:
249260### Rate limiting
250261
251262Okta has API rate limits. If you hit limits:
263+
252264- Reduce sync frequency
253265- The app handles rate limit responses gracefully
254266
0 commit comments