{"id":31889069,"url":"https://github.com/redpanda-data/unified-identity-toolkit","last_synced_at":"2025-10-13T06:59:32.357Z","repository":{"id":315502596,"uuid":"1058928141","full_name":"redpanda-data/unified-identity-toolkit","owner":"redpanda-data","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-26T23:00:57.000Z","size":201,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-27T01:09:07.204Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/redpanda-data.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-17T18:35:10.000Z","updated_at":"2025-09-26T23:01:01.000Z","dependencies_parsed_at":"2025-09-19T20:55:25.002Z","dependency_job_id":null,"html_url":"https://github.com/redpanda-data/unified-identity-toolkit","commit_stats":null,"previous_names":["redpanda-data/unified-identity-toolkit"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/redpanda-data/unified-identity-toolkit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redpanda-data%2Funified-identity-toolkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redpanda-data%2Funified-identity-toolkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redpanda-data%2Funified-identity-toolkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redpanda-data%2Funified-identity-toolkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/redpanda-data","download_url":"https://codeload.github.com/redpanda-data/unified-identity-toolkit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redpanda-data%2Funified-identity-toolkit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279013996,"owners_count":26085430,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-13T06:59:30.962Z","updated_at":"2025-10-13T06:59:32.350Z","avatar_url":"https://github.com/redpanda-data.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Redpanda Unified Identity Toolkit\n\nA command-line tool to synchronize roles and role bindings from Redpanda Cloud clusters to Redpanda Self-Managed clusters. This tool enables seamless migration of identity and access control settings between cloud and self-managed environments.\n\n## Features\n\n- **Role synchronization**: Sync Admin, Writer, and Reader roles from Redpanda Cloud to Redpanda Self-Managed\n- **Principal migration**: Transfer user and service account assignments\n- **ACL management**: Create and reconcile access control lists (ACLs) automatically\n- **Flexible configuration**: Configure environment variables and command-line flags\n- **Cross-platform**: Available for Linux, macOS, and Windows\n- **Single binary**: No runtime dependencies required\n\n## Prerequisites\n\n- Redpanda Cloud API token with appropriate permissions (see Step 1)\n- Access to target Redpanda Self-Managed cluster\n- Network connectivity to both the Cloud API and the Self-Managed cluster\n\n## Get Started\n\n### Step 1: Get a Valid JWT Token\n\nTo use this toolkit, you need a Redpanda Cloud API token. You can obtain one with a service account's client ID and secret.\n\n#### Create a Service Account\n\n1. Go to the **Service Account** tab of the **Organization IAM** page in the [Redpanda Cloud UI](https://cloud.redpanda.com).\n2. Click **Create service account**.\n3. Enter a name and description, then click **Create**.\n4. Copy and save the **Client ID** and **Client Secret**.\n\n#### Generate an Access Token\n\nRun the following curl command, replacing `\u003cyour-client-id\u003e` and `\u003cyour-client-secret\u003e` with the values from your service account:\n\n```bash\nexport CLOUD_CLIENT_ID=\u003cyour-client-id\u003e\nexport CLOUD_CLIENT_SECRET=\u003cyour-client-secret\u003e\n\nexport REDPANDA_CLOUD_API_TOKEN=$(curl -s --request POST \\\n  --url 'https://auth.prd.cloud.redpanda.com/oauth/token' \\\n  --header 'content-type: application/x-www-form-urlencoded' \\\n  --data grant_type=client_credentials \\\n  --data client_id=\"$CLOUD_CLIENT_ID\" \\\n  --data client_secret=\"$CLOUD_CLIENT_SECRET\" \\\n  --data audience=cloudv2-production.redpanda.cloud | jq -r '.access_token')\n```\n\n**Important Notes**\n\n- **Token lifetime**: Access tokens are valid for 4 hours. You must regenerate them as needed.\n- **Token scope**: The same token works for both Control Plane API calls and Data Plane operations.\n- **Security**: Store your client credentials securely and never commit them to version control.\n\nFor details, see the [Redpanda Cloud authentication documentation](https://docs.redpanda.com/redpanda-cloud/security/cloud-authentication/#authenticate-to-the-cloud-api).\n\n### Step 2: Install the Toolkit\n\n#### Option 1: Pre-compiled Binaries (Recommended)\n\nDownload the appropriate binary for your platform:\n\n- **Linux**: `out/linux/unified-identity-toolkit`\n- **macOS**: `out/macos/unified-identity-toolkit`\n- **Windows**: `out/windows/unified-identity-toolkit.exe`\n\nMake the binary executable (Linux/macOS):\n```bash\nchmod +x out/linux/unified-identity-toolkit\n```\n\n#### Option 2: Node.js (no build)\n\nIf you have Node.js 18+ installed, you can run the tool directly:\n\n```bash\n# Set your Cloud API token\nexport REDPANDA_CLOUD_API_TOKEN=\"your-cloud-api-token\"\n\n# Run the sync command using Node.js\nnode dist/cli.js sync\n```\n\n### Step 3: Run the Sync\n\n#### Interactive Mode (Recommended)\n```bash\n# Set your Cloud API token\nexport REDPANDA_CLOUD_API_TOKEN=\"your-cloud-api-token\"\n\n# Run the sync command (binary)\n./out/linux/unified-identity-toolkit sync\n\n# OR use Node.js\nnode dist/cli.js sync\n```\n\nThe tool guides you through:\n1. Cluster selection (if multiple clusters are available)\n2. Role selection (Admin, Writer, Reader)\n3. ACL permission review and confirmation\n\n#### Automated Mode\n```bash\n# Set environment variables for fully automated sync\nexport REDPANDA_CLOUD_API_TOKEN=\"your-cloud-api-token\"\nexport REDPANDA_CLUSTER_ID=\"cluster-abc123\"\nexport REDPANDA_ROLE_NAME=\"Admin\"\nexport REDPANDA_UPSERT_ACLS=\"true\"\n\n# Run automated sync (binary)\n./out/linux/unified-identity-toolkit sync\n\n# OR use Node.js\nnode dist/cli.js sync\n```\n\n## Configuration Reference\n\n### Environment Variables\n\n| Variable | Required | Description |\n|----------|----------|-------------|\n| `REDPANDA_CLOUD_API_TOKEN` | ✅ | Cloud API authentication token |\n| `REDPANDA_DATAPLANE_TOKEN` | ❌ | Data Plane API token (falls back to cloud token) |\n| `REDPANDA_CLUSTER_ID` | ❌ | Target cluster ID (skips interactive selection) |\n| `REDPANDA_ROLE_NAME` | ❌ | Role to sync: Admin, Writer, or Reader |\n| `REDPANDA_UPSERT_ACLS` | ❌ | Set to `true` to auto-reconcile ACLs without prompts |\n\n### Command-Line Flags\n\n```bash\n# Using binary\n./out/linux/unified-identity-toolkit sync [options]\n\n# Using Node.js\nnode dist/cli.js sync [options]\n\nOptions:\n  --cloud-token \u003ctoken\u003e      Cloud API token\n  --dataplane-token \u003ctoken\u003e  Data Plane API token (optional)\n  --cloud-url \u003curl\u003e          Cloud API URL (default: https://api.redpanda.com)\n  --cluster-id \u003cid\u003e          Target cluster ID\n  --role-name \u003cname\u003e         Role name to sync (Admin, Writer, Reader)\n  --upsert-acls              Always reconcile ACLs without confirmation\n  -h, --help                 Show help information\n```\n\n## Examples\n\n### Sync Admin Role to Specific Cluster\n```bash\n./out/linux/unified-identity-toolkit sync \\\n  --cloud-token \"rp_abc123...\" \\\n  --cluster-id \"cluster-xyz789\" \\\n  --role-name \"Admin\" \\\n  --upsert-acls\n```\n\n### Interactive Sync with Manual Confirmation\n```bash\nexport REDPANDA_CLOUD_API_TOKEN=\"rp_abc123...\"\n\n# Using binary\n./out/linux/unified-identity-toolkit sync\n\n# OR using Node.js\nnode dist/cli.js sync\n```\n\n### Sync to Custom Cloud Environment\n```bash\n./out/linux/unified-identity-toolkit sync \\\n  --cloud-token \"rp_abc123...\" \\\n  --cloud-url \"https://api.custom-cloud.redpanda.com\" \\\n  --role-name \"Writer\"\n```\n\n## Role Types and Permissions\n\n### Admin role\n- Full cluster administration rights\n- All Kafka operations on all resources\n- Schema Registry management\n- Consumer group management\n- Topic and partition administration\n\n### Writer role\n- Produce to topics with `ALLOW` permission\n- Create topics (if auto-creation enabled)\n- Schema Registry write operations\n- Limited consumer group access\n\n### Reader role\n- Consume from topics with `ALLOW` permission\n- Read-only Schema Registry access\n- Consumer group membership\n- Topic metadata read access\n\n## Troubleshooting\n\n### Common Issues\n\n| Error | Cause | Solution |\n|-------|-------|---------|\n| `Cloud API token is required` | Missing authentication | Set `REDPANDA_CLOUD_API_TOKEN` or use `--cloud-token` |\n| `No ready clusters found` | No accessible clusters | Verify token permissions and cluster status |\n| `Failed to create role: permission denied` | Insufficient permissions | Ensure Data Plane token has admin permissions on the target cluster |\n\n\n### Get Help\n\n```bash\n# Show all commands\n./out/linux/unified-identity-toolkit --help\n\n# Show sync options\n./out/linux/unified-identity-toolkit sync --help\n\n# Show environment variables documentation\n./out/linux/unified-identity-toolkit env-help\n\n# Show version\n./out/linux/unified-identity-toolkit version\n```\n\n### Debug Information\n\nThe tool provides detailed console output including:\n- API requests and responses\n- Discovered roles and principals\n- ACL permissions being created\n- Synchronization progress\n\n## Security Best Practices\n\n- **Secure token storage**: Use environment variables, not hardcoded values.\n- **Network security**: Ensure encrypted connections to all endpoints.\n- **Minimal permissions**: Use tokens with only required access levels.\n- **Audit trail**: Review sync operations and log changes.\n\n## Tips\n\n- **Documentation**: Check [Redpanda documentation](https://docs.redpanda.com/) for cluster configuration.\n- **Network**: Verify connectivity to required endpoints.\n- **Permissions**: Ensure API tokens have appropriate cluster access.\n\n## License\n\nThis tool is distributed under the Business Source License (BSL-1.1).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredpanda-data%2Funified-identity-toolkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredpanda-data%2Funified-identity-toolkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredpanda-data%2Funified-identity-toolkit/lists"}