Skip to content

feat: add HTTP bearer authentication - #48

Merged
shivros merged 1 commit into
mainfrom
runner/COD-429-http-api-auth
Sep 7, 2026
Merged

feat: add HTTP bearer authentication#48
shivros merged 1 commit into
mainfrom
runner/COD-429-http-api-auth

Conversation

@shivros

@shivros shivros commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • protect every HTTP endpoint except GET /health with optional static IRIS_API_TOKEN bearer authentication
  • reject public/wildcard binds when no token is configured, while permitting deployment-agnostic private address classes
  • document authenticated self-hosting and the unauthenticated safety boundary

Verification

  • cargo build --all-targets
  • cargo test --all-targets
  • cargo clippy --all-targets -- -D warnings
  • cargo fmt --all -- --check
  • cargo run -p iris-codegen --bin iris-codegen -- check

Agent acceptance

curl -H "Authorization: Bearer ${IRIS_API_TOKEN}" http://127.0.0.1:9876/providers

@shivros

shivros commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Automated Review Panel

Reviewer A — gpt-5.6-terra

APPROVE. No release-blocking issues: middleware covers all registered routes except exact /health; malformed/missing/wrong bearer values return 401; fixed-size SHA-256 digest comparison avoids early exit. No-token binding is restricted to numeric loopback/private/CGNAT/ULA ranges with a warning.

Reviewer B — Gemini 3 Flash

APPROVE. Confirmed global route coverage, 401 behavior, token comparison, and deployment-agnostic non-public binding policy. No Tailscale-specific behavior introduced.

@shivros
shivros marked this pull request as ready for review September 6, 2026 19:53
@shivros

shivros commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

Auto-Merge Gate

Verdict: MERGE (squash) — confidence 0.90

Rationale: PR implements COD-429 exactly: optional static IRIS_API_TOKEN bearer auth via Axum middleware covering every route except exact /health (missing/malformed/wrong → 401), constant-time SHA-256 digest comparison, blank-token hardening, and refusal of public/wildcard binds (loopback/RFC1918/CGNAT/ULA allowed) with a loud startup warning when unset. README documents the threat model. Both review-panel reviewers (GPT-5.6 Terra, Gemini 3 Flash) APPROVE with no unresolved findings.

Checks observed (all green): Test, Format Check, Clippy, Secret Scan, Dependency Audit, Creed context drift.

Independent local verification (disposable clone, TechGodHQ/iris @ 759bda9): cargo build --all-targets ✓ · cargo test --all-targets ✓ (all suites ok) · cargo clippy --all-targets -- -D warnings ✓ · cargo fmt --all -- --check ✓.

Scope limits: Auth feature addition per linked ticket; no secrets exposed, rotated, or deleted; no production cutover in this merge (published images follow release tags). Linked Linear COD-429 scanned for manual-review markers — none.

@shivros
shivros merged commit 6afde8e into main Sep 7, 2026
6 checks passed
@shivros
shivros deleted the runner/COD-429-http-api-auth branch September 7, 2026 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant