Files
mesh-delivery/modules/mesh-grants/module.json
T
jschoubben 9132b6a296
mesh/delivery ready: it is merged on the Approve
mesh/check pass 9132b6a296b9 on bcb5aafdbe80 | unit 51 run, 590 kept | integration 51 run, 666 kept | composition passed in 36ms on novox
mesh-grants: take each user's hash from the vault's bus-accounts and say per user whether one is held, so take-over waits until every user has a credential
ADR 0547 clause 9: the vault writes the hash of each bus account it holds into bus-accounts.<user>. The grants part
watches that state (no timer), carries the hash with each shadow user in memory only, and its user-list tool says per
user whether a hash is held and how its line would differ from the loaded one (same, adds, left out for want of a
credential, loses its login); never the hash, since bcrypt salts make two hashes incomparable. Take-over names the
users with no hash.

Issue: 1945
2026-10-26 02:29:54 +01:00

105 lines
2.0 KiB
JSON

{
"module": "mesh-grants",
"version": "1",
"slug": "grants",
"reads": [
"mesh-config.resolved",
"mesh-controller.assignments",
"mesh-controller.grants",
"mesh-delivery-assigner.wants",
"mesh-delivery-builder.builds",
"mesh-delivery-indexer.manifests",
"mesh-delivery-indexer.modules",
"node-engine.have",
"mesh-vault.bus-accounts"
],
"invokes": [
"nats.nats_streams",
"nats.nats_user_can",
"nats.nats_users"
],
"emits": [
"membership-changed",
"user-list-changed"
],
"tools": [
"grants_grants",
"grants_membership",
"grants_user_list",
"grants_compose_now",
"grants_assert",
"grants_take_over",
"grants_hand_back"
],
"state": [
{
"name": "assertions",
"history": 5
},
{
"name": "memberships",
"history": 5
},
{
"name": "takeover",
"history": 20
},
{
"name": "user-list",
"history": 20
}
],
"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"
]
}
]
}
}