# VIBES (itsavibe.ai) auth.md

How AI agents, CI/CD pipelines, and developer tools connect to **itsavibe.ai** (`https://itsavibe.ai`) to read specifications, verify attestations, and submit signed provenance records.

## Audience

Autonomous coding agents, CI/CD runners, and security tools working with the **VIBES** ecosystem:
- **VIBES** (`https://itsavibe.ai/vibes-agent.md`) — Base AI assurance data substrate (`.ai-audit/`)
- **VERIFY** (`https://itsavibe.ai/verify-agent.md`) — Cryptographic DSSE + in-toto v1 attestation
- **PRISM** (`https://itsavibe.ai/prism-agent.md`) — Provenance & Risk Intelligence Scoring Model
- **EVOLVE** (`https://itsavibe.ai/evolve-agent.md`) — Multi-agent governance & decision records
- **TRACE** (`https://itsavibe.ai/trace-agent.md`) — Agentic incident response & forensic evidence bundles

## Without an account (Public Endpoints)

Reading specifications, machine indexes, registry projects, and verifying attestations requires **no authentication**:

- **Normative Agent Specs (`text/markdown`):**
  - `GET https://itsavibe.ai/agents.md` — Agent entry point & manifest
  - `GET https://itsavibe.ai/vibes-agent.md` — VIBES normative specification
  - `GET https://itsavibe.ai/verify-agent.md` — VERIFY normative specification
  - `GET https://itsavibe.ai/prism-agent.md` — PRISM normative specification
  - `GET https://itsavibe.ai/evolve-agent.md` — EVOLVE normative specification
  - `GET https://itsavibe.ai/trace-agent.md` — TRACE normative specification
  - `GET https://itsavibe.ai/llms.txt` — Token-efficient LLM directory
  - `GET https://itsavibe.ai/llms-full.txt` — Complete concatenated specification corpus
- **Public Pages as Markdown:**
  - Every public documentation page can be requested with `Accept: text/markdown` or by appending `.md` (e.g., `https://itsavibe.ai/home.md`, `https://itsavibe.ai/standards.md`, `https://itsavibe.ai/verify.md`).
- **Public Discovery & API Endpoints (`application/json`):**
  - `GET https://itsavibe.ai/.well-known/api-catalog` — RFC 9727 API catalog (`application/linkset+json`)
  - `GET https://itsavibe.ai/.well-known/agent-skills/index.json` — Agent Skills Discovery v0.2.0 index
  - `GET https://itsavibe.ai/openapi.json` — OpenAPI 3.1.0 description
  - `GET https://itsavibe.ai/index.json` — VIBES specification family index
  - `GET https://itsavibe.ai/api/health` — Liveness check
  - `GET https://itsavibe.ai/api/attestation/list` — Paginated list of accepted public attestations
  - `GET https://itsavibe.ai/api/attestation/stats` — Attestation registry totals
  - `GET https://itsavibe.ai/api/attestation/{id}` — Retrieve a DSSE attestation envelope by SHA-256 ID
  - `GET https://itsavibe.ai/api/attestation/verify/{id}` — Server-side hash & metadata integrity report
  - `GET https://itsavibe.ai/api/attestation/analyze/{id}` — In-toto statement & timestamp analysis
  - `GET https://itsavibe.ai/api/attestation/badge/{id}` — SVG verification badge
  - `GET https://itsavibe.ai/api/projects/list` — Public VIBES-compliant project directory
  - `GET https://itsavibe.ai/api/projects/{slug}` — Project profile and attestation history
  - `GET https://itsavibe.ai/api/projects/{slug}/verify` — Latest verification status for a project
  - `GET https://itsavibe.ai/api/tool-providers/list` — Registered AI tool provider Ed25519 public keys
  - `GET https://itsavibe.ai/api/events/list` — Public transparency log of registry events
  - `GET https://itsavibe.ai/api/content-policy` — Content & envelope validation rules

## How an agent or CI pipeline authenticates

Agents never create user accounts and never handle user passwords or OAuth session cookies. Instead, a project owner signs in at `https://itsavibe.ai/login.html` (via GitHub, Google, Microsoft OAuth, or magic link) and provisions a scoped **API Token** (`vib_<random>`) in their Dashboard (`https://itsavibe.ai/dashboard.html`).

1. **Provisioning (Human Member):**
   - The member creates a project in their Dashboard and generates an API token via `POST /api/user/api-tokens` with explicit scopes and expiration.
   - The raw token (`vib_...`) is displayed once and stored by the 서버 only as a SHA-256 hash.
2. **Using the Token (Agent / CI Runner):**
   - Pass `Authorization: Bearer vib_<token>` on authenticated API requests:
     ```bash
     curl -X POST https://itsavibe.ai/api/attestation/submit \
       -H "Authorization: Bearer $VIBES_API_TOKEN" \
       -H "Content-Type: application/json" \
       -d @attestation-submission.json
     ```
   - When a valid project API token is supplied to `POST /api/attestation/submit` with a matching `metadata.project_slug`, the attestation is automatically linked to the member's project and verified against their registered Ed25519 signing keys.

## Permissions & Scopes

API tokens support the following scopes:
- `attestation:submit`: Submit signed DSSE + in-toto v1 attestation envelopes to `/api/attestation/submit` and link them to the member's projects.
- `project:read`: Read project metadata and attestation status.

## Security Boundaries & Rate Limits

- An API token can **never** delete a user account, modify user profile settings, create/revoke other API tokens, or access `/api/admin/*` endpoints.
- All endpoints enforce strict rate limiting per IP and per token (`429 Too Many Requests` with `Retry-After`).
- `POST /api/attestation/submit` enforces a maximum body size of **1 MB** (`413 Payload Too Large`) and validates base64url DSSE envelopes before storage.
- Members can revoke any API token immediately from `https://itsavibe.ai/dashboard.html`.
