Chronos Gateway 0.3.0
The image can start its engine again; MySQL and MariaDB; Undo a merged run
- The image can start its engine again. In the 0.2.11 image the engine (
/usr/local/bin/chronos) had mode 0700 and belonged to root, while the image runs as user 65532: the gateway started, and thenPOST /v1/connectansweredrunning /usr/local/bin/chronos attach: Permission denied (os error 13). The image now sets both programs to 0755 whatever the build machine's files had, and the release build fails if either is anything else. The installer's binaries were never affected. - MySQL and MariaDB.
POST /v1/connect/checkandPOST /v1/connecttake amysql://ormariadb://URL (MySQL 8.0 or later, MariaDB 10.5 or later), and runs then work as beside Postgres: a world per run holding one tenant's rows, the rules, approvals, and a write to the database in one transaction with every row locked and compared. Agents write the same SQL (the engine's, Postgres's dialect) whatever the database. Not yet beside MySQL: binary columns,act_as, andGATEWAY_FOLLOW. The check says each of these per table or as a warning. The console's connect step takes either URL. - Undo a merged run.
POST /v1/runs/:id/undoputs back every row the run wrote, as it was before, through the database as any merge goes: each row locked and compared, one transaction.preview: truesays what would go back, in words, and which rows changed since;skip_changed: trueleaves those and undoes the rest. A run becomesundoneorpartly_undone, andmerge.undoneormerge.undo_conflictis sent. A run keeps its merges' ids (merges). Beside Postgres, MySQL and MariaDB, for 30 days after the merge, with engine 0.5.0 or later. The preview names the tables the database would change besides the run's own (a cascade; Postgres only) and the effects that aren't undone, and an undo that would cascade needsallow_cascade. The console's run page has an Undo button: always the preview first, then one button. Not yet: an Undo button in Slack. - Runs add rows to AUTO_INCREMENT tables beside MySQL and MariaDB, with engine 0.4.12 or later: the row has a provisional id (negative) in the run, and MySQL's own once merged. The check's
insertsis false only where the column is narrower than INT or is BIGINT UNSIGNED. Generated columns are attached (listed asgenerated), and a column with an expression default (DEFAULT CURRENT_TIMESTAMP) is no longer refused as one. - A run's reads are checked against MySQL and MariaDB, with engine 0.4.11 or later: a row a run read that changed in the database since holds its merge, as beside Postgres. The gateway asks the engine whether it can; with an older engine the default rules leave
check_readsoff, andPUT /v1/policyrefuses to turn it on. - MongoDB.
POST /v1/connect/checkandPOST /v1/connecttake amongodb://URL (MongoDB 5.0 or later, a replica set), with an engine built with MongoDB (0.5.0 or later). A collection is attached as a table of_id, the fields named infields(the tenant's among them), and the rest of each document. Runs work as beside Postgres: a world per run holding one tenant's documents, the rules, approvals, undo, and a write to MongoDB in one transaction with every document compared, only the changed fields sent. A run has MongoDB's own tools over MCP andPOST /v1/runs/:id/mongo(find,count,insert,update_one,update_many,delete_one,delete_many), each run as SQL in its world, and SQL as before. Changes read by field path. Not yet beside MongoDB:$regex,aggregate, date ranges in filters, array elements changed one by one, masks on a field that isn't a column, sharded clusters,act_as,GATEWAY_FOLLOW. The console's connect step takes the URL. - MongoDB's tools, fixed before any release: an update or delete with no
filteris refused (it matched every document); two updates of one document at once no longer undo each other; a sort by several fields is an array, which keeps its order;{"_id": 1}projects only_id; a string_idof 24 hex digits stays a string on insert;mongodb+srv://URLs connect (the driver lacked DNS seed-list support). - Several databases behind one gateway.
POST /v1/connect {name, ...}connects one more database beside the first, each with its own engine, tenant column, rules, labels and masks. A run names its database (source), and requests name theirs withX-Chronos-Sourceor?source=; without one they mean the first, so nothing changes for a gateway with one database.GET /v1/sourceslists them, events saysource, and the console has a picker. The start-up settings, the model reviewer and Chronos Cloud's link are the first database's only. - High availability. With
GATEWAY_STORE_URLthe gateway keeps its store in a Postgres, and several gateways sharing it and one data folder take turns leading: the leader runs the engines, the others send their requests to it, and when it is lost another leads within about 15 seconds.GATEWAY_NODE_URLsays how they reach each other. The Helm chart hasha.enabled. Seedocs/high-availability.mdfor what it needs and its limits. Without the setting nothing changes: SQLite, one gateway. - A run whose world was lost when the engine stopped hard (unmerged work isn't kept through a crash) now says so: 409
world_lost, the runfailed,run.failedsent. Before, its calls answered the engine's own 404. - Extension points (
src/ext.rs): a binary can build more into the gateway at fixed points (an approval about to merge, webhook formats, endpoints, the leader's work). The open gateway has none built in; its command line is nowcli::run, which such a binary starts with its own. An approval an extension holds for more people answerswaiting, and the console and the widget say so. - Sign-in can be built in beside OpenID Connect's (
src/ext.rs:sign_in,login,person): the gateway then has sign-in withoutGATEWAY_OIDC_ISSUER, with who may approve and who is an admin fromGATEWAY_SSO_ALLOWandGATEWAY_SSO_ADMINS(theGATEWAY_OIDC_names still work). An extension may say who a person is to a directory, asked at each request, so access taken away there ends at once. Nothing changes for OpenID Connect.