Review round 1: the day after which a twin is no longer current was a constant here and again in the bus module. It is now the setting twin-current-hours of the manifest (24 by default), written into a file the part reads at its start, the field name the bus module's manifest names too, so the operator sets it once per module alike; the durable-orphaned condition names the bound. hasOwnProcess no longer sits under ownServesOf's doc comment. Builds: design 47 H2 H-A-472 (2) and its third addendum (2); review round 1 findings (2), (3)
246 lines
5.9 KiB
JSON
246 lines
5.9 KiB
JSON
{
|
|
"module": "mesh-grants",
|
|
"version": "0.1",
|
|
"class": "core",
|
|
"slug": "grants",
|
|
"claims": [
|
|
{
|
|
"name": "mesh-grants",
|
|
"scope": "mesh",
|
|
"serves": [
|
|
"grants-for",
|
|
"withheld"
|
|
]
|
|
}
|
|
],
|
|
"reads": [
|
|
"mesh-config.resolved",
|
|
"node-engine.have",
|
|
"mesh-vault.bus-accounts",
|
|
"mesh-enrolment.enrolments",
|
|
"mesh-vault.node-logins"
|
|
],
|
|
"consumes": [
|
|
"mesh-conditions.condition-raised",
|
|
"mesh-conditions.condition-cleared",
|
|
"mesh-conditions.findings-asked",
|
|
"mesh-vault.account-issued",
|
|
"mesh-broker.created",
|
|
"mesh-broker.dropped",
|
|
"mesh-broker.recreated",
|
|
"mesh-recovery.ended",
|
|
"mesh-recovery.expiry-ended",
|
|
"mesh-recovery.point-removed",
|
|
"mesh-delivery-assigner.views.assignments",
|
|
"mesh-delivery-assigner.views.wants",
|
|
"mesh-delivery-indexer.views.manifests",
|
|
"mesh-delivery-indexer.views.modules",
|
|
"mesh-catalog.catalog-revision",
|
|
"mesh-catalog.registration-changed",
|
|
"mesh-catalog.seat-definition-changed",
|
|
"mesh-catalog.seat-definition-removed",
|
|
"mesh-delivery.source-moved",
|
|
"mesh-wants.assignment-revision",
|
|
"node-engine.running.*.*"
|
|
],
|
|
"uses": [
|
|
"operator-channel"
|
|
],
|
|
"invokes": [
|
|
"nats.nats_streams",
|
|
"nats.nats_user_can",
|
|
"nats.nats_users",
|
|
"seat:node-engine.root-free",
|
|
"mesh-delivery-assigner.assignments",
|
|
"mesh-delivery-assigner.wants",
|
|
"mesh-delivery-indexer.manifests",
|
|
"mesh-delivery-indexer.modules",
|
|
"seat:mesh-catalog.entry",
|
|
"seat:mesh-catalog.registrations",
|
|
"seat:mesh-catalog.revision",
|
|
"seat:mesh-catalog.seat-definitions",
|
|
"seat:mesh-delivery.source",
|
|
"seat:mesh-wants.revision",
|
|
"seat:mesh-hand-acts.hand-act",
|
|
"seat:mesh-broker.list",
|
|
"seat:mesh-recovery.kept-points"
|
|
],
|
|
"config": {
|
|
"grants-for-revisions-per-branch": {
|
|
"type": "number",
|
|
"description": "how many catalog revisions of one watched branch the grants part keeps once read for grants-for, a run's candidate counted within its branch's, the oldest dropped first; each some 1.4 MB (design 47 H H-A-195).",
|
|
"minimum": 1,
|
|
"maximum": 32,
|
|
"trusted": false,
|
|
"default": 4
|
|
},
|
|
"twin-current-hours": {
|
|
"type": "number",
|
|
"description": "how many hours since a module's durable's twin last delivered it is current (design 47 H2 H-A-472): the consumer-behind check leaves out a durable with no pulls waiting whose twin has pulls waiting and a delivery within these hours, and names it in durable-orphaned. The bus module's manifest names the same setting for nats_consumer_remove.",
|
|
"minimum": 1,
|
|
"trusted": false,
|
|
"default": 24
|
|
}
|
|
},
|
|
"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_accounts",
|
|
"grants_consumer_match",
|
|
"grants_accept_hashes",
|
|
"grants_first_views",
|
|
"grants_first_view_again",
|
|
"grants_running",
|
|
"grants_waits",
|
|
"grants_release",
|
|
"grants_seat_list",
|
|
"grants_seat_list_again",
|
|
"grants_why_refused",
|
|
"grants_named_purge"
|
|
],
|
|
"state": [
|
|
{
|
|
"name": "accounts",
|
|
"history": 5
|
|
},
|
|
{
|
|
"name": "assertions",
|
|
"history": 5
|
|
},
|
|
{
|
|
"name": "findings",
|
|
"history": 5
|
|
},
|
|
{
|
|
"name": "grants",
|
|
"history": 5
|
|
},
|
|
{
|
|
"name": "memberships",
|
|
"history": 5
|
|
},
|
|
{
|
|
"name": "running",
|
|
"history": 1
|
|
},
|
|
{
|
|
"name": "user-list",
|
|
"history": 20
|
|
},
|
|
{
|
|
"name": "withheld",
|
|
"history": 5
|
|
}
|
|
],
|
|
"streams": [
|
|
{
|
|
"name": "mesh-grants-findings",
|
|
"events": [
|
|
"finding-written.*",
|
|
"finding-cleared.*",
|
|
"findings-stated.*"
|
|
],
|
|
"max-age-days": 7,
|
|
"max-mib": 16
|
|
}
|
|
],
|
|
"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-for-revisions-per-branch",
|
|
"type": "file",
|
|
"path": "${dir:state}/grants-for-revisions-per-branch",
|
|
"owner": "mesh-grants",
|
|
"mode": "0600",
|
|
"content": "${config:grants-for-revisions-per-branch}"
|
|
},
|
|
{
|
|
"id": "twin-current-hours",
|
|
"type": "file",
|
|
"path": "${dir:state}/twin-current-hours",
|
|
"owner": "mesh-grants",
|
|
"mode": "0600",
|
|
"content": "${config:twin-current-hours}"
|
|
},
|
|
{
|
|
"id": "grants",
|
|
"type": "process",
|
|
"name": "mesh-grants",
|
|
"artifact": "program",
|
|
"run": [
|
|
"./mesh-grants"
|
|
],
|
|
"env": {
|
|
"MESH_BROKER_FILE": "${dir:state}/broker",
|
|
"MESH_GRANTS_REVISIONS_PER_BRANCH_FILE": "${dir:state}/grants-for-revisions-per-branch",
|
|
"MESH_GRANTS_TWIN_CURRENT_HOURS_FILE": "${dir:state}/twin-current-hours"
|
|
},
|
|
"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"
|
|
]
|
|
},
|
|
{
|
|
"name": "grantsstate",
|
|
"kind": "package",
|
|
"language": "go",
|
|
"paths": [
|
|
"grantsstate"
|
|
],
|
|
"series": "0.1"
|
|
},
|
|
{
|
|
"name": "busgrants",
|
|
"kind": "package",
|
|
"language": "go",
|
|
"paths": [
|
|
"busgrants"
|
|
],
|
|
"series": "0.1"
|
|
}
|
|
]
|
|
}
|
|
}
|