Agent Mesh
Go a2aa2a-protocolagent-meshagentic-aiinferencemcpmeshmesh-networknetwork-securitynetworking-aip2p-network
fix linter
Antonio Ojea3a2464583a20
diff --git a/cmd/sam-hub/main.go b/cmd/sam-hub/main.goindex 48ca3b03..888eec6a 100644--- a/cmd/sam-hub/main.go+++ b/cmd/sam-hub/main.go@@ -243,37 +243,6 @@ func NewHub(ctx context.Context, policy *api.PolicyConfig, allowLoopback bool) (return hub, nil}-func (h *Hub) verifyBiscuit(biscuitData []byte, remotePeer peer.ID) (*biscuit.Biscuit, error) {- b, err := biscuit.Unmarshal(biscuitData)- if err != nil {- return nil, fmt.Errorf("malformed biscuit: %w", err)- }-- keys := h.KeyRing.GetAllValidPublicKeys()- var lastErr error- for _, pubKey := range keys {- authorizer, err := b.Authorizer(pubKey)- if err != nil {- lastErr = err- continue- }-- rule, err := parser.FromStringPolicy("allow if true")- if err != nil {- lastErr = err- continue- }- authorizer.AddPolicy(rule)-- if err := authorizer.Authorize(); err == nil {- return b, nil- } else {- lastErr = err- }- }-- return nil, fmt.Errorf("no valid key found for verification: %v", lastErr)-}func (h *Hub) parseAndVerifyJWT(ctx context.Context, jwtStr string, allowedAudiences []string) (jwt.MapClaims, *oidc.IDToken, error) {jwtParser := jwt.Parser{}diff --git a/cmd/sam-hub/metrics.go b/cmd/sam-hub/metrics.goindex 77aecc5b..4b195adb 100644--- a/cmd/sam-hub/metrics.go+++ b/cmd/sam-hub/metrics.go@@ -6,10 +6,6 @@ import ()var (- samHubActiveNodes = promauto.NewGauge(prometheus.GaugeOpts{- Name: "sam_hub_active_nodes",- Help: "The current number of nodes connected/enrolled in the mesh.",- })samHubEnrollmentTotal = promauto.NewCounterVec(prometheus.CounterOpts{Name: "sam_hub_enrollment_total",