ADR 0583 §1 (insight 2026-11-01) and §2: the grants part reads the vault's node-logins as its named reader and composes a node user per login, both while the node rotates and the new one alone after rotation-done; each node's engine reads its own node's key alone (composed by mesh-sdk while the vault serves rotate-node). The part follows the state by watch, so a rotation begun or ended composes again at once. A second login is judged its node's when the list is compared (Placed), and a hash changing by a rotation node-logins names is not counted as a writer changing several hashes at once (sealed.go). The state not on the bus yet is a standing gap: every node logs in as node.<n>, as today. Tested as a subtest of TestGrants, no new test function. Built against the group's mesh-sdk head 5000774 through a go.work outside the worktree; the pin is the lead's. (issue 774, 774/S53) Claude-Session: https://claude.ai/code/session_01NcbgfJ9Gum47zkFKWRaovL
166 lines
3.3 KiB
JSON
166 lines
3.3 KiB
JSON
{
|
|
"module": "mesh-grants",
|
|
"version": "1",
|
|
"slug": "grants",
|
|
"claims": [
|
|
{
|
|
"name": "mesh-grants",
|
|
"scope": "mesh",
|
|
"serves": [
|
|
"lease-write",
|
|
"lease-hand-back"
|
|
]
|
|
}
|
|
],
|
|
"reads": [
|
|
"mesh-config.resolved",
|
|
"mesh-delivery-assigner.wants",
|
|
"mesh-delivery-builder.builds",
|
|
"mesh-delivery-indexer.manifests",
|
|
"mesh-delivery-indexer.modules",
|
|
"mesh-delivery-assigner.placement",
|
|
"node-engine.have",
|
|
"mesh-vault.bus-accounts",
|
|
"mesh-controller.lease",
|
|
"mesh-conditions.takeover",
|
|
"mesh-enrolment.enrolments",
|
|
"mesh-vault.node-logins"
|
|
],
|
|
"consumes": [
|
|
"mesh-conditions.condition-raised",
|
|
"mesh-conditions.condition-cleared",
|
|
"mesh-vault.account-issued",
|
|
"nats.bucket-expiry-set"
|
|
],
|
|
"uses": [
|
|
"operator-channel"
|
|
],
|
|
"invokes": [
|
|
"nats.nats_streams",
|
|
"nats.nats_user_can",
|
|
"nats.nats_users",
|
|
"seat:node-engine.root-free",
|
|
"seat:mesh-hand-acts.warranted",
|
|
"seat:node-service-manager.stop",
|
|
"seat:node-service-manager.start",
|
|
"seat:node-service-manager.status",
|
|
"nats.nats_bucket_expiry",
|
|
"nats.nats_consumer_remove",
|
|
"nats.nats_stream_remove",
|
|
"seat:mesh-hand-acts.hand-act",
|
|
"mesh-delivery-view.node_trusts",
|
|
"seat:mesh-config.compare",
|
|
"seat:mesh-wants.upgrade",
|
|
"mesh-vault.vault_status",
|
|
"seat:issue-tracker.get"
|
|
],
|
|
"emits": [
|
|
"asserted",
|
|
"grant-written",
|
|
"hashes-accepted",
|
|
"membership-changed",
|
|
"user-list-changed"
|
|
],
|
|
"tools": [
|
|
"grants_grants",
|
|
"grants_membership",
|
|
"grants_user_list",
|
|
"grants_compose_now",
|
|
"grants_assert",
|
|
"grants_take_over",
|
|
"grants_take_over_state",
|
|
"grants_hand_back",
|
|
"grants_accounts",
|
|
"grants_consumer_match",
|
|
"grants_accept_hashes",
|
|
"grants_lease_check",
|
|
"grants_removal_due"
|
|
],
|
|
"state": [
|
|
{
|
|
"name": "accounts",
|
|
"history": 5
|
|
},
|
|
{
|
|
"name": "assertions",
|
|
"history": 5
|
|
},
|
|
{
|
|
"name": "grants",
|
|
"history": 5
|
|
},
|
|
{
|
|
"name": "lease",
|
|
"key-ttl": true
|
|
},
|
|
{
|
|
"name": "memberships",
|
|
"history": 5
|
|
},
|
|
{
|
|
"name": "takeover",
|
|
"history": 20
|
|
},
|
|
{
|
|
"name": "user-list",
|
|
"history": 20
|
|
},
|
|
{
|
|
"name": "withheld",
|
|
"history": 5
|
|
}
|
|
],
|
|
"own-secrets": {
|
|
"broker": "${dir:state}/broker"
|
|
},
|
|
"secrets-owner": "mesh-grants",
|
|
"resources": [
|
|
{
|
|
"id": "account",
|
|
"type": "user",
|
|
"name": "mesh-grants",
|
|
"shell": "/usr/bin/nologin",
|
|
"home": "/var/lib/mesh-grants"
|
|
},
|
|
{
|
|
"id": "state",
|
|
"type": "directory",
|
|
"mode": "0700",
|
|
"owner": "mesh-grants",
|
|
"place": ".",
|
|
"unknown": "program"
|
|
},
|
|
{
|
|
"id": "grants",
|
|
"type": "process",
|
|
"name": "mesh-grants",
|
|
"artifact": "program",
|
|
"run": [
|
|
"./mesh-grants"
|
|
],
|
|
"env": {
|
|
"MESH_BROKER_FILE": "${dir:state}/broker"
|
|
},
|
|
"user": "mesh-grants",
|
|
"health": {
|
|
"kind": "unit"
|
|
}
|
|
}
|
|
],
|
|
"build": {
|
|
"artifacts": [
|
|
{
|
|
"name": "program",
|
|
"kind": "bundle",
|
|
"language": "go",
|
|
"system": "arch",
|
|
"from": "cmd/mesh-grants",
|
|
"binary": "mesh-grants",
|
|
"loads": [
|
|
"mesh-grants"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|