A high-performance Go application for bi-directional synchronization between Google Workspace and Beyond Identity using SCIM protocol.
π Go Implementation Now Primary - The Python version has been moved to
deprecated/
folder. This Go implementation provides better performance, enhanced features, and production-ready capabilities.
β
Bi-directional Sync - GWS β BI provisioning + BI β GWS enrollment status management
β
Complete SCIM Synchronization - Full user and group sync with membership management
β
Enrollment Group Management - Automatic Google group updates based on BI activation status
β
Interactive Setup Wizard - Guided configuration with validation
β
Server Mode - HTTP API with automatic scheduling
β
Comprehensive Validation - Connectivity testing and error reporting
β
Production Ready - Health checks, metrics, and monitoring
β
Single Binary - No dependencies, easy deployment
# Build the application
go build -o scim-sync ./cmd
# Run interactive setup wizard
./scim-sync setup wizard
# Validate your setup
./scim-sync setup validate
# Run your first sync
./scim-sync run
# Build the application
go build -o scim-sync ./cmd
# Create configuration from example
cp configs/config.example.yaml config.yaml
# Edit config.yaml with your values, then validate
./scim-sync validate-config
# Run synchronization
./scim-sync run
./scim-sync run
- Run one-time synchronization./scim-sync server
- Start server mode with scheduling and HTTP API
./scim-sync setup wizard
- Interactive configuration wizard./scim-sync setup validate
- Validate setup and test connectivity./scim-sync setup docs
- Generate documentation
./scim-sync validate-config
- Validate configuration file./scim-sync version
- Show version information
When running ./scim-sync server
, these endpoints are available:
GET /health
- Health check and statusPOST /sync
- Trigger manual syncGET /metrics
- Sync metrics and statisticsGET /version
- Version information
The application uses a YAML configuration file. See configs/config.example.yaml
for a complete example.
google_workspace:
domain: "your-domain.com"
super_admin_email: "admin@your-domain.com"
service_account_key_path: "./service-account.json"
beyond_identity:
api_token: "your-beyond-identity-api-token"
sync:
groups:
- "group1@your-domain.com"
enrollment_group_email: "byid-enrolled@your-domain.com" # Optional: Auto-managed enrollment group
The Beyond Identity API token should be configured in the config.yaml
file under beyond_identity.api_token
.
The application searches for configuration files in this order:
./config.yaml
./config.yml
~/.config/scim-sync/config.yaml
~/.config/scim-sync/config.yml
The application performs synchronization in both directions:
- Users: Creates/updates user accounts in Beyond Identity
- Groups: Creates groups with configured prefix (e.g.,
GoogleSCIM_Engineering
) - Memberships: Syncs group membership from Google Workspace to Beyond Identity
- Lifecycle: Handles user activation, deactivation, and updates
- Status Monitoring: Checks Beyond Identity user activation status via SCIM API
- Enrollment Group: Automatically manages a Google Workspace group for enrolled users
- Real-time Updates:
- Users who activate in BI β Added to enrollment group
- Users who deactivate in BI β Removed from enrollment group
- Audit Trail: All enrollment changes are logged for compliance
sync:
enrollment_group_email: "byid-enrolled@your-domain.com" # Default: byid-enrolled@{domain}
enrollment_group_name: "BYID Enrolled" # Default: "BYID Enrolled"
The enrollment group is automatically created if it doesn't exist. Users in the configured sync.groups
are monitored for Beyond Identity activation status changes.
β COMPLETE - All phases of the migration from Python to Go have been implemented:
- β CLI framework with Cobra
- β Configuration management with YAML and env vars
- β Google Workspace API client with service account auth
- β Beyond Identity SCIM API client with full CRUD operations
- β Complete sync engine ported from Python
- β Comprehensive error handling and retry logic
- β HTTP API server with health checks
- β Automatic sync scheduling with cron expressions
- β Metrics collection and exposure
- β Manual sync triggers via API
- β Interactive configuration wizard
- β Setup validation with connectivity testing
- β Automatic documentation generation
- β Enhanced error reporting and guidance
scim-sync/
βββ cmd/ # CLI entry point and commands
βββ internal/
β βββ config/ # Configuration management and validation
β βββ gws/ # Google Workspace API client
β βββ bi/ # Beyond Identity SCIM API client
β βββ sync/ # Synchronization engine
β βββ server/ # HTTP server and scheduling
β βββ wizard/ # Interactive setup wizard
β βββ setup/ # Setup validation and docs generation
β βββ logger/ # Structured logging
βββ configs/ # Example configurations
βββ docs/ # Generated documentation
βββ deprecated/ # Legacy Python implementation
Complete documentation is available in the docs/
directory:
- Setup Guide - Comprehensive setup instructions with prerequisites
- API Reference - Complete HTTP API documentation for server mode
- Troubleshooting - Common issues and solutions
Generate fresh documentation anytime with:
./scim-sync setup docs
The Python implementation has been moved to deprecated/
folder. See deprecated/README.md
for migration instructions.
Migration benefits:
- β‘ 10x faster startup time
- π¦ Single binary deployment (no Python dependencies)
- π οΈ Enhanced features (wizard, server mode, validation)
- π Built-in monitoring (health checks, metrics)
- π Production ready (scheduling, error handling)
This project follows Go standard practices and uses:
github.com/spf13/cobra
- CLI frameworkgoogle.golang.org/api
- Google Workspace APIsgithub.com/robfig/cron/v3
- Schedulinggithub.com/sirupsen/logrus
- Structured logging
This project is licensed under the MIT License - see the LICENSE file for details.
Copyright (c) 2024 Beyond Identity