@@ -39,10 +39,11 @@ make build-server
3939# run (or use systemd, Docker, Kubernetes, etc.)
4040./dist/server
4141
42- # server listens on PORT (default: 8080)
42+ # server listens on APP_PORT (default: 8080)
4343# endpoints:
4444# POST /webhooks - GitHub webhook receiver
4545# POST /scheduled/okta-sync - Trigger Okta sync (call via cron)
46+ # POST /scheduled/slack-test - Send test notification to Slack
4647# GET /server/status - Health check
4748# GET /server/config - Config (secrets redacted)
4849```
@@ -64,6 +65,8 @@ instructions including API Gateway and EventBridge configuration.
6465
6566## Configuration
6667
68+ See [ ` .env.example ` ] ( .env.example ) for a complete configuration reference.
69+
6770All configuration values support direct values or AWS SSM parameter references.
6871For sensitive values like secrets and private keys, use SSM parameters with
6972automatic decryption:
@@ -115,15 +118,19 @@ APP_GITHUB_WEBHOOK_SECRET=arn:aws:ssm:us-east-1:123456789012:parameter/github-bo
115118
116119### Optional: Slack
117120
118- | Variable | Description |
119- | --------------------------| ---------------------------------|
120- | ` APP_SLACK_TOKEN ` | Bot token (` xoxb-... ` ) |
121- | ` APP_SLACK_CHANNEL ` | Default channel ID |
121+ | Variable | Description |
122+ | -----------------------------------| ------------------------------------------|
123+ | ` APP_SLACK_TOKEN ` | Bot token (` xoxb-... ` ) |
124+ | ` APP_SLACK_CHANNEL ` | Default channel ID |
125+ | ` APP_SLACK_CHANNEL_PR_BYPASS ` | Channel for PR bypass alerts (optional) |
126+ | ` APP_SLACK_CHANNEL_OKTA_SYNC ` | Channel for sync reports (optional) |
127+ | ` APP_SLACK_CHANNEL_ORPHANED_USERS ` | Channel for orphan alerts (optional) |
122128
123129### Other
124130
125131| Variable | Description |
126132| --------------------------| ------------------------------------------------|
133+ | ` APP_PORT ` | Server port (default: ` 8080 ` ) |
127134| ` APP_DEBUG_ENABLED ` | Verbose logging (default: ` false ` ) |
128135| ` APP_BASE_PATH ` | URL prefix to strip (e.g., ` /api/v1 ` ) |
129136
@@ -153,29 +160,13 @@ Map Okta groups to GitHub teams using JSON rules:
153160]
154161```
155162
156- ** Rule Fields** :
157- - ` name ` - Rule identifier
158- - ` enabled ` - Enable/disable rule
159- - ` okta_group_pattern ` - Regex to match Okta groups
160- - ` okta_group_name ` - Exact Okta group name (alternative to pattern)
161- - ` github_team_prefix ` - Prefix for GitHub team names
162- - ` github_team_name ` - Exact GitHub team name (overrides pattern)
163- - ` strip_prefix ` - Remove this prefix from Okta group name
164- - ` sync_members ` - Sync members between Okta and GitHub
165- - ` create_team_if_missing ` - Auto-create GitHub teams
166- - ` team_privacy ` - ` secret ` or ` closed `
163+ See [ Okta Setup - Sync Rules] ( docs/okta-setup.md#step-10-configure-sync-rules )
164+ for detailed rule field documentation.
167165
168166** Sync Safety Features** :
169- - ** Active users only** : Only syncs users with ` ACTIVE ` status in Okta,
170- automatically excluding suspended or deprovisioned accounts
171- - ** External collaborator protection** : Never removes outside collaborators
172- (non-org members), preserving contractors and partner access
173- - ** Outage protection** : Safety threshold (default 50%) prevents mass removal
174- if Okta/GitHub is experiencing issues. Sync aborts if removal ratio exceeds
175- threshold
176- - ** Orphaned user detection** : Identifies organization members not in any
177- Okta-synced teams and sends Slack notifications. Enabled by default when
178- sync is enabled.
167+ - Only syncs ` ACTIVE ` Okta users; never removes outside collaborators
168+ - Safety threshold (default 50%) aborts sync if too many removals detected
169+ - Orphaned user detection alerts when org members aren't in any synced teams
179170
180171## Integration Setup
181172
@@ -223,44 +214,21 @@ CMD ["/server"]
223214## How It Works
224215
225216```
226- ┌─────────────────────────────────────────────────┐
227- │ github-ops-app │
228- │ │
229- ┌──────────────┐ │ ┌───────────────────────────────────────────┐ │
230- │ GitHub │ webhooks │ │ Webhook Handler │ │
231- │ │───────────────▶ • PR merge events │ │
232- │ • PR merge │ │ │ • Team membership changes │ │
233- │ • Team edit │ │ │ • Signature verification │ │
234- └──────────────┘ │ └─────────────┬─────────────────────────────┘ │
235- │ │ │
236- │ ▼ │
237- │ ┌─────────────────────────────────────────┐ │
238- │ │ PR Compliance Check │ │
239- ┌──────────────┐ │ │ • Branch protection verification │────────┐
240- │ Okta │ │ │ • Required checks validation │ │ │
241- │ │ │ │ • Bypass detection │ │ │
242- │ • Groups │◀──────────────┴─────────────────────────────────────────┘ │ │
243- │ • Users │ │ │ │
244- └──────────────┘ │ ┌─────────────────────────────────────────┐ │ │
245- │ │ │ Okta Sync Engine │ │ │
246- │ │ │ • Match groups via rules │ │ │
247- └─────────────────────────▶ • Create/update GitHub teams │ │ │
248- │ │ • Sync team membership │ │ │
249- │ │ • Orphaned user detection │────────┤
250- │ │ • Safety threshold protection │ │ │
251- ┌──────────────┐ │ └─────────────────────────────────────────┘ │ │
252- │ GitHub │ │ │ │ │
253- │ Teams API │◀─────────────────────────────────────────────────────────────┘ │
254- │ │ │ │ │
255- │ • Teams │ └─────────────────────────────────────────────────┘ │
256- │ • Members │ │
257- └──────────────┘ │
258- ┌──────────────┐ │
259- │ Slack │◀─────────────────────────────────────┘
260- │ │ Notifications
261- │ • Alerts │ • PR violations
262- │ • Reports │ • Sync reports
263- └──────────────┘ • Orphaned users
217+ ┌────────────┐ ┌─────────────────────────────────────┐ ┌────────────┐
218+ │ GitHub │────▶│ github-ops-app │────▶│ Slack │
219+ │ webhooks │ │ │ │ alerts │
220+ └────────────┘ │ ┌───────────────────────────────┐ │ └────────────┘
221+ │ │ PR Compliance Check │ │
222+ ┌────────────┐ │ │ • Verify branch protection │ │ ┌────────────┐
223+ │ Okta │────▶│ │ • Detect bypasses │ │────▶│ GitHub │
224+ │ groups │ │ └───────────────────────────────┘ │ │ Teams API │
225+ └────────────┘ │ │ └────────────┘
226+ │ ┌───────────────────────────────┐ │
227+ │ │ Okta Sync Engine │ │
228+ │ │ • Map groups to teams │ │
229+ │ │ • Sync membership │ │
230+ │ └───────────────────────────────┘ │
231+ └─────────────────────────────────────┘
264232```
265233
266234### Okta Sync Flow
0 commit comments