Policy Engine is the authorization brain of the OmniBioAI ecosystem. It evaluates who can do what, on which resource, under what conditions.
It enforces RBAC + ABAC rules across distributed systems like TES, Workbench, Studio, and future HPC services.
The Policy Engine answers a single question:
"Is this user allowed to perform this action on this resource?"
It evaluates:
- Role-Based Access Control (RBAC)
- Attribute-Based Access Control (ABAC)
- Custom business rules
- HPC constraints (GPU / cluster / quota)
- Dataset-level access policies
┌────────────────────┐
│ Auth Service │
│ (Identity) │
└─────────┬──────────┘
│
┌─────────▼──────────┐
│ IAM Client │
│ (Fast cache layer) │
└─────────┬──────────┘
│
┌─────────▼──────────┐
│ Policy Engine │
│ (Decision layer) │
└─────────┬──────────┘
│
┌──────────────────┼──────────────────┐
▼ ▼ ▼
TES Workbench Studio
- Admin, researcher, data scientist roles
- Action-level restrictions
- GPU usage restrictions
- HPC node access control
- Dataset sensitivity rules
- Domain-specific policies
- Bioinformatics dataset protection rules
- Model registry immutability rules
POST /policy/evaluate{
"user_id": "123",
"roles": ["researcher"],
"permissions": [],
"action": "tes.run_workflow",
"resource": "rnaseq_pipeline",
"context": {
"gpu_required": true,
"node": "hpc"
}
}{
"allowed": true,
"reason": "access granted",
"policy_source": "ALL_PASSED"
}cd ~/Desktop/machine/omnibioai-studio
docker compose up -d policy-engineAccess (internal only — not exposed externally):
http://policy-engine:8001 (Docker internal network)
pip install -r requirements.txt
uvicorn app.main:app --host 0.0.0.0 --port 8001 --reloadcurl http://localhost:8001/health
# {"status": "ok"}| Variable | Default | Description |
|---|---|---|
REDIS_URL |
redis://redis:6379 |
Redis for policy cache |
OPA_URL |
— | Optional OPA backend URL |
-
RBAC check
- Validates user roles
-
ABAC check
- Evaluates runtime context (GPU, HPC, etc.)
-
Rule engine
- Applies domain-specific constraints
-
Decision returned
- ALLOW / DENY + reason
This service is used by:
- TES (workflow execution authorization)
- Workbench (dataset access control)
- Studio (pipeline execution control)
- IAM Client (future cached policy decisions)
cd ~/Desktop/machine/omnibioai-policy-engine
pytest tests/ -v --cov=.
# 48 tests passing
# 93% coverage
# Covers: RBAC, ABAC, rule engine, cache, policy service, routes- Stateless API
- Deterministic decisions
- Fast evaluation (<10ms target)
- Extendable rule system
- HPC-aware security model
- Only GPU-enabled users can run ML pipelines
- Human genome datasets require elevated permissions
- Cluster-specific access control
- Prevent deletion of production models
| Feature | Status |
|---|---|
| Redis caching for policy decisions | ✓ Implemented |
| RBAC/ABAC evaluation | ✓ Stable |
| Custom rule engine | ✓ Stable |
| OPA (Open Policy Agent) backend | Planned |
| Policy versioning system | Planned |
| Org-level multi-tenancy | Planned v0.5 |
- FastAPI
- Python 3.11+
- Pydantic models
- Pluggable RBAC/ABAC engine
- Redis caching (implemented)
| Service | Role |
|---|---|
omnibioai-api-gateway |
Calls /policy/evaluate on every request |
omnibioai-auth |
Provides identity (roles/permissions) to policy engine |
omnibioai-hpc-policy-engine |
Handles compute-specific governance |
omnibioai-security-audit |
Receives policy decision audit events |
omnibioai-studio |
Manages policy-engine container lifecycle |
In a distributed bioinformatics + AI system, you need:
- Compute governance
- Data protection
- Reproducibility control
- Multi-user safety
This service ensures every action is explicitly authorized.
The Policy Engine is the decision-making layer of OmniBioAI.
If Auth says:
“Who are you?”
Then Policy Engine says:
“What are you allowed to do?”