Provision and provider users take the provisioner's client; mesh-vault writes its findings through the conditions client (K-4..K-20, K-21 part; ADR 0634 §4; issue 1966)

This commit is contained in:
2026-11-05 14:26:48 +01:00
parent 7c617bb085
commit e8f93d5db0
45 changed files with 264 additions and 244 deletions
@@ -8,7 +8,7 @@ package main
import (
"context"
"errors"
"git.novox.be/novox/mesh-sdk/go/provider/harness"
"git.novox.be/novox/mesh-contracts/provisioning/go/clients/meshprovisionerclient/provider/harness"
"strings"
"testing"
"time"
@@ -13,9 +13,9 @@ import (
"testing"
"time"
"git.novox.be/novox/mesh-sdk/go/provider"
"git.novox.be/novox/mesh-sdk/go/provider/harness"
"git.novox.be/novox/mesh-sdk/go/provisions"
"git.novox.be/novox/mesh-contracts/provisioning/go/clients/meshprovisionerclient"
"git.novox.be/novox/mesh-contracts/provisioning/go/clients/meshprovisionerclient/provider"
"git.novox.be/novox/mesh-contracts/provisioning/go/clients/meshprovisionerclient/provider/harness"
)
// grantGives writes a grant file (MESH_RECEIVES) naming consumers the plans do not move (issue 937): each one's
@@ -49,22 +49,22 @@ func noOpPlan(bus *bucketBus, node, module string) {
// keycloak on novox the key the seat composes, asked (novox/hq ADR 0570 clauses 1 to 3).
func seatPlan(bus *bucketBus, node, module string, plan map[string]any) {
raw, _ := json.Marshal(map[string]any{"v": 1, "node": node, "module": module, "plan": plan})
_ = bus.Put(ctx, provisions.PlansBucket, node+"."+module, raw)
_ = bus.Put(ctx, meshprovisionerclient.PlansBucket, node+"."+module, raw)
list, _ := plan["provisions"].([]any)
for _, e := range list {
entry := e.(map[string]any)
name, _ := entry["provision"].(string)
local, _ := entry["local"].(string)
key, err := provisions.Key(node, module, name, local)
key, err := meshprovisionerclient.Key(node, module, name, local)
if err != nil {
panic(err)
}
asked, err := provisions.Encode(provisions.Provision{Provision: name, Local: local, State: provisions.Asked,
Consumer: provisions.End{Node: node, Module: module}, Provider: provisions.End{Node: "novox", Module: "keycloak"}})
asked, err := meshprovisionerclient.Encode(meshprovisionerclient.Provision{Provision: name, Local: local, State: meshprovisionerclient.Asked,
Consumer: meshprovisionerclient.End{Node: node, Module: module}, Provider: meshprovisionerclient.End{Node: "novox", Module: "keycloak"}})
if err != nil {
panic(err)
}
_ = bus.Put(ctx, provisions.ProvisionsBucket, key, asked)
_ = bus.Put(ctx, meshprovisionerclient.ProvisionsBucket, key, asked)
}
}
@@ -8,7 +8,7 @@ package main
import (
"context"
"git.novox.be/novox/mesh-sdk/go/provider/harness"
"git.novox.be/novox/mesh-contracts/provisioning/go/clients/meshprovisionerclient/provider/harness"
"os"
"time"
@@ -9,8 +9,8 @@ package main
// retirement to the harness's guards (the SDK's harness retirement): the client is disabled and marked to delete, never removed.
import (
"git.novox.be/novox/mesh-sdk/go/provider"
"git.novox.be/novox/mesh-sdk/go/provider/harness"
"git.novox.be/novox/mesh-contracts/provisioning/go/clients/meshprovisionerclient/provider"
"git.novox.be/novox/mesh-contracts/provisioning/go/clients/meshprovisionerclient/provider/harness"
)
// ProvisionName is what keycloak provides, as its manifest says.
@@ -10,8 +10,8 @@ import (
"testing"
"time"
"git.novox.be/novox/mesh-sdk/go/provider"
"git.novox.be/novox/mesh-sdk/go/provider/harness"
"git.novox.be/novox/mesh-contracts/provisioning/go/clients/meshprovisionerclient/provider"
"git.novox.be/novox/mesh-contracts/provisioning/go/clients/meshprovisionerclient/provider/harness"
)
const testIssuer = "https://id.example.org/realms/Novox"
@@ -35,7 +35,7 @@ import (
"strings"
"time"
"git.novox.be/novox/mesh-sdk/go/provider/harness"
"git.novox.be/novox/mesh-contracts/provisioning/go/clients/meshprovisionerclient/provider/harness"
)
// Mark is the attribute marking a client as the mesh's own work.
@@ -7,7 +7,7 @@ package main
import (
"encoding/json"
"git.novox.be/novox/mesh-sdk/go/provider/harness"
"git.novox.be/novox/mesh-contracts/provisioning/go/clients/meshprovisionerclient/provider/harness"
"reflect"
"strings"
"testing"
@@ -16,7 +16,7 @@ import (
"context"
"errors"
"fmt"
"git.novox.be/novox/mesh-sdk/go/provider/harness"
"git.novox.be/novox/mesh-contracts/provisioning/go/clients/meshprovisionerclient/provider/harness"
"os"
"time"
)