A web console for a Cinc / Chef Infra Server. Browse and edit the objects in your organizations — nodes, roles, environments, data bags, members — from the browser, with the server enforcing each user's real permissions.
cinc-console uses the classic webui-key impersonation model. The console
holds the server's webui_priv.pem. Users log in with their server username and
password; every request the console then makes to the cinc server is signed with
the webui key while carrying the logged-in user's identity
(X-Ops-Userid + X-Ops-Request-Source: web). The server applies that user's
ACLs, so the console never decides permissions — a 403 from the server is what
gates editing in the UI, exactly as it would for knife.
- Single Next.js app. The webui key and all request signing run server-side only; the browser never sees the key or talks to the cinc server directly.
- Stateless sessions. The session is an encrypted cookie holding only the username, so the console scales to N replicas with no Redis or database.
- v1.3 signing. The signing module is a faithful port of the Go
cinc-apiimplementation, pinned by a byte-for-byte conformance test. - Pluggable authentication. Local login checks the password against the
Cinc server's own
/authenticate_userby default; optionally bind against an external directory instead (AUTH_MODE=ldap). Either way, the console still impersonates the same Cinc user object - LDAP only replaces the password check, it never provisions users.
| Objects | Capability |
|---|---|
| Nodes, Roles, Environments, Data bags (+ items), Members & groups | View + create / edit / delete (ACL-gated) |
| Clients | View + create + delete (ACL-gated) |
| Cookbooks, Policies | View + delete a single version/revision or the whole object (ACL-gated) |
| Policy groups | View each group's pinned policy revisions and nodes + remove a policy from a group or delete the group (ACL-gated) |
Editing cookbook or policy content, uploading cookbooks, and pinning or
promoting a policy revision into a group (that stays policy push from a
workstation) remain out of scope for this version. Clients can be created and deleted but not edited (a client's
private key is shown once at creation and is never retrievable again).
| Variable | Required | Description |
|---|---|---|
CINC_SERVER_URL |
yes | Root URL of the Cinc/Chef server, e.g. https://chef.example.com. No /organizations/<org> path: unlike a client's chef_server_url, the console covers every org and builds those paths itself. |
CINC_WEBUI_KEY |
conditional | Inline contents of webui_priv.pem (PEM). Required when CINC_WEBUI_KEY_FILE is not set. |
CINC_WEBUI_KEY_FILE |
conditional | Path to webui_priv.pem. Required when CINC_WEBUI_KEY is not set. |
SESSION_SECRET |
conditional | 32+ char secret used to encrypt the session cookie. Required when SESSION_SECRET_FILE is not set. |
SESSION_SECRET_FILE |
conditional | Path to a file holding the session secret (Docker/Compose secrets, Kubernetes secret volumes). One trailing newline is stripped, so echo secret > file works; the rest must be 32+ chars. Required when SESSION_SECRET is not set; SESSION_SECRET wins if both are set. |
CINC_CA_CERT |
no | Inline CA bundle (PEM) to trust a self-signed server |
CINC_CA_CERT_FILE |
no | Path to a CA bundle (PEM) to trust a self-signed server |
CINC_SSL_NO_VERIFY |
no | true to skip TLS verification (dev only) |
SESSION_TTL_SECONDS |
no | Session lifetime, default 28800 (8h) |
SESSION_COOKIE_SECURE |
no | Secure flag on the session cookie. Unset follows NODE_ENV (on in production); set to false only for a deliberate plain-HTTP deployment |
CHEF_VERSION |
no | API version header sent to the server, default 16.0.0 |
CINC_AUTH_ACTOR |
no | Globally-privileged actor (for example pivotal) used for POST /authenticate_user on servers that require global create permissions |
AUTH_MODE |
no | local (default) or ldap. When ldap, see LDAP_URL/LDAP_BASE_DN/etc. in .env.example for the full set of directory-bind options |
The app validates these at boot and exits with a clear message if a required
value is missing. For local development, copy .env.example to .env.local
and fill in your environment-specific values.
helm install cinc-console ./deploy/helm/cinc-console \
--set cincServerUrl=https://chef.example.com \
--set-file webuiKey=/etc/opscode/webui_priv.pemSESSION_SECRET is generated automatically and preserved across upgrades. See
deploy/helm/cinc-console/values.yaml for all options (ingress, resources,
existingSecret, etc.) and values-example.yaml for a minimal config.
For developer-specific overrides, use a local values file layered last:
cp deploy/helm/cinc-console/values-local.example.yaml \
deploy/helm/cinc-console/values-local.yaml
helm upgrade --install cinc-console deploy/helm/cinc-console \
-f deploy/helm/cinc-console/values-local.yaml \
--set cincServerUrl=https://chef.example.com \
--set-file webuiKey=/etc/opscode/webui_priv.pemvalues-local.yaml is gitignored so you can keep local dev settings (for
example imagePullSecrets or nodeEnv) without changing shared defaults.
For a single host, deploy/compose/ mirrors the chart with Docker Compose:
same hardening, secrets mounted as files, and an optional Caddy service for TLS.
cd deploy/compose
cp cinc-console.env.example cinc-console.env # set CINC_SERVER_URL
# add secrets/webui_priv.pem and secrets/session_secret, see the README there
docker compose up -d # runs the published imageSee deploy/compose/README.md for secrets, TLS, LDAP, building from the checkout, and the differences from the chart.
cinc-server-ng has no
webui_priv.pem to copy. By default it trusts its bootstrap admin (pivotal)
key for webui impersonation, so the console would have to hold the admin key.
Give it a dedicated webui keypair instead. The server only needs the public
half, and the two keys can then be rotated separately:
openssl genrsa -traditional -out webui_priv.pem 2048
openssl rsa -in webui_priv.pem -pubout -out webui_pub.pem
# Server: trust the public key for X-Ops-Request-Source: web
cinc-server-ng --storage sqlite --db /data/cinc.db \
--orgs myorg \
--webui-key webui_pub.pem \
--key-out pivotal.pem--orgsnames the organizations to create. Without it you get one org calledacme.--key-outwrites the bootstrap superuser's (pivotal) private key. The server never returns that key over the API, and you need it for the steps below. On SQLite the key is persisted, so adding--key-outto a later start writes the same key again.
Give the console webui_priv.pem (CINC_WEBUI_KEY_FILE, the Helm chart's
webuiKey, or secrets/webui_priv.pem for Compose) and keep webui_pub.pem
with the server.
A fresh cinc-server-ng has only pivotal, which has a key but no password, so
nobody can log in to the console yet. Sign as pivotal with the
cinc CLI (a profile with
client_name = "pivotal", client_key pointing at pivotal.pem, and
cinc_server_url = "https://<server>/organizations/myorg"), then create a user
with a password and make it an org admin:
cinc user create alice --email alice@example.com --password '...'
cinc org member add alice
cinc group member add admins aliceTo let alice create users from the console (Members → New user), also make
her a server admin. Creating users needs that or the superuser; being an org
admin is not enough, and the form answers forbidden. cinc-server-ng's
equivalent of chef-server-ctl grant-server-admin-permissions is a superuser-only
route, called here with knife raw signed as pivotal:
knife raw -m PUT /_cinc/server_admins/aliceCINC_AUTH_ACTOR is optional here. The console checks passwords with
POST /authenticate_user, which cinc-server-ng answers for the superuser or
for any request signed with the webui key, so the user logging in can sign it.
The Compose and Helm default of pivotal works too.
The console signs every request as the logged-in user, and nobody logs in as
pivotal, so anything that only the superuser may do stays on the command
line:
- creating organizations (
cinc org create) - adding a user to an org directly (the console invites instead; the user accepts on the Organizations page)
- granting or revoking server admin (
/_cinc/server_admins)
Uploading cookbooks and pushing Policyfiles are workstation tasks too
(cinc cookbook upload, cinc policy push); the console views and deletes
them.
Each org has a <org>-validator client, but cinc-server-ng never hands out its
private key. To get one, open Clients → <org>-validator in the console and
regenerate its default key; the new private key is shown once. Alternatively,
bootstrap without a validator, signing with your own user key.
For a local dev loop against cinc-server-ng, see TROUBLESHOOTING.md.
Official images are published to GitHub Container Registry as
ghcr.io/cinc-project/cinc-console via the project's automated build/release
workflows. In most cases, use those images directly.
Build your own image when you need environment-specific behavior, such as:
- private npm registry access during build (
.npmrc+ token auth) - custom code changes or local testing before release
- internal compliance requirements (for example org-specific scanning/signing)
- a specific platform strategy not covered by your current deployment flow
For standard builds with access to the public npm registry:
docker build -t cinc-console:local .If your environment must use a private npm registry, create a local .npmrc
from .npmrc.template and set your registry/token before running docker build.
This repository's Dockerfile reads npm registry settings from .npmrc during
the dependency stage.
For complete build instructions (public vs private registry, token auth, and
cross-platform buildx examples), see BUILD.md.
To cut a release, see RELEASING.md — make release-pr VERSION=0.5.0
opens a PR that bumps every version reference, and merging it tags the release and
publishes the signed multi-arch image.
pnpm install
cp .env.example .env.local # fill in the variables above
pnpm dev # http://localhost:3000
pnpm test # unit tests (vitest)
pnpm build # production build- The webui key is a powerful credential — it can act as any user. Keep it in a
Kubernetes Secret (or
existingSecret), never in the image or client bundle. - Serve the console over TLS; the session cookie is
HttpOnly+Securein production (config-driven viaSESSION_COOKIE_SECURE, never inferred from a request header). - Authorization is always the cinc server's. The console pre-disables some controls as a convenience but never substitutes its own permission decisions.
- Login and logout are CSRF-guarded (reject cross-site requests, require
application/json), every signed request path is built through a branded helper that rejects unsanitized names, and a Content-Security-Policy plus a standard set of security response headers apply to every route.