Repository navigation
arisrv: a guest password, and rcon for one connection with the admin's server.* calls (ID2, ID3) - #1295
Merged
Conversation
transfix
force-pushed
the
feat/arisrv-rcon
branch
from
November 16, 2026 02:56
3e1b626 to
4746c24
Compare
…s server.* calls (ID2, ID3) ID2: --guest-password-file / CVC_ARISRV_GUEST_PASSWORD takes any text a person can type. A client presents guest_password_bearer(password), a SHA-256 hash that fits the room token's slot, and the relay expects it there, so the transports' check before admission does the work. A relay takes a room token or a guest password, not both. Clients take it from CVC_ARIADNE_GUEST_PASSWORD, a relay block's password: (env:/file:), or a page's #password=. ID3: --rcon-password-file / CVC_ARISRV_RCON_PASSWORD. (room-call "server.rcon" P) makes the caller's connection an admin until it closes or loses its pid; server.rcon-logout takes it back. Wrong passwords lock an address or a client out after three, for 30 s and then twice as long each time (rcon_guard), and are counted in the record. Without TLS, rcon is taken only from the loopback unless --rcon-plaintext. An admin may call server.clients, server.client, server.kick (state_transport::disconnect_connection), server.ban / server.unban, server.rename and server.limits (ID4's per-client caps, checked and kept). In arisrvx an elevated connection's ctx.principal has the role admin. Link reports say whether a connection is TLS.
…view From the arisrvx session's review, and Joe's answers to both sessions: - client_registry keeps a client's limits as client_limits (programs and guests as optional booleans; steps, time and memory_mb, where 0 is the document's), and limits(pid) returns them as an optional. That is what ServerDocument::set_client_limits (#1296) reads. - concurrency and python are not keys. Programs and guests run one at a time per client, and ID4c adds python. - The doc: - #1290's ledger keys on the principal or the verified device tag, never the client id; - packaged clients keep their names; - #1296's seam as built; - client Python needs a WASI CPython, not W5's Emscripten build; - parts are named by session; - D2 is being confirmed, since Joe answered the two sessions differently.
ctest arisrvx_rcon_admin_role exercises arisrvx with --rcon-password-file and a program whose @export(roles=["admin"]) only an admin may call: - the call is forbidden before server.rcon; - after it, the call answers with "admin" in ctx.principal["roles"]; - it is forbidden again from the same client's next connection. The test opens that connection by closing its own with server.kick, after which the client dials again. Only a build with arisrvx registers it.
transfix
force-pushed
the
feat/arisrv-identity
branch
from
November 16, 2026 06:01
37840b9 to
38a5793
Compare
transfix
force-pushed
the
feat/arisrv-rcon
branch
from
November 16, 2026 06:01
9e88ba8 to
2176953
Compare
…ove the document's caps, up to the ceiling Joe confirmed to the arisrvx session "Yes, up to ceiling", as he had told the identity session. #1296 sets kClientLimitsAboveDocument = true.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These are the next two parts of docs/roadmap/ARISRV_IDENTITY.md: ID2, the guest password, and ID3, rcon and the admin calls. They're stacked on #1293 (ID1), which is stacked on #1283.
ID2: the guest password
arisrv --guest-password-file PATH, orCVC_ARISRV_GUEST_PASSWORD, is any text of 1 to 256 bytes that a person can type. It is never taken from the command line.guest_password_bearer(password)(state_identity.h): 64 hex digits of SHA-256 overcvc-guest-password/1, a NUL and the password.@host.authenticatehook, the hook decides, as it does for the room token.CVC_ARIADNE_GUEST_PASSWORD, for ari and the x hosts with--relay, and for arigl;password: env:NAME | file:PATH, which can't be combined withtoken:;#password=, through its config'sfragment_env.ID3: rcon
--rcon-password-file PATH, orCVC_ARISRV_RCON_PASSWORD, turns rcon on.(room-call "server.rcon" P)makes the caller's connection an admin. It's keyed by the link that holds the pid, so it ends when that connection closes or another link takes the pid over, and each new connection logs in again.server.rcon-logouttakes it back.rcon_guard:--rcon-plaintextis given.forbiddenotherwise. ID is a client id, or a pid:server.clientsandserver.client ID;server.kick ID, through a newstate_transport::disconnect_connection(number)on both transports;server.ban IDandserver.unban ID: a banned client's connections are closed as each pass sees them;server.rename ID NAME;server.limits ID {...}: the per-client caps that ID4a will apply. Keys and types are checked here.ctx.principal["roles"]include"admin"(a copy of the principal), so@export(roles=["admin"])is an admin command too.secure).Tests (Windows, Release)
client_registry_test, now 20 cases:RconGuard.state_identity_test: the guest password and its bearer.ari test:arisrv_guest_password: the password, with spaces in it, lets a client in;arisrv_guest_password_refuses: a wrong password is refused before admission;arisrv_rcon: admin calls are forbidden, a wrong password is counted, the right one elevates, then records, rename, limits and logout work.main.cpp(withCVC_ARIADNE_PYTHONon) and arigl'smain.cppwere syntax-checked (/Zs) against this tree with other local trees' compile commands, because the local build has neither Python nor arigl.After review (rebased on #1293's 37840b9, then 4746c24)
client_limits, in the shape arisrvx: each client's limits for its programs and guests (ID4a), and arisrv reserved from publish: #1296'sset_client_limitsreads:programsandguestsare optional booleans;steps,timeandmemory_mbuse 0 for the document's value;limits(pid)returnsstd::optional.concurrencyandpythonare gone. Programs and guests run one at a time per client by design, and ID4c addspython.set_client_limitscallback goes intomain.cpponce arisrvx: each client's limits for its programs and guests (ID4a), and arisrv reserved from publish: #1296 and this PR are both on master.ariadne.limits.action_max_*, and arisrvx: each client's limits for its programs and guests (ID4a), and arisrv reserved from publish: #1296 setskClientLimitsAboveDocument = true.arisrv_identity*,arisrv_guest_password*andarisrv_rcon;main.cpp/Zscheck.rcon's admin role in arisrvx (9e88ba8)
arisrvx_rcon_admin_roleruns arisrvx with--rcon-password-fileand a program whose@export(roles=["admin"])only an admin may call. It checks three things:server.rcon;admininctx.principal["roles"];server.kick, the--relayjoin redials, andwhoami's admin is false.The arisrvx session ran this commit in a Windows Release build with Python 3.12, pycvc and wasmtime 45. All 161 tests matching arisrv|pycvc_ariadne|RoomRelay|RoomCall|RoomIntrinsics|RoomWriteGate|StateIdentity|ClientRegistry|ServerDocument|ServerBlock|WasmClientGuest|ScriptLane|ScriptEngine pass,
arisrvx_rcon_admin_roleamong them.