Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,9 @@ add software RAID1 and the hybrid storage layout, while cloud VPS types do
not. Any server can run any declared service or component:

- Infrastructure services (PostgreSQL, Redis and MariaDB today, MariaDB with
manually promoted primary and replica pairs; Elasticsearch and friends as
the catalog grows) stay pinned to declared servers
manually promoted primary and replica pairs, and Kibana on a node of the
Elasticsearch service it reads; Elasticsearch and friends as the catalog
grows) stay pinned to declared servers
- Application components are movable: reassigning `crm-backend` from `h1,h2`
to `h3` is a config change followed by convergence
- Failover is manual with easy reassignment rather than automated
Expand Down Expand Up @@ -301,7 +302,10 @@ and their current status:
- **Catalog breadth** — Elasticsearch, RabbitMQ, and Node runtime services
following the PostgreSQL, Redis and MariaDB pattern: pinned installs,
loopback-only binds, backup policies, audited evidence. MariaDB is built
([spec 019](docs/specs/019-mariadb-service.md)); MySQL and Percona Server
([spec 019](docs/specs/019-mariadb-service.md)), and so is Kibana over an
Elasticsearch service, on loopback at its cluster's version with its saved
objects in the cluster's snapshots
([spec 024](docs/specs/024-kibana-service.md)); MySQL and Percona Server
as a kind of their own are not
- **Multi-server assignment at scale** — components spread across many
servers and moved by editing the config; the model exists, fleet-scale
Expand Down
8 changes: 6 additions & 2 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,12 @@ routine and widen what it can carry, in rough priority order:
loopback-only binds, backup policies, audited evidence (Redis ✔ with RDB
backups, restore checks, and Alloy metrics; MariaDB ✔ with primary and
replica pairs, promotion, dumps that record their GTID position, restore
drills, and metrics ([spec 019](docs/specs/019-mariadb-service.md)); MySQL
and Percona Server as a kind of their own, and the rest, pending)
drills, and metrics ([spec 019](docs/specs/019-mariadb-service.md)); Kibana
✔ over an Elasticsearch service, at its cluster's version, with view and
edit access for declared users, publishing through a Domain, its
dashboards in the cluster's snapshots, and audit
([spec 024](docs/specs/024-kibana-service.md)); MySQL and Percona Server
as a kind of their own, and the rest, pending)
- **Render API import** ✔ — `cloudfall import render-api` maps a live
workspace with real environment values and database-URL rewriting; cron
jobs arrive with their schedules in the gap report, and modeling them as
Expand Down
3 changes: 3 additions & 0 deletions changelog.d/582-kibana-audit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Added

- `cloudfall audit` checks a Kibana service (S-024-13): `kibana.version` (the installed `kibana` package against the Elasticsearch service's declared `version`), `kibana.unit` (`kibana.service` enabled and running), `kibana.configuration` (`/etc/kibana/kibana.yml` against the rendered settings, with a setting the role does not write named without its value, and the heap in `node.options`), `kibana.status` (the overall level of `GET /api/status` is `available`), `kibana.roles` (`cloudfall-kibana-view` and `cloudfall-kibana-edit` as the role writes them), `kibana.users` (each declared user of the Elasticsearch service holds the Kibana role of its `access` and no other; an undeclared user holding one is listed as unmanaged, not drift) and `kibana.keystore` (the three encryption keys, its S-011 secret requirements, by setting name). A Kibana listening off loopback is drift of the existing `services.bind` check. Inspect reads the evidence on the Kibana server as the `cloudfall` account in `no_log` tasks and keeps names and privileges only: no token, key, password or hash reaches the observation. A project without Kibana audits as before. `docs/kibana-service-guide.md` now covers declaring Kibana and its users, an SSH forward, publishing with a Domain and what that exposes, a version change, the licence and the Kibana features that need a paid one, and the audit (#582)
150 changes: 150 additions & 0 deletions config/schemas/v1/observed-server.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -937,6 +937,156 @@
],
"additionalProperties": false
},
"kibana": {
"description": "The Kibana service of the server (S-024): its managed kibana.yml and node.options as text, null when missing; the names of the settings its keystore holds, null when it could not be listed; the overall level Kibana reports; its two roles as Kibana's role API answers them; and the Kibana roles each user of the cluster holds. Names and privileges only: never a token, key, password or hash",
"type": "object",
"properties": {
"service": {
"$ref": "common.schema.json#/$defs/resourceId"
},
"configurationPath": {
"$ref": "common.schema.json#/$defs/absolutePath"
},
"configuration": {
"$ref": "#/$defs/nullableString"
},
"nodeOptions": {
"$ref": "#/$defs/nullableString"
},
"keystore": {
"anyOf": [
{
"type": "array",
"maxItems": 256,
"items": {
"type": "string",
"minLength": 1,
"maxLength": 256
}
},
{
"type": "null"
}
]
},
"status": {
"type": "object",
"properties": {
"read": {
"description": "Whether Kibana was asked: false when the cloudfall account's password is not on the server",
"type": "boolean"
},
"level": {
"description": "status.overall.level of GET /api/status, null when Kibana did not answer",
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 64
},
{
"type": "null"
}
]
}
},
"required": [
"read",
"level"
],
"additionalProperties": false
},
"roles": {
"description": "The two roles the Kibana role keeps, as GET /api/security/role/<name> answers them; null when Kibana's role API was not read",
"anyOf": [
{
"type": "array",
"maxItems": 2,
"items": {
"type": "object",
"properties": {
"name": {
"enum": [
"cloudfall-kibana-view",
"cloudfall-kibana-edit"
]
},
"found": {
"type": "boolean"
},
"elasticsearch": {
"type": [
"object",
"null"
]
},
"kibana": {
"type": [
"array",
"null"
],
"maxItems": 64,
"items": {
"type": "object"
}
},
"metadata": {
"type": [
"object",
"null"
]
}
},
"required": [
"name",
"found",
"elasticsearch",
"kibana",
"metadata"
],
"additionalProperties": false
}
},
{
"type": "null"
}
]
},
"userRoles": {
"description": "Each user of the cluster that is not built in, with the Kibana roles it holds (cloudfall-kibana-view, cloudfall-kibana-edit), possibly none; null when the node was not read",
"anyOf": [
{
"type": "object",
"maxProperties": 4096,
"additionalProperties": {
"type": "array",
"maxItems": 2,
"items": {
"enum": [
"cloudfall-kibana-view",
"cloudfall-kibana-edit"
]
}
}
},
{
"type": "null"
}
]
}
},
"required": [
"service",
"configurationPath",
"configuration",
"nodeOptions",
"keystore",
"status",
"roles",
"userRoles"
],
"additionalProperties": false
},
"mariadbAccounts": {
"description": "The databases and users of each MariaDB service of the server (S-019); the lists are absent when the server could not be read",
"type": "array",
Expand Down
Loading