Teleport: tsh登录-Teleport v5.0.0中的rpc错误

创建于 2020-12-04  ·  10评论  ·  资料来源: gravitational/teleport

描述

发生了什么事
在cli上运行tsh login --proxy=<my_proxy>时,我得到以下输出:

>tsh login --proxy=<my_proxy>
If browser window does not open automatically, open it by clicking on the link:
 http://127.0.0.1:53817/<GUID>
error: rpc error: code = Unimplemented desc = unknown method GetKubeServices for service proto.AuthService

您预期会发生什么
我希望这将成功登录以进行传送

如何复制它(尽可能少且精确)
在MacO上-

>brew install teleport
>tsh version
Teleport v5.0.0 git: go1.15.5
>tsh login --proxy=<my_proxy>

环境

  • 传送版本(使用teleport version ):传送v5.0.0 git:go1.15.5
  • Tsh版本(使用tsh version ):Teleport v5.0.0 git:go1.15.5
  • 操作系统(例如,从/etc/os-release ):macOS Catalina v 10.15.7

  • 您在哪里运行Teleport? (例如,AWS,GCP,专用硬件):服务器端v4

相关调试日志(如果适用)

  • tsh login --proxy=<my_proxy> --debug
INFO [CLIENT]    Successful auth with proxy teleport.lacework.net:3023 client/api.go:1672
<redacted>
DEBU [AUTH]      GRPC(CLIENT): keep alive 1m0s count: 3. auth/clt.go:320
DEBU [CLIENT]    Client  is connecting to auth server on cluster "teleport.lacework.net". client/client.go:473

ERROR REPORT:
Original Error: *status.statusError rpc error: code = Unimplemented desc = unknown method GetKubeServices for service proto.AuthService
Stack Trace:
    /private/tmp/teleport-20201127-89185-jfx2dt/teleport-5.0.0/src/github.com/gravitational/teleport/lib/auth/clt.go:2978 github.com/gravitational/teleport/lib/auth.(*Client).GetKubeServices
    /private/tmp/teleport-20201127-89185-jfx2dt/teleport-5.0.0/src/github.com/gravitational/teleport/lib/kube/utils/utils.go:155 github.com/gravitational/teleport/lib/kube/utils.KubeClusterNames
    /private/tmp/teleport-20201127-89185-jfx2dt/teleport-5.0.0/src/github.com/gravitational/teleport/lib/kube/kubeconfig/kubeconfig.go:101 github.com/gravitational/teleport/lib/kube/kubeconfig.UpdateWithClient
    /private/tmp/teleport-20201127-89185-jfx2dt/teleport-5.0.0/src/github.com/gravitational/teleport/tool/tsh/tsh.go:609 main.onLogin
    /private/tmp/teleport-20201127-89185-jfx2dt/teleport-5.0.0/src/github.com/gravitational/teleport/tool/tsh/tsh.go:431 main.Run
    /private/tmp/teleport-20201127-89185-jfx2dt/teleport-5.0.0/src/github.com/gravitational/teleport/tool/tsh/tsh.go:212 main.main
    /usr/local/opt/go/libexec/src/runtime/proc.go:213 runtime.main
    /usr/local/opt/go/libexec/src/runtime/asm_amd64.s:1375 runtime.goexit
User Message:

任何帮助将不胜感激,因为目前看来无法通过自制程序降级版本。

bug tsh ux

最有用的评论

我正在重新讨论该问题,以跟踪这是对tsh一项改进。

同时,对于任何其他遇到此问题的人,解决方法是将tsh从5.xx降级到4.4.x。

所有10条评论

我正在使用的当前解决方法是brew uninstall teleport并手动安装tsh v4.4.5 https://get.gravitational.com/tsh-4.4.5.pkg

看来问题出在授权服务器v4的使用上。 如松弛的Teleport v5中所述, it's backwards compatible, but not forwards compatible ( old clients will work with new servers, but new clients may not work with old servers)

我们对Homebrew打包的版本没有任何控制权。 确保由于意外升级而不会造成任何破坏的最安全方法是从https://goteleport.com/teleport/download安装正确版本的经过官方认证的经过公证的tsh PKG

感谢您和您的团队@webvictim的回应。 由于解决方法是关闭,因此从上述链接安装瞬移软件包。

@rmoles / @webvictim我的2p是,如果较新的tsh版本不向后兼容,则错误消息应该得到改进,以使用户指出他们的错误(客户端版本比远程版本更新)。 我已经看到很多入职运营商遇到此错误,因为他们尝试连接的远程端点是Teleport 4.4,但是他们刚刚离开并从官方下载页面中获取了最新的tsh软件包。

我不知道获取authVersion是经过身份验证还是未经身份验证的API请求,但是理想的解决方案是tsh是否可以对照自己的版本检查远程版本并警告用户其版本比遥控器。

仅供参考,由于以下错误,FYI在MacOs上安装MacOS .pkg安装程序被阻止: “teleport-4.4.5.pkg” cannot be opened because it is from an unidentified developer.
无论如何,都可以在这里找到安装步骤: https :

@rmoles teleport-4.4.5.pkgtsh-4.4.5.pkg实际上是不同的东西。

teleport-*.pkg文件未签名,因为Teleport二进制文件的生成方式当前与MacOS的签名要求不兼容。 我们有一个开放的问题可以在这里解决:#3158

tsh-*.pkg文件已使用官方开发人员证书签名,并由Apple进行公证,因此它们可以毫无问题地安装。

@dnwe,我同意。 实际上,我们确实已经通过未经身份验证的API调用公开了最低客户端版本:

$ curl -s https://teleport.example.com:3080/v1/webapi/ping | jq
{
  "auth": {
    "type": "github",
    "second_factor": "u2f",
    "github": {
      "name": "github",
      "display": "Github"
    }
  },
  "proxy": {
    "kube": {},
    "ssh": {
      "listen_addr": "0.0.0.0:3023",
      "tunnel_listen_addr": "0.0.0.0:3080",
      "public_addr": "teleport.example.com:3080",
      "ssh_public_addr": "teleport.example.com:3023",
      "ssh_tunnel_public_addr": "teleport.example.com:3080"
    }
  },
  "server_version": "5.0.0",
  "min_client_version": "3.0.0"
}

我将研究为什么这不会触发逻辑来警告tsh用户他们的版本不起作用。

我正在重新讨论该问题,以跟踪这是对tsh一项改进。

同时,对于任何其他遇到此问题的人,解决方法是将tsh从5.xx降级到4.4.x。

@dnwe,我同意。 实际上,我们确实已经通过未经身份验证的API调用公开了最低客户端版本:

...

我将研究为什么这不会触发逻辑来警告tsh用户他们的版本不起作用。

在这种情况下,这是我们需要的max_client_version,以警告用户tsh 5.x不能用于Teleport 4.x服务器

此页面是否有帮助?
0 / 5 - 0 等级