{"id":47871311,"url":"https://github.com/authsec-ai/authsec-ai","last_synced_at":"2026-04-04T00:52:46.237Z","repository":{"id":345674382,"uuid":"1183941884","full_name":"authsec-ai/authsec-ai","owner":"authsec-ai","description":"Identity layer for Agents and Autonomous AI. With OAuth 2.1, CIBA, SPIFFE workload identity (for agent to agent auth), secret vault and MFA.","archived":false,"fork":false,"pushed_at":"2026-03-24T00:37:25.000Z","size":4062,"stargazers_count":9,"open_issues_count":0,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-04T00:52:40.451Z","etag":null,"topics":["agent-auth","agent-authentication","agents"],"latest_commit_sha":null,"homepage":"https://authsec.ai","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/authsec-ai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2026-03-17T05:05:31.000Z","updated_at":"2026-03-31T06:29:02.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/authsec-ai/authsec-ai","commit_stats":null,"previous_names":["authsec-ai/authsec-ai"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/authsec-ai/authsec-ai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/authsec-ai%2Fauthsec-ai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/authsec-ai%2Fauthsec-ai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/authsec-ai%2Fauthsec-ai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/authsec-ai%2Fauthsec-ai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/authsec-ai","download_url":"https://codeload.github.com/authsec-ai/authsec-ai/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/authsec-ai%2Fauthsec-ai/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31383635,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T23:20:52.058Z","status":"ssl_error","status_checked_at":"2026-04-03T23:20:51.675Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["agent-auth","agent-authentication","agents"],"created_at":"2026-04-04T00:52:45.540Z","updated_at":"2026-04-04T00:52:46.226Z","avatar_url":"https://github.com/authsec-ai.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Agent-first Open Source Identity layer for Agents and Autonomous AI.\n\n[Website](https://authsec.ai) · [Documentation](https://authsec.ai/docs) · [Blog](https://authsec.ai/blogs)\n\nAgent-first Open Source Identity layer for Agents and Autonomous AI.\n\nIt is built for the age of agents and autonomous AI — where agents need to authenticate without browsers, delegate user permissions, talk to each other securely, and plug into MCP servers — while still covering every enterprise IAM need (SSO, RBAC, passkeys, SCIM, and more).\n\n**This repository contains the backend service and deployment scripts.** The UI lives in a separate repository: [authsec-ai/Authsec-ui](https://github.com/authsec-ai/Authsec-ui).\n\n---\n\n\n## Get Started\n\n### Docker Compose (Recommended)\n\nThe fastest way to run the full AuthSec stack locally or on a server.\n\n**Prerequisites:** Docker Engine 24.0+, Docker Compose v2.20+, 4 GB RAM\n\n```bash\ngit clone https://github.com/authsec-ai/authsec-ai.git\ncd authsec-ai/scripts\nbash setup.sh\n```\n\nOpen **\u003chttp://localhost\u003e** once the script finishes.\n\n#### What does `setup.sh` install?\n\nThe script brings up a complete, production-ready stack:\n\n| Service | What it does |\n| --- | --- |\n| **AuthSec backend** | Go binary — auth flows, RBAC, OIDC, SCIM, CIBA, SPIFFE, MCP, migration |\n| **[AuthSec UI](https://github.com/authsec-ai/Authsec-ui)** | React 19 admin and end-user portal (separate repo, image pulled automatically) |\n| **Ory Hydra** | Standards-compliant OAuth 2.0 / OIDC / SAML server |\n| **PostgreSQL** | Master database + dynamic per-tenant databases |\n| **Redis** | Session cache and rate limiting |\n| **HashiCorp Vault** | Secrets storage for OIDC provider credentials |\n| **Nginx** | Reverse proxy with optional TLS termination |\n\nThe script automatically:\n\n1. Checks that Docker and Compose are installed\n2. Asks for your deployment type and admin credentials\n3. Generates all secrets (JWT keys, encryption keys, Hydra system/cookie secrets)\n4. Writes a `.env` file\n5. Pulls images and starts all services\n6. Runs the master database migration\n7. Creates your first admin account\n\nFor manual setup, custom domains, TLS, and production hardening — see [scripts/README.md](scripts/README.md).\n\n---\n\n\n## What AuthSec Solves\n\n### 1. Headless Authentication for Agents (Voice / CIBA)\n\nModern AI agents can't open a browser login page. AuthSec supports **CIBA (Client Initiated Backchannel Authentication)** — an OAuth 2.0 extension (RFC 9126) that decouples *where* authentication is initiated from *where* the user approves it.\n\nWith CIBA:\n\n- An agent initiates an auth request on behalf of a user using a channel for example voice\n- The user receives an out-of-band prompt (voice call, push notification, SMS) to approve on a mobile app\n- The agent receives tokens once the user approves — no browser redirect, no UI required\n\nThis powers voice-activated agents or other form of agents which do not need a web browser to operate: a user speaks a command, the agent triggers CIBA, the user confirms by voice, and the agent gets a scoped access token — all without a browser.\n\n\u003e **Resources:** [Documentation](https://authsec.ai/docs) · Demo Video *(coming soon)* · [Blog](https://authsec.ai/blogs)\n\n---\n\n### 2. Agent-to-Agent Authorization (Machine-to-Machine) via SPIFFE\n\nWhen one agent needs to call another service or agent, you need a zero-trust, standards-based way to prove identity without managing static credentials.\n\nAuthSec implements **SPIFFE (Secure Production Identity Framework for Everyone)** — each agent or workload gets a cryptographically verifiable **SVID (SPIFFE Verifiable Identity Document)**. Authorization between agents uses these short-lived, automatically rotated identities.\n\n- No API keys or shared secrets between services\n- Works across clouds: native federation with AWS IAM, Azure AD, and GCP IAM\n- Fine-grained RBAC/ABAC policies on top of workload identity\n\n---\n\n### 3. Autonomous Execution with User Auth Delegation\n\nAgents that act on behalf of users need scoped, time-limited delegated credentials — not the user's full session. AuthSec provides token exchange and delegation flows that let you issue an agent a narrowly scoped JWT derived from the user's authenticated session, so agents can act autonomously without over-privileged access.\n\n---\n\n### 4. MCP Authentication \u0026 Authorization\n\nAuthSec provides built-in authentication and authorization for **Model Context Protocol (MCP)** servers. Agents connecting to MCP tools go through AuthSec to get verified, scoped tokens — ensuring every tool call is authenticated, audited, and permission-checked.\n\n---\n\n### 5. SSO — SAML 2.0 \u0026 OIDC Federation\n\nFull enterprise SSO for your users and workforce:\n\n- **SAML 2.0** identity provider and service provider flows (via Ory Hydra)\n- **OIDC** federation — connect Google, GitHub, Microsoft, Okta, and any standards-compliant IdP\n- **AD / Microsoft Entra ID** sync (LDAP + SCIM 2.0)\n- Multi-tenant: each tenant gets isolated identity databases and configurable IdPs\n\n---\n\n## Run Individual Components instead of a single script\n\nIf you want to develop or run only specific parts of the stack:\n\n**Backend only** (Go 1.25+, PostgreSQL 14+):\n\n```bash\ncd authsec\ncp .env.example .env\n# Edit .env — set DB_* credentials and required secrets\ngo build -o authsec ./cmd/\n./authsec\n# API at http://localhost:7468\n```\n\n**Frontend only** (Node.js \u003e= 20, npm \u003e= 10) — the UI is in a [separate repository](https://github.com/authsec-ai/Authsec-ui):\n\n```bash\ngit clone https://github.com/authsec-ai/Authsec-ui.git\ncd Authsec-ui\nnpm install\nnpm run build\nexport VITE_API_URL=http://localhost:7468\nnode server.js\n# UI at http://localhost:3000\n```\n\nDetailed setup instructions, environment variable references, and API docs:\n\n- [authsec/README.md](authsec/README.md) — Backend\n- [Authsec-ui README](https://github.com/authsec-ai/Authsec-ui#readme) — Frontend (separate repo)\n- [scripts/README.md](scripts/README.md) — Deployment\n- [scripts/TROUBLESHOOTING.md](scripts/TROUBLESHOOTING.md) — Common issues\n\n---\n\n## How Do I\n\n### Enable Voice Auth for an Agent\n\nVoice auth uses the CIBA flow. Once AuthSec is running:\n\n1. Register your agent as an OAuth2 client with `urn:openid:params:grant-type:ciba` grant type enabled\n2. Configure your Twilio credentials in `.env` (`TWILIO_ACCOUNT_SID`, `TWILIO_AUTH_TOKEN`, `TWILIO_FROM_NUMBER`)\n3. The agent calls `POST /authsec/uflow/ciba/initiate` with the user's identifier\n4. AuthSec places a voice call to the user for approval\n5. Poll `POST /oauth2/token` with `grant_type=urn:openid:params:grant-type:ciba` until approved\n6. Use the returned access token for subsequent API calls\n\n\u003e See the [CIBA API reference](authsec/README.md) for full request/response examples.\n\n---\n\n### Set Up Agent-to-Agent (M2M) Auth\n\nAuthSec issues SPIFFE SVIDs to workloads so agents can call each other without static secrets.\n\n1. Enable the SPIRE module — set `ICP_SERVICE_URL` in `.env`\n2. Register each agent/service as a workload entry via `POST /authsec/spire/workloads`\n3. Each workload fetches its SVID from the SPIFFE Workload API\n4. Services validate incoming requests by verifying the SVID against the trust domain\n5. Apply RBAC/ABAC policies on workload identity via `POST /authsec/spire/policies`\n\nFor cloud-native workloads, configure AWS/Azure/GCP federation so cloud-issued identities map to SPIFFE SVIDs automatically.\n\n\u003e See the [SPIRE module docs](authsec/README.md) for workload registration and policy setup.\n\n---\n\n### Configure SSO (SAML 2.0 / OIDC)\n\n1. Open the AuthSec admin UI at `http://localhost`\n2. Navigate to **Identity Providers** → **Add Provider**\n3. Choose SAML 2.0 or OIDC and fill in the provider metadata\n4. For OIDC providers: set `GOOGLE_CLIENT_SECRET`, `GITHUB_CLIENT_SECRET`, or `MICROSOFT_CLIENT_SECRET` in `.env` for social login\n5. For SAML: upload the IdP metadata XML and download the AuthSec SP metadata to register with your IdP\n6. For AD / Entra ID sync: configure LDAP host or SCIM endpoint and set `SYNC_CONFIG_ENCRYPTION_KEY`\n\n\u003e See [authsec/README.md](authsec/README.md) for OIDC config manager and SCIM 2.0 API details.\n\n---\n\n### Enable MCP Authentication\n\n1. Register your MCP server as an OAuth2 client: `POST /authsec/clientms/clients` with appropriate scopes\n2. Set `ICP_SERVICE_URL` in `.env` to point to your MCP coordinator\n3. Use the SDK manager endpoints (`/authsec/sdkmgr/`) to create agent entries and issue scoped tokens\n4. Agents authenticate to MCP via `POST /authsec/sdkmgr/agents/token` and present the JWT to your MCP server\n5. MCP server validates tokens via `GET /authsec/authmgr/token/verify` or the JWKS endpoint at `/.well-known/jwks.json`\n\n\u003e See the [SDK Manager docs](authsec/README.md) for agent registration and token flows.\n\n---\n\n## Community\n\nJoin the conversation, ask questions, and share what you're building:\n\n**Discord** *(invite link coming soon)*\n\n---\n\n## Contributing\n\nWe welcome contributions of all kinds — bug fixes, features, docs, and examples.\n\n1. Fork the relevant repository and create a branch from `main`\n2. For backend changes: fork [authsec-ai/authsec-ai](https://github.com/authsec-ai/authsec-ai) and work in [authsec/](authsec/) — follow existing Go conventions\n3. For frontend changes: fork [authsec-ai/Authsec-ui](https://github.com/authsec-ai/Authsec-ui) — run `npm run lint` and `npm run type-check` before submitting\n4. For deployment changes: work in [scripts/](scripts/)\n5. Add or update tests for your changes\n6. Open a pull request with a clear description of what and why\n\nBug reports and feature requests:\n\n- Backend / deployment: [authsec-ai/authsec-ai Issues](https://github.com/authsec-ai/authsec-ai/issues)\n- Frontend: [authsec-ai/Authsec-ui Issues](https://github.com/authsec-ai/Authsec-ui/issues)\n\n---\n\n## License\n\nAuthSec is licensed under the [Apache 2.0 License](authsec/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fauthsec-ai%2Fauthsec-ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fauthsec-ai%2Fauthsec-ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fauthsec-ai%2Fauthsec-ai/lists"}