{
  "id": "go/grpc-unauthenticated-missing-credentials",
  "signature": "rpc error: code = Unauthenticated desc = missing credentials",
  "signature_zh": "rpc 错误：代码 = Unauthenticated 描述 = 缺少凭据",
  "regex": "rpc\\ error:\\ code\\ =\\ Unauthenticated\\ desc\\ =\\ missing\\ credentials",
  "domain": "go",
  "category": "auth_error",
  "subcategory": null,
  "root_cause": "The client did not provide any authentication credentials in the request metadata.",
  "root_cause_type": "generic",
  "root_cause_zh": "客户端未在请求元数据中提供任何身份验证凭据。",
  "versions": [
    {
      "version": "1.56.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "1.57.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Sending an empty token or user/pass.",
      "why_fails": "Server still sees no valid credentials.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "Removing auth checks.",
      "why_fails": "Security risk.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "Not adding any metadata.",
      "why_fails": "Same error will occur.",
      "fail_rate": 1.0,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 1.0,
      "how": "md := metadata.Pairs(\"authorization\", \"Bearer mytoken\"); ctx := metadata.NewOutgoingContext(context.Background(), md)",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "creds := credentials.NewClientTLSFromCert(nil, \"\"); conn, err := grpc.Dial(address, grpc.WithTransportCredentials(creds))",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "interceptor := func(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error { ctx = metadata.AppendToOutgoingContext(ctx, \"authorization\", \"Bearer mytoken\"); return invoker(ctx, method, req, reply, cc, opts...) }",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-11-20",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}