Skip to content

The Authorization Database. High-performance, fine-grained access control at scale.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

inferadb/engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

457 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

InferaDB Logo

InferaDB Authorization Engine

Discord CI Code Coverage License

ReBAC engine with declarative policies, graph evaluation, and sub-millisecond latency

Important

Under active development. Not production-ready.

Inspired by Google Zanzibar. AuthZEN compliant.

Quick Start

git clone https://github.com/inferadb/engine && cd engine
mise trust && mise install
cargo run --bin inferadb-engine

Check a permission:

curl -X POST http://localhost:8080/v1/evaluate \
  -H "Content-Type: application/json" \
  -d '{"evaluations": [{"subject": "user:alice", "resource": "doc:readme", "permission": "viewer"}]}'

Features

Feature Description
Complete API Check, Expand, ListResources, ListSubjects, Watch
Multi-Tenant Data isolation via Organizations and Vaults
Wildcards Model public resources with user:*
Observable Prometheus, OpenTelemetry, structured logs
Storage Memory (dev) or Ledger (prod)
Extensible WASM modules for custom logic

Architecture

graph TD
    Bin[inferadb-engine] --> API[inferadb-engine-api]
    API --> Core[inferadb-engine-core]
    API --> Auth[inferadb-engine-auth]
    Core --> Repo[inferadb-engine-repository]
    Core --> Cache[inferadb-engine-cache]
    Repo --> Store[inferadb-engine-store]
    Store --> Memory[(Memory)]
    Store --> Ledger[(InferaDB Ledger)]
Loading
Crate Purpose
inferadb-engine Binary entrypoint
inferadb-engine-api REST and gRPC endpoints
inferadb-engine-core Permission evaluation, IPL parser
inferadb-engine-auth JWT validation, JWKS, OAuth
inferadb-engine-repository Domain repositories
inferadb-engine-store Storage trait definitions
inferadb-engine-cache Result caching
inferadb-engine-config Configuration and secrets
inferadb-engine-types Shared type definitions
inferadb-engine-const Shared constants
inferadb-engine-observe Metrics, tracing, logging
inferadb-engine-wasm WebAssembly sandbox

Configuration

Configure via config.yaml or environment variables (INFERADB__ENGINE__ prefix):

engine:
  listen:
    http: "127.0.0.1:8080"
    grpc: "127.0.0.1:8081"

  storage: "ledger"  # or "memory" for dev

  ledger:
    endpoint: "http://ledger.inferadb:50051"
    client_id: "engine-prod-001"
    namespace_id: 1

  cache:
    enabled: true
    capacity: 100000
    ttl: 300

Development

just test        # Standard tests
just lint        # Clippy
just fmt         # Format

See just --list for all commands and CONTRIBUTING.md for guidelines.

License

Dual-licensed under MIT or Apache 2.0.

About

The Authorization Database. High-performance, fine-grained access control at scale.

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages