nats: the tools run on the process account nats-tools with its own secret, and take the release sdk, so the bus grants them only the four removals (issue 1952 N1-N3)
This commit is contained in:
@@ -12,7 +12,7 @@ import (
|
||||
|
||||
// LiveBus is the bus as the module's own credential reaches it. Nothing connects until a tool that changes the
|
||||
// bus is called, so the tools that read (through the monitoring endpoint) answer as they did with no credential.
|
||||
// MESH_BROKER_FILE names the credential (the manifest's own secret `broker`); MESH_NATS_SERVER where the bus is as
|
||||
// MESH_BROKER_FILE names the credential (the process nats-tools's own secret `broker-nats-tools`); MESH_NATS_SERVER where the bus is as
|
||||
// seen from this machine (default: its own port on loopback).
|
||||
func LiveBus() Bus {
|
||||
return func(ctx context.Context) (jetstream.JetStream, func(), error) {
|
||||
|
||||
@@ -123,8 +123,8 @@ func TestTheBussManifestMountsItsProgramsIntoTheUpstreamImage(t *testing.T) {
|
||||
}
|
||||
}
|
||||
for _, a := range m.Build.Artifacts {
|
||||
if a.Name == "tools" && a.Env["MESH_BROKER_FILE"] != "${dir:mesh-state}/broker" {
|
||||
t.Errorf("the tools' credential is %q: the module's own secret broker", a.Env["MESH_BROKER_FILE"])
|
||||
if a.Name == "tools" && a.Env["MESH_BROKER_FILE"] != "${dir:mesh-state}/broker-nats-tools" {
|
||||
t.Errorf("the tools' credential is %q: the process nats-tools' own secret broker-nats-tools", a.Env["MESH_BROKER_FILE"])
|
||||
}
|
||||
}
|
||||
args, _ := server["args"].([]any)
|
||||
|
||||
Reference in New Issue
Block a user