-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
Given deploy custom-provider
When nats-server requires jwt and seed
Then provider fails startup with "ERROR Failed to create provider error="nats: Authorization Violation"
Problem:
//provider.go
// Connect to NATS
nc, err = nats.Connect(hostData.LatticeRPCURL)
if err != nil {
return nil, err
}
Solution:
//provider.go
var nc *nats.Conn
// Connect to NATS
if hostData.LatticeRPCUserSeed != "" && hostData.LatticeRPCUserJWT != "" {
opts := nats.UserJWTAndSeed(hostData.LatticeRPCUserJWT, hostData.LatticeRPCUserSeed)
logger.Debug("connecting to lattice through", "url", hostData.LatticeRPCURL, "opts", "userJWTAndSeed")
nc, err = nats.Connect(hostData.LatticeRPCURL, opts)
} else {
logger.Debug("connecting to lattice through", "url", hostData.LatticeRPCURL)
nc, err = nats.Connect(hostData.LatticeRPCURL)
}
if err != nil {
return nil, err
}
When: git push --set-upstream origin bug/provider-nats
Then: ERROR: Permission to wasmCloud/go.git denied to Solverj
//Solve Sthor
Metadata
Metadata
Assignees
Labels
No labels