knacky f569dce30c feat(backend): add local auth + group-based RBAC matching F11 (B0.6)
- Permission enum + GroupName enum + GROUP_PERMISSIONS mapping mirror
  the F11 matrix in code (verifiable against the spec table in tests).
- @require_perm decorator: 401 on anonymous, 403 on missing permission,
  passes through otherwise. Pure-function user_has() for unit-testing.
- AuthUser (Flask-Login wrapper) resolves the permission set from a
  User's groups; load_user is the Flask-Login user_loader.
- bcrypt password hashing helpers (12 rounds by default, configurable).
- SOC opaque token (D-006): secrets.token_urlsafe(32), bcrypt-hashed at
  rest, plain value returned once at creation and never re-displayable.
- Group-based RBAC from day one (D-003) — Keycloak OIDC in v2 maps onto
  the same group model.
2026-05-21 20:33:31 +02:00

Mimic

Internal BAS (Breach & Attack Simulation) platform for the Red Team. Replays TTPs from engagement journals or an internal ATT&CK library against client infrastructure through VPN/relay, in white-glove coordination with the SOC.

Output: a coverage report mapped to MITRE ATT&CK — measurable, reproducible, archived.

Status

ready-with-prereqs — spec frozen on 2026-05-19, 23 review patches integrated. Code start blocked on:

  • PR1 — Mythic API documentation + pinned version (lead RT)
  • PR2 — Internal C2 interface spec + journal export example (internal C2 team)
  • PR3 — RT graphic charter for the PDF report (lead RT)

While PR1/PR2/PR3 are open, sprint 0 focuses on the unblocked skeleton.

Spec

The authoritative spec lives in the RT-SecondBrain vault: Projects/Mimic — Spec.md. Do not duplicate it here.

In-repo documentation:

  • CHANGELOG.md — chronological log of features, decisions, rollbacks.
  • tasks/spec-decisions.md — implementation arbitrations on top of the spec.
  • tasks/todo.md — current sprint backlog.

Stack (frozen)

  • Backend Python 3.12 / Flask / Flask-SocketIO / SQLAlchemy 2 / Pydantic 2 / Alembic / WeasyPrint / pytest + testcontainers / ruff / mypy strict
  • Frontend TypeScript / React 18+ / Vite / Tailwind 4 / TanStack Query 5 / Recharts / Playwright
  • Storage Postgres (prod) / SQLite (unit tests only)
  • Deploy Docker + Ansible

Layout

mimic/
├── backend/    # Flask app, connectors, orchestrator, reporting, CLI
├── frontend/   # Vite + React app
├── docs/       # Architecture notes, ADRs, deployment
└── tasks/      # Sprint backlog, decisions, lessons

Conventions

  • Branches: feature/<scope>, fix/<scope>, docs/<scope>, chore/<scope>. Long-lived: main.
  • Commits: Conventional Commits (feat:, fix:, chore:, docs:, test:, refactor:).
  • PRs: each branch → review (code-reviewer) → team-lead merges. No direct push to main.

Build & run

make targets land at the end of sprint 0. For now the repo is skeleton-only.

Description
No description provided
Readme 565 KiB
Languages
Python 53.4%
TypeScript 39.4%
CSS 4.6%
Dockerfile 1%
Makefile 0.8%
Other 0.8%