Version 5.7.0 What portal is

Overview

portal is one Rust program for a lab or a small organisation. It opens sessions for people and protects the web services behind Traefik. It gives keys to programs and AI agents, answers AuthZEN questions, and sends alerts to Android phones. It is the backend, the edge and the decision point of ProcurAuth.

Architecture of portal: Traefik, port 4181, port 4182, the services and the database
Architecture of portal: Traefik, port 4181, port 4182, the services and the database

What portal does

portal has one binary, one configuration file and one database. It does these functions:

FunctionWhat it doesPage
LauncherIt lists the services of a lab. A service declares itself by label (Docker Compose) or by annotation (Kubernetes IngressRoute).Launcher
GateIt is a Traefik ForwardAuth server. It protects each service with the session of a person.Grants and the gate
AccountsOne superadmin comes from the configuration. The superadmin makes users. A user gets permissions from the settings pages or from the configuration.Authentication and sessions
KeysA user makes keys. A key lets a program act for its owner, with limits. A key has one of two kinds: mcp_ or api_.Keys and limits
Decision pointportal gives an identity token to the services. It is also an AuthZEN PDP for them.Identity tokens and the PDP
Historyportal keeps a record of each session and of the services that it opened.Settings pages and history
InboxThe Inbox sends alerts to Android phones. It makes sure that each phone shows each alert one time. It also carries the questions and the approvals of AI agents. The Android app has the name Portal Inbox.Inbox

Each part except the launcher, the gate and the accounts is optional. A file with no block keys and no block inbox runs the portal as a panel of services only. See Settings pages and history for the switches.

The idea behind portal

A person opens a session once. Traefik asks portal about each request to a protected service. portal answers from memory, so the check is fast. A program that acts for a person gets a key. A key never has more rights than the person who owns it. When the person loses a right, the key loses it at the next decision.

A service does not know the users or the keys. It receives a short identity token from the edge. It asks the decision point one AuthZEN question, and it applies the answer. The answer can hold limits, such as a number of rows or a budget of requests for each minute. The ProcurAuth protocol defines these rules. portal is one implementation of them.

The Inbox is a feature of the portal. A sender posts an alert with an api_ key. A sender is a script, Grafana or Alertmanager, for example. portal stores the alert and sends it to each phone that follows the group. An AI agent can ask the owner of its key to approve an action. The owner answers on the phone or on a web page.

How it is built

  • The runtime image is FROM scratch. It holds one static binary. The HTTP stack is Hyper 1.x on Tokio.
  • Pages are rendered in Rust. The scripts are the theme selector, the script of the settings pages and the script of the notifications. There is no JavaScript framework, no CDN and no runtime shell. Nothing is fetched from the internet at run time.
  • The data lives in one database. By default it is one SQLite file. The SQLite library is bundled in the binary. To run several active instances, use a shared PostgreSQL database. There is no Redis. See Several instances.
  • The project code has no unsafe Rust.
  • The configuration is one strict HCL file. See Configuration.

Where to go next

You want toRead
Run portal on your machineGetting started
Understand the ports and the flowsArchitecture
Put portal behind TraefikTraefik and TLS
Set every optionConfiguration
Run it in productionOperations and Security model and hardening
Send alerts to a phoneInbox
Know the limitsLimitations

Source of this page: docs/overview.md.