Agora

You're viewing the docs for Config 0.x. The latest is 1.x (rc). Go to the 1.x (rc) docs

Console

Entries per app, environment and label — edit, diff any two versions, roll back, audit.

The console lives on the control plane, at the same prefix as the tenant API (/_config). It is the Agora console shell (the shared tokens, fonts and sidebar), violet where the other consoles have their own colour.

config/config.ts
import { authkitDashboardAuthorize } from '@adonis-agora/authkit-client'

defineConfig({
  topology: 'control-plane',
  verifyTenant,
  console: {
    // Omitted: open outside production, every request denied in production.
    authorize: authkitDashboardAuthorize({ role: 'ADMIN' }),
    revealSecrets: true,
    // apps: ['streaming', 'billing'],
  },
})

authorize takes the contract every Agora console uses: an inline function, an authorizer class, or a lazy import. authorizeByToken, anyAuthorize and resolveConsoleAuthorize are exported from @adonis-agora/config for machine access.

What it does

Page
Entriesevery key of the selected app/environment/label, with its value, secret and reloadable flags, who last wrote it and when. Search, filter and paginate.
Editorset a value (JSON or text), a vault:// reference, description and the reason; a secret is encrypted at rest, seal for <app> hands it to the tenant's key so the server cannot read it, a reloadable key applies without a restart.
Historyevery immutable version: who, when, how many entries and secrets, and why.
Diffany two versions, key by key: added, removed, changed, with secret values masked.
Rollbackcopies a past version into a new version (history stays append-only), with the reason recorded.
Auditwho changed what, when, and why — including reveal rows for secrets.

A secret arrives masked in the console. The operator asks for it explicitly (the eye button), which calls POST <api>/entries/:key/reveal and writes a reveal audit row; revealSecrets: false removes the button entirely. An entry sealed for an app says sealed for <app> and has no reveal: the control plane holds only ciphertext, and only that app's private key opens it.

Filters are in the URL: copy the link to share a filtered view. The app/environment/label picked in the topbar (app, env, label), the Entries search and page (q, page), the History page, open version and diff (page, version, from, to) and the Audit action and page (action, page) all live in the hash, so /config#/history?env=staging&from=10&to=12 opens that diff, and back/forward step through your picks.

The JSON API

Same-origin, JSON, and the list envelopes follow the Agora list convention ({ data, meta }).

Route
GET /metaapps, environments, labels, the default scope, whether secrets are configured
GET /entries?app&environment&label&search&page&size&sortentries, filtered and paginated
GET /entries/:keyone entry (secret masked)
PUT /entries/:keyset value/vault/flags/description; a new version
DELETE /entries/:keyunset; a new version
POST /entries/:key/revealthe secret value, audited
GET /versions GET /versions/:versionhistory and one version
GET /diff?from&tothe changes between two versions
POST /rollback{ to, message? }
GET /auditthe trail, filtered by filter[key] / filter[action]
GET /consoles GET /consoles/search?q=the console switcher and ⌘K

An unknown sort or filter[field] is a 400; a masked secret is not an error. CORS is the host app's.

GET /audit and GET /versions also page by cursor. Send first (and after with the previous page's meta.nextCursor) and the answer is { data, meta: { nextCursor, prevCursor, hasNext, hasPrev } }, with no total. A deep page costs what the first one does. The console pages this way; page/size keep the offset envelope and its total.

Shell, switcher and ⌘K

The page embeds the standard Agora data block (viewer, signOut, switcher, search). The console joins the 'agora.consoles' registry as config, so every other Agora console lists "Configuration" and searches entry keys. With authkit-client, sign-out and the viewer row appear with no per-console config; without it, set console.signOut and console.viewer yourself.

Which apps a viewer sees

console.apps limits the console to a set of apps: the pickers list them and an API request for another app is refused with 403.

authorize can narrow that per viewer by answering { allowed: true, apps }, the same grant the telescope and flags consoles take:

authorize: async (ctx) => {
  const user = ctx.auth.user
  if (!user) return { allowed: false, reason: 'unauthenticated' }
  return { allowed: true, apps: user.isAdmin ? '*' : user.managedApps }
},

The viewer sees and changes only those apps, in the pickers, the API, ⌘K and the MCP tools. '*' (or no apps) means every app. console.apps stays the upper bound: a granted app outside it is still refused.

Production

The console is a browser app behind your app's auth. Keep the authorize rule explicit in production: the default denies everything there, and a forgotten rule is a locked door, not an open one.

On this page

Partner

Your product as the official integration for Config, right here.

Become a partner →