SECURITY PLATFORM / ARCHITECTURE & IMPLEMENTATION
SecureOps.
Every decision leaves a trace.
A secure API, a Zero Trust policy gate, and detection analytics. One documented system for enforcing access and investigating what follows.
SECUREOPS / overview
The system, at a glance.
Secure API Service
FastAPI service with JWT auth, audit logs, and admin endpoints.
Zero Trust Policy Gate
Reverse-proxy enforcement with policy decisions and deny logging.
Detection + Analytics
Rule-based detectors and dashboarded security events.
SECUREOPS / architecture
Enforce. Record. Investigate.
TAP A COMPONENT TO INSPECT ITS BOUNDARY
Policy gate
The gate checks identity, context and policy. A deny returns a safe error; an allow forwards the request.
Gate decisions and API audit events → Event store → Detection → Dashboard
Client+
Browser, curl, or portfolio demos sending requests to the gate.
Zero Trust Gate+
Policy evaluation, decision logging, and request proxying.
Secure API Service+
Business endpoints with auth and audit logging.
Event Store (Postgres)+
Audit logs, gate decisions, security events, and alerts.
Detection Engine+
Rules and anomaly checks that emit alerts.
Dashboard UI+
Alerts, metrics, and trends in a mini-SIEM view.
Request and evidence flow
- Request enters the Zero Trust Gate
- Gate evaluates policy -> ALLOW or DENY with reason
- Decision is logged to Postgres
- Allowed requests proxy to Secure API Service
- API writes audit logs to Postgres
- Detection engine scans logs and emits alerts
- Dashboard reads alerts and metrics
Design rationale
- Separation of enforcement, application, and monitoring concerns
- Every component emits structured JSON-style events
- Clear security story for interviews and demos
SECUREOPS / skills
Engineering capabilities
API Security+
- JWT auth flows
- Pydantic validation
- Audit logging
Zero Trust+
- Policy evaluation
- Context-aware decisions
- Proxy patterns
Detection Engineering+
- Rule design
- Anomaly thresholds
- Alert enrichment
Data Modeling+
- Postgres schema
- Event normalization
- Index strategy
Observability+
- Structured logs
- Security events
- Metrics snapshots
Platform Delivery+
- Docker compose
- Service orchestration
- Demo readiness
SECUREOPS / repo-layout
Repository structure
Separate services for enforcement, application logic, detection, and review.
Explore the repository tree+
secureops-suite/
apps/
api-service/
app/
main.py
config.py
db.py
models.py
schemas.py
auth.py
security.py
middleware.py
routes/
auth.py
users.py
items.py
admin.py
utils/
hashing.py
tokens.py
logger.py
alembic/
tests/
Dockerfile
requirements.txt
policy-gate/
app/
main.py
config.py
policy_engine.py
policy_store.py
proxy.py
db.py
models.py
schemas.py
utils/logger.py
tests/
Dockerfile
requirements.txt
detection-engine/
app/
main.py
config.py
db.py
detectors/
brute_force.py
rate_limit_abuse.py
token_abuse.py
endpoint_spike.py
rules.py
models.py
utils/logger.py
Dockerfile
requirements.txt
dashboard/
streamlit_app.py
requirements.txt
Dockerfile
portfolio/
... (optional Next.js site)
infra/
docker-compose.yml
init.sql
shared/
event_schema.md
openapi_samples/
README.mdSECUREOPS / data-model
Queryable evidence
users+
id (uuid)email (unique)password_hashrole (user|admin)created_at
api_audit_logs+
id (uuid)request_idactor_user_id (nullable)endpointmethodstatus_codeipuser_agentlatency_mscreated_at
gate_decisions+
id (uuid)request_idsubject_user_id (nullable)endpointmethodipdecision (allow|deny)reason_codepolicy_id (nullable)created_at
security_events+
id (uuid)source (api|gate|detector)event_typeseverity (low|medium|high)iprequest_id (nullable)details (jsonb)created_at
alerts+
id (uuid)alert_typeseverityentitysummaryevidence (jsonb)status (open|closed)created_at
SECUREOPS / api-service
The secure API
Auth endpoints+
POST /auth/register
POST /auth/login
POST /auth/refresh
POST /auth/logoutCore endpoints+
GET /items
POST /items
GET /items/{id}
PUT /items/{id}
DELETE /items/{id}Admin endpoints+
GET /admin/audit-logs
GET /admin/security-events
GET /admin/alertsSecurity defaults
- Password hashing with bcrypt
- Short-lived JWT access tokens and longer refresh tokens
- Strict Pydantic request validation
- Middleware audit log on every request
- Baseline rate limiting in the API (stronger at gate)
SECUREOPS / zero-trust-gate
An explicit policy boundary
Gate endpoints+
POST /policies
GET /policies
PUT /policies/{id}
DELETE /policies/{id}
GET /decisions- Extract identity (JWT if present)
- Compute request context (endpoint, method, role, IP score)
- Evaluate policy rules
- Log decision to Postgres
- ALLOW -> proxy to API; DENY -> safe error response
Example policies
- Deny DELETE /items/* unless role is admin
- Deny if IP risk_score >= 80
- Require re-auth claim for sensitive endpoints
SECUREOPS / detection-engine
From events to signals
Brute force+
> 10 failed logins in 5 minutes from the same IP
alert_type=bruteforce, severity=high
Token abuse+
Spike in invalid_token events by IP
severity=medium/high
Rate limit abuse+
Repeated 429 responses or gate deny due to rate
severity=medium
Endpoint spike+
Sudden spike on sensitive endpoints
severity=low/medium
SECUREOPS / dashboard
The investigation surface
- Overview metrics (requests, denies, auth failures)
- Alerts table with severity filters
- Top suspicious IPs
- Trend charts (failed logins over time)
Streamlit supports rapid delivery. The dashboard can be replaced without changing the security backend.
SECUREOPS / evidence
Illustrative interface examples
These diagrams are placeholders from the original project, not captured execution evidence. Real service screenshots and measurements are still needed.
SECUREOPS / build
Run the system locally
1. Infra (Postgres)
Spin up the shared database and network.
Show commands+
docker compose -f infra/docker-compose.yml up -d2. Secure API Service (A)
Scaffold and run the FastAPI service.
Show commands+
cd apps/api-service
python -m venv venv
source venv/bin/activate
pip install fastapi uvicorn sqlalchemy psycopg2-binary alembic python-jose passlib[bcrypt] pydantic-settings
pip freeze > requirements.txt
uvicorn app.main:app --reload --port 80013. Zero Trust Gate (C)
Policy store + evaluation + reverse proxy.
Show commands+
cd apps/policy-gate
python -m venv venv
source venv/bin/activate
pip install fastapi uvicorn httpx sqlalchemy psycopg2-binary python-jose pydantic-settings
pip freeze > requirements.txt
uvicorn app.main:app --reload --port 80004. Detection Engine (B-backend)
Rule loop that scans recent events and emits alerts.
Show commands+
cd apps/detection-engine
python -m venv venv
source venv/bin/activate
pip install sqlalchemy psycopg2-binary pydantic-settings
pip freeze > requirements.txt
python app/main.py5. Dashboard (B-frontend)
Streamlit UI for alerts and metrics.
Show commands+
cd apps/dashboard
python -m venv venv
source venv/bin/activate
pip install streamlit sqlalchemy psycopg2-binary pandas matplotlib
pip freeze > requirements.txt
streamlit run streamlit_app.py --server.port 8501SECUREOPS / portfolio
Documentation map
Architecture+
- System diagram and component cards
- Data flow narrative with gate enforcement
- Enterprise-ready separation of concerns
Live Demos+
- API docs via the gate
- Dashboard for detections and metrics
- Policy editor for Zero Trust rules
Security Story+
- Zero Trust evaluates before the API
- All requests are logged with context
- Detectors turn logs into alerts
Evidence+
- Screenshots of alerts
- Example audit log rows
- Sample policy rules
SECUREOPS / metrics
What to measure
Measurement categories documented by the project; no measured values are claimed here.
- Total requests processed
- Number of denies by policy
- Simulated failed logins
- Mean latency added by the gate
- Detections generated
ASK ABOUT THIS PROJECT
Inspect the decisions.
Explore SecureOps Suite through its documented architecture, contribution and limits.