innerwall command line
The control-plane binary, innerwall, serves the agent gateway and the operator surface, and carries the command line that administers the same database. Every authoring and fleet command calls the same domain functions the operator surface's handlers call, so the two transports admit and write exactly the same things (ADR-0007, ADR-0021).
Conventions
- Flags go before or after positional arguments.
innerwall flows list --since 1h <workload-id>andinnerwall flows list <workload-id> --since 1hare the same command; this reference writes flags first.--ends the flags, and everything after it is positional. A positional argument beyond those the command takes ends its flags too, and the command refuses it with its usage line.ruleset updatehas the one asymmetry: with-fbefore the ruleset, nothing may follow the ruleset, because earlier versions ignored what did (ruleset). Flags take one dash or two (-sinceand--sinceare the same flag). - The database. Every command except
ca init,ca issue-server, andversionopens Postgres.--database-urlnames it; without the flag,INNERWALL_DATABASE_URLdoes. A command with neither is refused:no database configured: set --database-url or INNERWALL_DATABASE_URL. - Direct writes. Authoring commands write Postgres directly and render there; the running control plane learns of the change through the database and pushes it to connected agents (ADR-0018). The command needs no running control plane, and none needs to be restarted.
- Help.
innerwall <command> <subcommand> -hprints a command's flags.innerwallwith no arguments prints the command list. - Identifiers. Workloads are named by their id (the UUID in their identity). Services, address groups, and rulesets are named by id or by name.
| Environment variable | Read by | Stands for |
|---|---|---|
INNERWALL_DATABASE_URL | every command that opens the database | --database-url |
INNERWALL_CA_DIR | serve, ca init, ca issue-server | --ca-dir |
INNERWALL_SITE | serve | --site |
INNERWALL_GATEWAY_ADVERTISE_ADDRESS | serve | --gateway-advertise-address |
serve
innerwall serve [flags]Runs the agent gateway (enrollment, renewal, the sync stream, flow reports) and the operator surface (the REST/JSON façade and the embedded console, TLS only). Both listeners run in one process; replicas are stateless and share everything through Postgres (ADR-0017).
--listenDefault:8443- address for the agent gateway (gRPC over TLS)
--operator-listenDefault:8080- address for the operator surface (REST/JSON façade and console, TLS only)
--operator-tls-cert- operator listener certificate PEM (with
--operator-tls-key; default: a self-signed certificate persisted in<ca-dir>) --operator-tls-key- operator listener key PEM (with
--operator-tls-cert) --ca-dirDefault/var/lib/innerwall/ca- directory holding the signing authority (see
innerwall ca init) --init-ca- create the signing authority and server certificate if the CA directory holds none (development convenience)
--tls-hostsDefaultlocalhost,127.0.0.1- hosts for the server certificate generated by
--init-caand for a generated operator certificate --tls-certDefault<ca-dir>/server.crt- server certificate PEM
--tls-keyDefault<ca-dir>/server.key- server key PEM
--gateway-advertise-address- host:port agents reach the agent gateway at, shown in the console's enroll command; unset leaves the console's placeholder
--site- site label the console header shows
--leaf-ttlDefault24h- lifetime of issued workload credentials
--renewal-graceDefault72h- how long after its expiry a workload credential may still renew, and do nothing else; beyond it the workload re-enrolls
--flow-retentionDefault720h- age beyond which stored flow windows are deleted; totals are kept
--flow-retention-intervalDefault1h- period between flow retention runs
--migrate- apply pending database migrations before serving
--database-url- Postgres connection string
--tls-hosts takes effect only when a certificate is generated: the server certificate when --init-ca creates the authority, and the operator certificate when none is persisted or the persisted one has expired. A certificate that already exists is kept as it is, whatever the flag says now (multi-host evaluation). To change the hosts the server certificate names afterwards, issue a new one with ca issue-server and restart.
On SIGINT or SIGTERM, serve stops accepting connections and gives open agent calls and operator requests ten seconds to end. Sync streams do not end on their own, so it then ends them and waits up to five seconds more for their handlers to record each workload offline, and only then closes its database connections: allow the process at least fifteen seconds to stop before it is killed. A second signal changes nothing.
migrate
innerwall migrate [--database-url URL]Applies pending database migrations. serve --migrate does the same before serving.
ca init
innerwall ca init [flags]Creates the file-backed signing authority and issues the agent gateway's server certificate from it, so agents verify the control plane with the same bundle that verifies their own credentials. It refuses a directory that already holds an authority. A deployment with several replicas creates the authority once and provisions the same directory on every replica (ADR-0017).
--ca-dirDefault/var/lib/innerwall/ca- directory to create the authority in
--hostsDefaultlocalhost,127.0.0.1- comma-separated DNS names and IPs for the server certificate
--root-ttlDefault87600h- lifetime of the root certificate
--server-ttlDefault8760h- lifetime of the server certificate
ca issue-server
innerwall ca issue-server --hosts HOSTS [flags]Issues a new server certificate for the agent gateway from the signing authority already in --ca-dir, for the hosts --hosts names, and puts it in place of server.crt and server.key there. It is how a control plane whose certificate names the wrong hosts comes to name the right ones without starting over. The new certificate chains to the same root, so every enrolled agent keeps trusting the gateway: the root, its key, and the bundle agents hold (ca.crt) are untouched, and no agent is enrolled again.
- It refuses a directory that holds no authority, and never creates one:
ca initdoes that. - The certificate names exactly
--hosts. It replaces the old one, so list every name and address agents dial, including the ones the old certificate named that are still in use. - The pair is replaced whole. Both files are written in full beside the old ones and only then renamed into place; an issue that fails leaves the previous certificate and key as they were.
- A restart presents it. A running control plane keeps the certificate it loaded at start; restart it to present the new one. Agents reconnect by themselves with backoff.
- It touches nothing else. The operator listener's certificate is not reissued, and a control plane started with
--tls-certand--tls-keynaming another pair keeps reading that pair.
A deployment with several replicas distributes the new server.crt and server.key with the rest of the authority directory to every replica and restarts each (ADR-0017).
--ca-dirDefault/var/lib/innerwall/ca- directory holding the signing authority to issue from
--hosts- comma-separated DNS names and IPs for the server certificate (required)
--ttlDefault8760h- lifetime of the server certificate
With Docker Compose, run it in the control plane's container and restart the container:
docker compose exec innerwall /innerwall ca issue-server --hosts localhost,127.0.0.1,innerwall,cp.example.internal,192.0.2.10
docker compose restart innerwalltoken
Provisioning tokens: what an agent presents, once, to enroll. A token is scoped to labels, expires, can be revoked, and is stored only as a digest (ADR-0016).
innerwall token mint [--name NAME] [--label key=value ...] [--ttl 720h]
innerwall token list
innerwall token revoke <token-id>mintprints the token once, on standard output, with its id, expiry, and labels on standard error. Every workload the token enrolls is assigned its labels; they are admitted against the label grammar (ADR-0022).listprints each token's id, prefix, name, state (valid,revoked,expired, orinvalid), expiry, use count, and labels.revokerevokes a token by id; enrollment refuses it from then on. Workloads it already enrolled are not affected.
--name- operator-facing name for the token
--label- label assigned to every workload the token enrolls, key=value (repeatable)
--ttlDefault720h- token lifetime
operator
The one operator's password and the operator tokens automation uses (ADR-0021).
innerwall operator set-password [--name NAME]
innerwall operator token mint [--name NAME] [--ttl DURATION]
innerwall operator token list
innerwall operator token revoke <token-id>set-passwordsets the operator password. It prompts twice without echo on a terminal, or reads one line from standard input when it is a pipe. A password shorter than 12 characters is refused.--namesets the display name the console shows; an empty one clears it. The command line on the host is the only place the password can be set: no endpoint sets or resets it.token mintprints an operator token once; only its digest is stored. Present it asAuthorization: Bearer <token>. Without--ttl(or with--ttl 0) the token does not expire.token listprints each token's id, prefix, name, state, expiry, and when it was last used.token revokerevokes one by id.
service
Reusable protocol and port sets, named by rules.
innerwall service create --name NAME --entry SPEC [--entry SPEC ...]
innerwall service update [--name NEW-NAME] [--entry SPEC ...] <id|name>
innerwall service delete <id|name>
innerwall service get <id|name>
innerwall service list--name- service name
--entry- protocol and ports, e.g.
tcp:5432ortcp:6000-6010,7000oricmp; a slash reads as the colon does (tcp/5432); a protocol alone (tcp) is every port, and a separator must be followed by ports (repeatable; replaces all entries on update)
update writes against the version it reads first, so a service changed meanwhile is refused. A --name renames it; with no --entry its entries stay as they are.
address-group
Named sets of CIDRs, usable as rule peers.
innerwall address-group create --name NAME --cidr CIDR [--cidr CIDR ...]
innerwall address-group update [--name NEW-NAME] [--cidr CIDR ...] <id|name>
innerwall address-group delete <id|name>
innerwall address-group get <id|name>
innerwall address-group list--name- address group name
--cidr- member CIDR (repeatable; replaces all members on update)
update writes against the version it reads first. A --name renames the group; with no --cidr its members stay as they are.
ruleset
Rulesets as JSON documents, the same document form the operator surface accepts.
innerwall ruleset create -f FILE
innerwall ruleset update -f FILE <id|name>
innerwall ruleset delete <id|name>
innerwall ruleset get <id|name>
innerwall ruleset list-f - reads the document from standard input. update reads flags on either side of the ruleset (innerwall ruleset update <id|name> -f FILE --database-url URL) unless -f comes before it: then the ruleset must be the last argument, and anything after it is refused with the arguments named, since earlier versions accepted such a command and ignored them. A second ruleset is refused. update named on the command line is written against the version it reads first, so a ruleset changed meanwhile is refused; a document that carries its own id and no name argument is written unconditionally. Every write is admitted in full (every finding reported in one pass) and renders before it returns.
{
"name": "db-inbound",
"description": "who may reach the databases",
"scope": {"role": ["db"]},
"rules": [
{
"direction": "inbound",
"peers": [{"workloads": {"role": ["api"]}}, {"address_group": "corp"}, {"cidr": "10.20.0.0/16"}],
"services": ["postgres"],
"entries": [{"protocol": "tcp", "ports": ["9187"]}]
}
]
}| Field | Holds |
|---|---|
name, description, enabled | The ruleset's name, description, and enabled switch (enabled when omitted). |
scope | The destination: a selector, key to the values it admits. Keys are ANDed, a key's values ORed. |
rules[].direction | inbound, the only direction admitted (ADR-0010). |
rules[].peers | Each peer is exactly one of workloads (a selector), address_group (a name or id), or cidr. |
rules[].services, rules[].entries | Named services (name or id), inline entries (protocol and ports, where no ports means every port), or both. |
rules[].enabled, rules[].description | The rule's own switch and description. |
workload
innerwall workload list
innerwall workload counts
innerwall workload status <workload-id>
innerwall workload set-labels --label key=value [--label key=value ...] <workload-id>
innerwall workload set-mode <workload-id> visibility|simulation|enforced
innerwall workload resend-snapshot <workload-id>
innerwall workload retire <workload-id>listprints every workload's id, hostname, labels, mode, sync state (withENFORCEMENT REMOVEDwhen its owned table is recorded absent, andRETIREDwith the instant in place of the sync state for a retired workload), applied and latest policy versions, and when it was last seen.countsprints the active fleet's size:removed, then each sync state, then the total, thenretired. A removed workload is counted inremovedalone, so the lines above the total sum to it; a retired workload is outside the total and counted inretiredalone. It is the readGET /api/v1/workloads/countsserves.statusprints one workload in full: mode, lifecycle (active, or retired and when), sync state, the owned table's state, applied and latest versions, last seen on the control channel, last flow report, last snapshot sent, last acknowledgment, last failed apply, credential expiry and any late renewal, agent version, dropped flow records, source overruns, clock skew, addresses, host facts, and listening services.set-labelsreplaces the workload's whole label set and renders. The labels are admitted against the grammar (ADR-0022).set-modechanges one workload's mode, as a recorded mode change of exactly that workload, and renders. A change to enforced is not checked against any evidence and asks for no acknowledgment, as its usage and help say: the simulation review in the console is where the evidence is weighed, and the review's verdict and its acknowledgment gate are the console's, on its promote flow and on its mode changes to enforced (promotion and enforcement).resend-snapshotdirects the workload's agent to reconnect, so its new stream begins with a snapshot. Delivery is not confirmed: thelast snapshotinstant inworkload statusadvances when the agent has reconnected (states).retireretires the workload, one way, through the functionPOST /api/v1/workloads/{id}/retirecalls: its credential is refused from then on, its live stream is ended, its addresses leave every peer set, and an open silence of its agent is stored as an evidence gap. It prints the instant, how many workloads' policy versions advanced, and the silence it closed, if any. A retired workload's labels and mode can no longer be changed. Its history stays readable by its id; the host returns only by enrolling again, as a new workload (states). Until the old credential expires, enrollment on the host refuses to overwrite it: stop the daemon and remove the agent's state directory first (credential lifecycle).
policy
innerwall policy render
innerwall policy show <workload-id>renderforces a render of every workload and prints which changed and to what version. Every write already renders; this is for recovery after a render failed, and for inspection.showprints a workload's persisted rendered policy as JSON: its version, mode, and rules with their resolved peers and provenance.
flows
Stored flow windows, evidence gaps, and totals, read through the same queries as the operator surface (ADR-0019).
innerwall flows list [--since 24h] [--until T] [--decision D] [--limit 200] <workload-id>
innerwall flows rollup [--label key=value ...] [--decision D] [--since 24h] [--until T] [--group-by G ...]
innerwall flows totals [--decision D] <workload-id>
innerwall flows gaps [--label key=value ...] [--workload ID] [--since 24h] [--until T] [--limit 500]listprints one workload's windows, newest first: window, peer, source, service, decision, rule, connections, and bytes.rollupwithout--group-byaggregates by peer and service over the workloads the labels select (every workload when none is given). With--group-byit is the operator surface's grouped rollup, with the same groupings, ordering, and limit.totalsprints a workload's totals since first seen; these outlive flow retention.gapsprints the evidence gaps that intersect the range, newest first (gap kinds).
--sinceDefault24h- start of the range: a duration before now or an RFC 3339 time
--untilDefaultnow- end of the range: a duration before now or an RFC 3339 time
--decisionDefaultall- only this decision:
observed,allowed,would_block, orblocked(list,rollup,totals) --label- label key=value selecting the workloads in scope (repeatable, ANDed; none selects every workload) (
rollup,gaps) --limitDefault200;500forgapslist: maximum rows, newest window first;rollup --group-by: the most groups shown, the rest counted in the totals;gaps: the most gaps shown--group-by- the operator surface's grouped rollup instead of the peer-and-service one:
rule,rule,peer,src,dst,dst,service, orpeer,service --endpointDefaultdst- with
--group-by: which end of a flow the scope selects:dst(the flows its workloads received) oreither(also the flows they sent) --orderDefaultconnections- with
--group-by:connectionsorrecent --service- with
--group-by: only this service,<protocol>/<port>oricmp --workloadrollup --group-by: only this workload's flows;gaps: only this workload's gaps
version
innerwall versionPrints the build's version (versioning). The dev command exists only in builds made with the dev build tag, for development; release builds do not carry it.